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
Como distinguir entre Enterprise Edition e Regular Edition
a. abra o console do navegador e descubra quais requisitos `www.google.com/recaptcha` terminam com `anchor`
b. Verifique se o URL contém Enterprise
c. este é o tipo de recaptcha Enterprise ou Regular
Como encontrar o `websiteKey`
a. abra o console do navegador e descubra quais requisitos `www.google.com/recaptcha` terminam com `anchor`
b. a carga útil de `k` é a chave do site de destino
como encontrar o `recaptchaDataSValue`
a. abra o console do navegador e descubra quais requisitos `www.google.com/recaptcha` terminam com `anchor`
b. a carga útil de `s` é o site de recaptcha de destino `recaptchaDataSValue`
como encontrar distinguir o `invisível`
a. abra o console do navegador e descubra quais requisitos `www.google.com/recaptcha` terminam com `anchor`
b. a carga útil de `size` é o valor `isInvisible` do site recaptcha de destino
como encontrar o recaptcha `pageAction`
a. `getMessageFallback` called for how-to-find-the-params-of-recaptcha-solve-task.list5-
b. encontre-o em `___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;
}