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

.NET 

Get Captcha from ANY page - Google - Hotmail - Whathever....

Good thread, This will help alot of people making bots
[Image: g6bziK0.jpg]
(Jul 9, 2013 09:25 AM)C3ol Wrote:  haha u are funny 🤝 dono why u think i hate u
anyway simple way
Code
Dim Wb As New WebBrowser
  Wb.Navigate("https://accounts.google.com/SignUp?continue=https%3A%2F%2Fencrypted.google.com%2F&hl=en")
  While Not Wb.ReadyState = WebBrowserReadyState.Complete
    Application.DoEvents()
  End While
  For Each Cap As HtmlElement In Wb.Document.Images
    If Cap.GetAttribute("src").Contains("recaptcha") Then
    PictureBox1.ImageLocation = Cap.GetAttribute("src")
    End If
Next

Never ever call application.doevents inside a loop.
Very, very nice as always, great work man. 🎉
Wow... I did it more complicated when I was doing it for a minecraft server voter... :/
Thanks for this way anyways, could be helpful for me soon.
(Jul 9, 2013 12:09 PM)1n9i9c7om Wrote:  Wow... I did it more complicated when I was doing it for a minecraft server voter... :/
Thanks for this way anyways, could be helpful for me soon.

im sure will work nice olso for you.... 🤝

[img]http://img811.imageshack.us/img811/763/nhi4.jpg[/img]

[Image: Lymnm1L.jpg]

nice share of source really helped me thanks
(Jul 11, 2013 02:12 PM)XmysteriousX Wrote:  nice share of source really helped me thanks

No problem....glad to help you out 🤝

[Image: Lymnm1L.jpg]

nice source. thanks for sharing.

