Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

C# 

Using 2Captcha to Bypass Invisible ReCaptcha

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.
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

“I wish I could say everything in one word. I hate all the things that can happen between the beginning of a sentence and the end.” ~ Leonard Cohen
(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
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

}
You make request to: http://2captcha.com/in.php?key=API_KEY&m...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&...l=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);
}
All in on Ethereum
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 /


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by xx1ben99xxApr 7, 2020 02:45 PM 10 311 Apr 7, 2020 02:45 PM
Last Post: xx1ben99xx
[Python] by magicpartySep 20, 2019 05:26 PM 2 248 Sep 20, 2019 05:26 PM
Last Post: null_byte
[C#] by intJul 26, 2019 01:05 AM 26 785 Jul 26, 2019 01:05 AM
Last Post: DNA