Hack Forums
[.NET] Get Captcha from ANY page - Google - Hotmail - Whathever.... - 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: [.NET] Get Captcha from ANY page - Google - Hotmail - Whathever.... (/showthread.php?tid=3608022)

Pages: Pages 1 2 3 4 5


Get Captcha from ANY page - Google - Hotmail - Whathever.... - ScΛrƒΛc3_ - Jul 8, 2013

Hi guys,
dunno if has been already posted, but here it is some code to get the captcha from any page that refresh the captcha image at any request.
Pretty sure will be usefull for someone, so... since i was working on something that needed this, will post to you too.

It works with Google, Hotmail....and you can adapt the code for almost any website.

Remeber to add as Reference "Microsoft.HTML Object Library"

We will be storing the image in the Clipboard, so if you don't want to loose data from it, store the previous content first and restore after you are done.

[img]http://img16.imageshack.us/img16/4589/99xy.jpg[/img]

GOOGLE:

PHP Code

<?php 
Imports mshtml

Public Class Form1

    
Private Sub WebBrowser1_DocumentCompleted(sender As Object, e As WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
  Dim CD 
As IHTMLDocument2 = WebBrowser1.Document.DomDocument
  Dim Images 
As IHTMLControlRange = CType(CD.body, HTMLBody).createControlRange
  
For Each imgs As IHTMLImgElement In CD.images
    
If imgs.GetAttribute("src").ToString.Contains("recaptcha") Then
    Images
.add(imgs)
    
Images.execCommand("Copy", False, Nothing)
    
PictureBox1.Image = Clipboard.GetDataObject.GetData(DataFormats.Bitmap)
    Exit For
    
End If
  
Next
    End Sub

    
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
  WebBrowser1
.Navigate("https://accounts.google.com/SignUp?continue=https%3A%2F%2Fencrypted.google.com%2F&hl=en")
    
End Sub
End 
Class 

[img]http://img14.imageshack.us/img14/5374/xn3g.jpg[/img]

HOTMAIL:

PHP Code

<?php 
Imports mshtml

Public Class Form1

    
Private Sub WebBrowser1_DocumentCompleted(sender As Object, e As WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
  Dim CD 
As IHTMLDocument2 = WebBrowser1.Document.DomDocument
  Dim Images 
As IHTMLControlRange = CType(CD.body, HTMLBody).createControlRange
  
For Each imgs As IHTMLImgElement In CD.images
    
If imgs.GetAttribute("src").ToString.Contains("GetHIPData?hid=") Then
    Images
.add(imgs)
    
Images.execCommand("Copy", False, Nothing)
    
PictureBox1.Image = Clipboard.GetDataObject.GetData(DataFormats.Bitmap)
    Exit For
    
End If
  
Next
    End Sub

    
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
  WebBrowser1
.Navigate("https://signup.live.com/signup.aspx?lic=1")
    
End Sub
End 
Class 

[img]http://img109.imageshack.us/img109/7614/3xzz.jpg[/img]

Well just forget about captcha issues now...and have a nice day. 🤝


* - Felix.Frogg - Jul 8, 2013

@Scarfac3_
Nice share bro
I guess the marketpalce will fill mass registration bots in few days from super coders (aka 🎉)

But anyway, this is nice html parse
Regards, UL
🤝


* - deiski - Jul 8, 2013

Very, very nice as always, great work man.


* - getkilled22 - Jul 9, 2013

Bookmarked!
Thanks for this! <3

Regards


* - SkyRider2 - Jul 9, 2013

Nice work, good to you helping out again man.


* - Kawop - Jul 9, 2013

If i've correctly understand that can be used to bypass captcha ?


* - Felix.Frogg - Jul 9, 2013

(Jul 9, 2013 02:28 AM)Kawop Wrote:  If i've correctly understand that can be used to bypass captcha ?

No, this means you can get captcha image from webbrowser control as Image of picturebox
To bypass you should use external tool like deathbycaptcha, CAP or so
🤝


* - ScΛrƒΛc3_ - Jul 9, 2013

(Jul 9, 2013 02:28 AM)Kawop Wrote:  If i've correctly understand that can be used to bypass captcha ?

This can be used to "display" the capcha from any site....if you have some sort of bot for auto sign up...you will just write the capcha and send....or any other app that want to automate something and capcha is needed.

In most sites, if you want to grab the image of the capcha and display it on (lets say) in a picturebox.. the image will be reloaded and replaced if you just try to download or navigate to it....so, it will not mach anymore the page you requested first and will not work....you can use this to solve the issue.

@ALL

Thanks guys, appreciated!


* - C3ol - Jul 9, 2013

why u use the html obj lib u can do it with looping the images


* - ๖ۣۜXilluX - Jul 9, 2013

Thanks for this release ! Great, I appreciate it.


* - ident - Jul 9, 2013

Not sure what's all the bum licking here. It's pretty shit.


* - ScΛrƒΛc3_ - Jul 9, 2013

(Jul 9, 2013 09:12 AM)ident Wrote:  Not sure what's all the bum licking here. It's pretty shit.

You are the best on the planet heart, we all know that 😈


* - Felix.Frogg - Jul 9, 2013

(Jul 9, 2013 09:12 AM)ident Wrote:  Not sure what's all the bum licking here. It's pretty shit.

Your code shit, and your code shit and my code shit .... and any other's code shit
And as Scarfac3_ said, we're all know so only ident's code is not shit
😏


* - C3ol - Jul 9, 2013

(Jul 9, 2013 09:12 AM)ident Wrote:  Not sure what's all the bum licking here. It's pretty shit.

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



* - ScΛrƒΛc3_ - Jul 9, 2013

(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

Dude, if i choose that way it's 'couse it has to work on almost ANY! website....your code does'nt work with HOTMAIL.