Furry / 2captcha

A wrapper around the 2captcha api
71 stars 23 forks source link

hsw script is supported ? #42

Closed edenriquez closed 1 year ago

edenriquez commented 1 year ago

Hi, I'm using this package in order to solve a hcaptcha in this site sso.acesso.gov.br/login, the problem is that about 4 days ago it was working as expected but yesterday all requests started to fail, there is one different step between what I have implemented vs what the page does, the page performs the load of hsw.js script which send different data from the window as context for hcaptcha token generation, my question is: is hsw approach supported in this lib as some parameter or via 2captcha API?

this is the response I receive from the page that implements hcaptcha image

and this is the one I receive using this package image

and this is the code of my implementation

const TWO_CAPTCHA_API_KEY =  process.env.TWOCAPTCHAKEY
const solver = new Solver(TWO_CAPTCHA_API_KEY)

const captcha = await captchaSolver(solver)
export async function captchaSolver(solver) {
    return solver.hcaptcha("xxxxxxx-d46c-400a-ba07-xxxxxxxx", "sso.acesso.gov.br")
}
edenriquez commented 1 year ago

Closing since I notice while debugging that code implementation shows that there is a previous call (https://hcaptcha.com/checksiteconfig) that generates the token that is sent later to https://hcaptcha.com/getcaptcha and this responds with the needed payload