Answer the question
In order to leave comments, you need to log in
How to bypass selenium captcha?
Hello, on the site https://coinhunters.cc/ you need to vote by clicking on the button, a captcha pops up and the service solves it, but nothing happens, but I noticed that a line appears in the console that expects a bool from script (I will attach its code below):
If you go through the captcha manually, then everything works and the bool value is set to true, please tell me what needs to be done to make it work.
The part that is responsible for the captcha:
$(document).ready(e=>{
async function l(e) {
var t = hcaptcha.getResponse();
if (t) {
t = $(`<input type="hidden" name="h-captcha-response" value="${t}" >`);
return e.append(t),
await s(500),
e.submit(),
!0
}
}
function s(t) {
return new Promise(e=>setTimeout(e, t))
}
$(".captcha-form").submit(e=>{
var t = hcaptcha.getResponse();
if (console.log(t),
!t)
return console.log("ERR: No captcha filled"),
window.openPopup("Please fill the captcha", "error"),
console.log("preventing"),
void e.preventDefault();
let a = $(e.currentTarget);
a.find('input[name="h-captcha-response"]') || (t = $(`<input type="hidden" name="h-captcha-response" value="${t}" >`),
a.append(t))
}
),
$(".captcha-form.popup-captcha input[type='submit']").click(async e=>{
console.log("preventing"),
e.preventDefault();
let t = $(e.currentTarget)
, a = t.closest(".captcha-form")
, o = $("#captcha-modal");
let n = a.find("input[name='redirect']");
for (n.val() || n.val(window.location.pathname + window.location.search),
console.log("starting check"); ; ) {
await s(500);
var r = await l(a);
if (console.log("checking 1. bool: ", r, "modal: ", o.hasClass("show")),
r)
break;
if (!o.hasClass("show"))
break
}
}
),
$(".captcha-form.popup-captcha button").click(async e=>{
console.log("preventing"),
e.preventDefault();
let t = $(e.currentTarget)
, a = t.closest(".captcha-form")
, o = $("#captcha-modal");
let n = a.find("input[name='redirect']");
for (n.val() || n.val(window.location.pathname + window.location.search),
console.log("starting check"); ; ) {
await s(500);
var r = await l(a);
if (console.log("checking 2. bool: ", r, "modal: ", o.hasClass("show")),
r)
break;
if (!o.hasClass("show"))
break
}
}
)
}
Answer the question
In order to leave comments, you need to log in
good job!!
Can you do the same on an other coin tracker like tokenprice.cc ?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question