Advertisement
CorrM

Get captcha by 3a©roub

Nov 28th, 2016
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 1.62 KB | None | 0 0
  1. Public Class Form1
  2.     '                              ----------------------------
  3.     '                              |Coded by 3a©roub 2013-2014|
  4.     '                              |       Dev-point.com      |
  5.     '                              |    All right reserved ®  |
  6.     '                              ----------------------------
  7.  
  8.  
  9.     Private Sub Captcha()
  10.         Dim Doc As mshtml.IHTMLDocument2 = WebBrowser1.Document.DomDocument
  11.         Dim ImgRange As mshtml.IHTMLControlRange = CType(Doc.body, mshtml.HTMLBody).createControlRange
  12.         For Each Img As mshtml.IHTMLImgElement In Doc.images
  13.             If Img.GetAttribute("src").ToString.Contains("http://www.afreesms.com/image.php") Then
  14.                 ImgRange.add(Img)
  15.                 ImgRange.execCommand("Copy", False, Nothing)
  16.                 PictureBox1.Image = Clipboard.GetDataObject.GetData(DataFormats.Bitmap)
  17.                 Exit For
  18.             End If
  19.         Next
  20.     End Sub
  21.  
  22.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  23.         Call Captcha()
  24.     End Sub
  25.  
  26.     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  27.         WebBrowser1.Navigate("http://www.afreesms.com/freesms/")
  28.     End Sub
  29.  
  30.     Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
  31.         If WebBrowser1.ReadyState = WebBrowserReadyState.Complete Then
  32.             Button1.Enabled = True
  33.         End If
  34.     End Sub
  35. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement