Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

url 'https://api.hcaptcha.com/getcaptcha/' returning base64 instead json #976

Open
allerallegro opened this issue Feb 14, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@allerallegro
Copy link

The return of this url is returning a base64 instead of a json, generating an error in the control.py file, line 144.

    async def handler(self, response: Response):
        if response.url.startswith("https://api.hcaptcha.com/getcaptcha/"):
            try:
                data = await response.json()
'Exception has occurred: UnicodeDecodeError
'utf-8' codec can't decode byte 0xf7 in position 3: invalid start byte'
@12189108
Copy link

It doesn't seem to be base64, but another encryption method. Or can you provide me with a demo to decrypt the data?

@allerallegro
Copy link
Author

https://accounts.hcaptcha.com/demo?sitekey=c86d730b-300a-444c-a8c5-5312e7a93628
In this link, when you click on the checkbox, the website triggers a request (https://api.hcaptcha.com/getcaptcha/c86d730b-300a-444c-a8c5-5312e7a93628) that returns as an octet-stream.
data.txt

@william9x
Copy link

I'm having the same problem. It also happen when you refresh challenge. But it will return decoded data when you re-click the checkbox again.

@QIN2DIM
Copy link
Owner

QIN2DIM commented Mar 2, 2024

@william9x interesting. I've been working on LLM Agent application stuff for the last couple months.

I haven't allocated too much effort to open source projects, I'll take a look in a couple days.

I expected to introduce YOLOV9 and LLM to handle multi-mode challenges. Strive to kill the game.

@QIN2DIM QIN2DIM added the bug Something isn't working label Mar 2, 2024
@Mouad-scriptz
Copy link

Mouad-scriptz commented Mar 10, 2024

Simple

const response = new ArrayBuffer()
const responseText = new TextDecoder().decode(response);
const data = JSON.parse(responseText);

@12189108
Copy link

Simple

const response = new ArrayBuffer()
const responseText = new TextDecoder().decode(response);
const data = JSON.parse(responseText);

Hello, it seems that the code you provided cannot solve the problem, as it still produces garbled output. Could you please provide a complete demo?

@Mouad-scriptz
Copy link

Mouad-scriptz commented Mar 17, 2024

Simple

const response = new ArrayBuffer()
const responseText = new TextDecoder().decode(response);
const data = JSON.parse(responseText);

Hello, it seems that the code you provided cannot solve the problem, as it still produces garbled output. Could you please provide a complete demo?

I will, when I have time (probably this week or the next).
Update: this seems to be affecting the collector too, https://github.com/QIN2DIM/hcaptcha-challenger/actions/runs/8318149616/job/22759735996

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants