Firing hCaptcha callback function for bypass token

Viewed 3063

I'm trying to bypass the hCaptcha in Discord Account Registration using selenium webDriver in C#. I'm using CapMonster Cloud API for solving the captcha itself and as response I'm getting bypass token.

The problem that I currently have is that I can't locate the callback function that I need to call/submit, in order to pass the hCaptcha.

I'm setting the bypass token into "g-recaptcha-response" and "h-captcha-response" textareas, but can't find a way to locate and call the callback function. There is no form to be submitted.

3 Answers

using selenium webDriver in C#

10/10 Would recommend doing discord captcha bypasses using:

PuppeteerExtraSharp/ExtraStealth

(as selenium has some obvious tracers)

Puppeteer has a lot more freedom in it's API as well as the fact that 2capthca is a much more popular method for solving h-captchas

I know this doesn't answer your question but i hope you look into this as a potential better alternative if you do not receive a more traditional answer.

You can do that with Anti-Captcha.com plugin which will do the job automatically. It injects its own callbacks, so when a token is ready it submits the form. If you ever have problems with plugin, support guys here will help you out.

Web communication has to happen in one of the methods defined on this page

So if anything is being sent and received from a server to the browser it has to be one among those methods. Generally the most common methods are POST and GET.

The statement "There is no form to be submitted" is somewhat confusing. A form is just display of fields to collect data from a user. In case a website does not need user input they do not show the form. They would instead capture the required data and send a POST request to the server (without the user ever noticing), in a manner similar to how a form would have sent the data. This is a normal behavior for almost all major websites. An example is google-analytics codes.

So what you need to look for is a POST request (mostly or PUT maybe GET - depends) where the data you are targeting is received or sent.

In your case there indeed is a form which displays the captcha (that is how you see it) and and associated POST request which does what you need.

Url for the post request on the captcha is POST /getcaptcha?s=xxxxxxxx-xxxe-xxxx-xxxx-xxxxxxxxxxxx HTTP/3
 
Url where it is sent is POST /api/v9/auth/register HTTP/3

These basics apply to any web communication and not just the website in question.

Related