通过回调绕过 hCaptcha?

2023-12-29

你好,我正在尝试使用 2captcha 绕过在一个名为“stake.games”的网站中绕过 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"
}

回调及其他 https://i.stack.imgur.com/r33Jb.png

所以我什么都不明白,并在他们在网站中提供的 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 问题?我的英语不是很好,但我希望我能够描述我的问题。

如果您想浏览该网站但不想注册一个测试帐户:

帐户 ID:testaccount1 帐户密码:123456789Oo 站点:stake.games 在哪里测试?:


只是window.hcaptchaCallback但您可能需要传递令牌:

window.hcaptchaCallback(token)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

通过回调绕过 hCaptcha? 的相关文章

随机推荐