简体   繁体   中英

Bypassing a hCaptcha with callback?

Hello so i am trying to bypass hCaptcha in a website called "stake.games" with using 2captcha bypass but it seems to not work. I am getting the bypass code but when i type it in both "grecaptcha-response" & "hcaptcha-response" and click the check button it doesnt accept the bypass code and asks me to do captcha again. When that happened, i went to 2captchas support and asked him why. He said the site uses "callback" and gave me a code to get callback function (i believe?). Heres the code that he gave me:

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)

The result was:

{
    "sitekey": "12c3f8c6-a15c-4b83-8767-8050ee30fb70",
    "size": "invisible",
    "theme": "dark",
    "hl": "en"
}

callback and others

So i didnt understand anything and typed the sitekey, url once again in the python project they give in their site to bypass the hCaptcha but it didnt bypass hCaptcha again.

Code i am trying to bypass 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))

So basically i am asking for how to solve hCaptcha with callBack function? My english is not that good but I hope i was able to describe my problem.

if you want to explore the site but don't want to register heres a test account:

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但您可能需要传递令牌:

window.hcaptchaCallback(token)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM