params of recaptcha v2 / recaptcha v2 invisible solve task
a. websiteURL
b. websiteKey
c. recaptchaDataSValue
d. isInvisible
params of recaptcha v2 Enterprise solve task
a. websiteURL
b. websiteKey
c. pageAction
d. enterprisePayload
e. isInvisible
params of recaptcha v3 / recaptcha v3 Enterprise solve task
a. websiteURL
b. websiteKey
c. pageAction
Hoe onderscheid te maken tussen de Enterprise-editie en de reguliere editie
a. open de browserconsole en kijk welke verzoeken `www.google.com/recaptcha` eindigen op `anchor`
b. Controleer of de URL Enterprise bevat
c. dit is het recaptcha-type Enterprise of Regular
Hoe de `websiteKey` te vinden
a. open de browserconsole en kijk welke verzoeken `www.google.com/recaptcha` eindigen op `anchor`
b. de payload van `k` is de doelwebsitesleutel
hoe u de `recaptchaDataSValue` kunt vinden
a. open de browserconsole en kijk welke verzoeken `www.google.com/recaptcha` eindigen op `anchor`
b. de payload van `s` is de doel-recaptcha-website `recaptchaDataSValue`
hoe je het ‘onzichtbare’ kunt onderscheiden
a. open de browserconsole en kijk welke verzoeken `www.google.com/recaptcha` eindigen op `anchor`
b. de payload van `size` is de `isInvisible`-waarde van de doelrecaptcha-website
hoe u de recaptcha `pageAction` kunt vinden
a. `getMessageFallback` called for how-to-find-the-params-of-recaptcha-solve-task.list5-
b. vind het in `___grecaptcha_cfg.clients`
function getRecaptchaWidgetInfo(widget) {
let info = {
captchaType: "recaptcha",
widgetId: widget.id,
version: "v2",
sitekey: null,
action: null,
s: null,
callback: null,
enterprise: window?.grecaptcha?.enterprise ? true : false,
containerId: null,
bindedButtonId: null,
};
/*
* Check if is badge
*/
let isBadge = false;
mainLoop: for (let k1 in widget) {
if (typeof widget[k1] !== "object") continue;
for (let k2 in widget[k1]) {
if (widget[k1][k2] && widget[k1][k2].classList && widget[k1][k2].classList.contains("grecaptcha-badge")) {
isBadge = true;
break mainLoop;
}
}
}
/*
* 1. Look for version
*/
if (isBadge) {
info.version = "v3";
for (let k1 in widget) {
let obj = widget[k1];
if (typeof obj !== "object") continue;
for (let k2 in obj) {
if (typeof obj[k2] !== "string") continue;
if (obj[k2] == "fullscreen") info.version = "v2_invisible";
}
}
}
/*
* 2. Look for containerId
*/
let n1;
for (let k in widget) {
if (widget[k] && widget[k].nodeType) {
if (widget[k].id) {
info.containerId = widget[k].id;
} else if (widget[k].dataset.sitekey) {
widget[k].id = "recaptcha-container-" + Date.now();
info.containerId = widget[k].id;
} else if (info.version == 'v2') {
if (!n1) {
n1 = widget[k];
continue;
}
if (widget[k].isSameNode(n1)) {
widget[k].id = "recaptcha-container-" + Date.now();
info.containerId = widget[k].id;
break;
}
}
}
}
/*
* 3. Look for sitekey, action, s and callback
*/
for (let k1 in widget) {
let obj = widget[k1];
if (typeof obj !== "object") continue;
for (let k2 in obj) {
if (obj[k2] === null) continue;
if (typeof obj[k2] !== "object") continue;
if (obj[k2].sitekey === undefined) continue;
if (obj[k2].action === undefined) continue;
for (let k3 in obj[k2]) {
if (k3 === "sitekey") info.sitekey = obj[k2][k3];
if (k3 === "action") info.action = obj[k2][k3];
if (k3 === "s") info.s = obj[k2][k3];
if (k3 === "callback") info.callback = obj[k2][k3];
if (k3 === "bind" && obj[k2][k3]) {
if (typeof obj[k2][k3] === "string") {
info.bindedButtonId = obj[k2][k3];
} else {
let button = obj[k2][k3];
if (button.id === undefined) {
button.id = "recaptchaBindedElement" + widget.id;
}
info.bindedButtonId = button.id;
}
}
}
}
}
/*
* 4. Prepare callback
*/
if (typeof info.callback === "function") {
let callbackKey = "reCaptchaWidgetCallback" + widget.id;
window[callbackKey] = info.callback;
info.callback = callbackKey;
}
return info;
}