您好,所以我试图在一个名为“stack.games”的网站上使用2captcha旁路绕过hCaptcha,但它似乎不起作用。我得到了旁路代码,但当我在“grecaptcha响应”和;“hcaptcha响应”并单击检查按钮,它不接受旁路代码并要求我再次执行验证码。当这种情况发生时,我去了2captchas支持中心,问他为什么。他说该网站使用“回调”,并给了我一个获取回调函数的代码(我相信?)。这是他给我的密码:
window.myInterval = setInterval(() => {
if (window.hcaptcha) {
console.log('hcaptcha available, lets redefine render method')
// if hcaptcha object is defined, we save the original render method into window.originalRender
window.originalRender = hcaptcha.render
// then we redefine hcaptcha.render method with our function
window.hcaptcha.render = (container, params) => {
console.log(container)
console.log(params)
// storing hcaptcha callback globally
window.hcaptchaCallback = params.callback
// returning the original render method call
return window.originalRender(container, params)
}
clearInterval(window.myInterval)
} else {
console.log('hcaptcha not available yet')
}
}, 500)
结果是:
{
"sitekey": "12c3f8c6-a15c-4b83-8767-8050ee30fb70",
"size": "invisible",
"theme": "dark",
"hl": "en"
}
所以我什么都不懂,在他们在站点中提供的python项目中再次键入sitekey、url以绕过hCaptcha,但它没有再次绕过hCaptcha
我试图绕过hCaptcha的代码:
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
from twocaptcha import TwoCaptcha
api_key = os.getenv('APIKEY_2CAPTCHA', '52aec93fb7d4c1b0e99c6c0f614a11ce')
solver = TwoCaptcha(api_key)
try:
result = solver.hcaptcha(
sitekey='12c3f8c6-a15c-4b83-8767-8050ee30fb70',
url='https://stake.games/settings/offers?code=xd&modal=redeemBonus&type=drop',
)
except Exception as e:
sys.exit(e)
else:
sys.exit('solved: ' + str(result))
所以基本上我想问的是如何用回调函数解决hCaptcha?我的英语不是很好,但我希望我能描述我的问题
如果您想浏览网站但不想注册,请使用以下测试帐户:
account id: testaccount1 account pw: 123456789Oo site: stake.games where to test?: https://stake.games/settings/offers?code=xd&modal=redeemBonus&type=drop
它只是
window.hcaptchaCallback
,但您可能需要传递令牌:相关问题 更多 >
编程相关推荐