Salebril
New member
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:
The result was:
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:
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.
Code:
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:
Code:
{
"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:
Code:
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.