您好,所以我试图在一个名为“stake.games”的网站中使用 2captcha 绕过来绕过 hCaptcha,但它似乎不起作用。我得到了绕过代码,但是当我在“grecaptcha-response”和“hcaptcha-response”中输入它并单击检查按钮时,它不接受绕过代码并要求我再次进行验证。发生这种情况时,我去了 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))
所以基本上我在问如何用callBack函数解决hCaptcha?我的英语不是很好,但我希望我能够描述我的问题。
如果您想浏览该网站但不想在这里注册一个测试帐户:
账户 ID:testaccount1 账户密码:123456789Oo 网站:stake.games 在哪里测试?:https ://stake.games/settings/offers?code=xd&modal=redeemBonus&type=drop