regards
shocK
Hi guy, starting to create an SpeedPseudo bot for an another forum (Nothing like HF don't be affraid)

I've just start like this an Button called refresh navigate with the Webbrowser to the webpage and it acess to the captcha and fill the picturebox with it

But i want to do that :

I type the captcha in a textbox and when i click on a button post on the programm he fill the html input:

I've used that code :

Code
WebBrowser1.Document.GetElementById("recaptcha_response_field").SetAttribute("", (captcha.Text))

And the Html code :

PHP Code

<?php 
<input id="recaptcha_response_field" type="text" placeholder="Saisissez les deux mots " autocapitalize="off" autocorrect="off" name="recaptcha_response_field" autocomplete="off"></input> 

What's wrong with my code ? when i click on the button nothing happen ❓

Thanks for your help 👍
(Jul 17, 2013 04:27 AM)Kawop Wrote:  Hi guy, starting to create an SpeedPseudo bot for an another forum (Nothing like HF don't be affraid)

I've just start like this an Button called refresh navigate with the Webbrowser to the webpage and it acess to the captcha and fill the picturebox with it

But i want to do that :

I type the captcha in a textbox and when i click on a button post on the programm he fill the html input:

I've used that code :

Code
WebBrowser1.Document.GetElementById("recaptcha_response_field").SetAttribute("", (captcha.Text))

And the Html code :

PHP Code

<?php 
<input id="recaptcha_response_field" type="text" placeholder="Saisissez les deux mots " autocapitalize="off" autocorrect="off" name="recaptcha_response_field" autocomplete="off"></input> 

What's wrong with my code ? when i click on the button nothing happen ❓

Thanks for your help 👍

Try with this....

PHP Code

<?php 
Try
    
Dim ElementCollection As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("input")
    For 
Each currentElement As HtmlElement In ElementCollection
    Dim ControlName 
As String = currentElement.GetAttribute("id").ToString
    
If ControlName = "recaptcha_response_field" Then
    currentElement
.SetAttribute("Value", captcha.Text)
    
End If
    
Next
Catch
End Try 

BTW, better you open another thread for personal issues... 🤝

EDIT:
Your problem has been solved sir...sent you a PM

[img]http://img855.imageshack.us/img855/3563/34tf.jpg[/img]

🤝

[Image: Lymnm1L.jpg]

Instead of using a webbrowser, you should use requests. They are faster than a webbrowser and are more professional
Holy hell dude it fucking works! Nice job. +3 to you

Edit: will deliver rep when I can give more haha
Hey, can I join in this parade?

Sorry it's in C#, but it doesn't use a web browser <3

Spoiler (Click to View)

Spoiler (Click to View)

PHP Code

<?php 
try
    {
    
String getPublicKey = "\"([^\"]+)\",\"captchaContainer";
    
String getChallenge = "challenge : '([^']+)',";
    
String baseURL = "http://www.google.com/recaptcha/api/image?c=";
    
String backupOption = "\"((http)?s?(://)?(www\\.)?google\\.com/recaptcha/[^\"]+)\"";
    
//Obviously, we don't HAVE to create those strings, but just for the sake of making the code cleaner, I made them here.

    
WebClient temp = new WebClient();
    
//WebClient FTW

    
String tempSource = temp.DownloadString(textBox1.Text);
    
//Used in case the google image is actually just lying there in the source

    
String publicKey = Regex.Match(tempSource, getPublicKey).Groups[1].Value;
    
//We need the public key to get the image of the captcha

    
if(String.IsNullOrEmpty(publicKey)){
    
//If we don't have a public key (probably because they're already showing the image in the source), just try to find the image
    
pictureBox1.ImageLocation = Regex.Match(tempSource, backupOption).Groups[1].ToString();
    }else{
    
String url = String.Format("{0}{1}", baseURL, Regex.Match(temp.DownloadString(String.Format("http://www.google.com/recaptcha/api/challenge?k={0}", publicKey)), getChallenge).Groups[1].ToString());
    
//Now we need the challenge key USING the public key
    //God google, wai you gotta complicate my life?

    
pictureBox1.ImageLocation = url;
    
//Ta-MOTHERFUCKING-DA
    
}

    }
    catch (
Exception)
    {
    
MessageBox.Show("An error has occured, but I was too lazy to tell you what it is.");
    } 
http://pastebin.com/Ju04bVwW
(Jul 21, 2013 09:45 AM)Fafaffy Wrote:  Hey, can I join in this parade?

Sorry it's in C#, but it doesn't use a web browser <3

Spoiler (Click to View)

Spoiler (Click to View)

PHP Code

<?php 
try
    {
    
String getPublicKey = "\"([^\"]+)\",\"captchaContainer";
    
String getChallenge = "challenge : '([^']+)',";
    
String baseURL = "http://www.google.com/recaptcha/api/image?c=";
    
String backupOption = "\"((http)?s?(://)?(www\\.)?google\\.com/recaptcha/[^\"]+)\"";
    
//Obviously, we don't HAVE to create those strings, but just for the sake of making the code cleaner, I made them here.

    
WebClient temp = new WebClient();
    
//WebClient FTW

    
String tempSource = temp.DownloadString(textBox1.Text);
    
//Used in case the google image is actually just lying there in the source

    
String publicKey = Regex.Match(tempSource, getPublicKey).Groups[1].Value;
    
//We need the public key to get the image of the captcha

    
if(String.IsNullOrEmpty(publicKey)){
    
//If we don't have a public key (probably because they're already showing the image in the source), just try to find the image
    
pictureBox1.ImageLocation = Regex.Match(tempSource, backupOption).Groups[1].ToString();
    }else{
    
String url = String.Format("{0}{1}", baseURL, Regex.Match(temp.DownloadString(String.Format("http://www.google.com/recaptcha/api/challenge?k={0}", publicKey)), getChallenge).Groups[1].ToString());
    
//Now we need the challenge key USING the public key
    //God google, wai you gotta complicate my life?

    
pictureBox1.ImageLocation = url;
    
//Ta-MOTHERFUCKING-DA
    
}

    }
    catch (
Exception)
    {
    
MessageBox.Show("An error has occured, but I was too lazy to tell you what it is.");
    } 
http://pastebin.com/Ju04bVwW

Beautiful. Simply Beautiful. Kudos Fafaffy. Kudos.
fuck.
[Image: wyEbCMi.png]

Not trying to be a dick, It just comes naturally.
@Abstergo
Thanks for appreciating, im sure anyone will get any captcha with this.

@Fafaffy
Thanks for improving my thread with your C# version but....have you tested olso on Hotmail ? Google is not a problem at all it does not change the capcha when you try to get it.

Any of you can improve, you can use webrequests or webbrowser....this code has the purpose to show you how to take advantage of the Microsoft.HTML Object Library.

[Image: Lymnm1L.jpg]



Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by ClusterzIncMar 11, 2019 09:48 AM 10 1,249 Mar 11, 2019 09:48 AM
Last Post: ClusterzInc
[Python] by thePolarBearJun 7, 2017 08:32 PM 2 270 Jun 7, 2017 08:32 PM
Last Post: thePolarBear
[.NET] by Marcoluca56Nov 17, 2016 10:11 PM 8 427 Nov 17, 2016 10:11 PM
Last Post: SL x TnT