Hack Forums
[C#] Using 2Captcha to Bypass Invisible ReCaptcha - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [C#] Using 2Captcha to Bypass Invisible ReCaptcha (/showthread.php?tid=5967428)



Using 2Captcha to Bypass Invisible ReCaptcha - Joel - May 6, 2019

I am looking through 2Captchas API and I'm struggling on how to figure this out. I was wondering if there is someone with more experience that could help me.

https://2captcha.com/2captcha-api#callback

The site I am working with is Twitch's Sign-up page.



RE: Using 2Captcha to Bypass Invisible ReCaptcha - vaiperboy - May 7, 2019

you basically need the data-sitekey , its constant (almost) for the page
so just go to the page you want > inspect element > ctrl + f > data-sitekey


RE: Using 2Captcha to Bypass Invisible ReCaptcha - Spaz - May 8, 2019

(May 7, 2019 11:14 AM)vaiperboy Wrote:  you basically need the data-sitekey , its constant (almost) for the page
so just go to the page you want > inspect element > ctrl + f > data-sitekey

Or you could deliver the page via way of an asynchronous web request


RE: Using 2Captcha to Bypass Invisible ReCaptcha - JUSTIN - May 11, 2019

I actually just so happened to have a class lying around for this.
2Captcha Class (Click to View)
Example usage:
Code
_2Captcha captcha = new _2Captcha("page url", "site key");
captcha.GetToken((success, token) = >{

    if (!success) {
        Console.WriteLine("2Captcha Failed: " + token);
        return;
    }

    // if we reach this point, 'token' is valid and can be used

}



RE: Using 2Captcha to Bypass Invisible ReCaptcha - Meterpreter - May 18, 2019

You make request to: http://2captcha.com/in.php?key=API_KEY&method=userrecaptcha&googlekey=SITE_KEY&pageurl=PAGE_URL_WHERE_CAPTCHA_IS
They respond with a request ID in the form of "OK|0123456789" so you can store the ID easily:

string requestId = response.Replace("OK|", "");


There after you make a request to: http://2captcha.com/res.php?key=API_KEY&action=get&id=REQUEST_ID&pageurl=PAGE_URL
They respond with:
CAPTCHA_NOT_READY
CAPTCH_UNSOLVABLE
OK|0123456789

string authCode = response.Replace("OK|", "");

Process the other responses however you want, in a basic sense:
Code
while (response.Contains("CAPTCHA_NOT_READY"))
{
    Thread.Sleep(15000);
    //Make request to res.php again
}
if (response.Contains("CAPTCHA_UNSOLVABLE"))
{
    Console.WriteLine("Failed to get recaptcha!");
}
else
{
    Console.WriteLine("Success! Auth: {0}", authCode);
}



RE: Using 2Captcha to Bypass Invisible ReCaptcha - WinA - Sep 18, 2019

I think he means completing the task using a browser like selenium, to complete invisible captchas you'll need to execute a java script that fills in the response.
As explained here - https://2captcha.com/2captcha-api#invisible

The better way would be using a RESTClient and submitting the data instead.

Use fiddler and figure out what gets passed to the action api and just filled it in that way /