ProgrammerNazaryman

Untitled

Mar 22nd, 2012
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Imports System.Security.Cryptography
  2. Imports System.Text
  3. Imports System.Net
  4. Imports System.IO
  5.  
  6. Module vbloginsystem
  7.  
  8.     Public Function Login(ByVal Username As String, ByVal Password As String)
  9.  
  10.         Password = MD5(Password)
  11.         Dim valid As Boolean = False
  12.         Dim data As String = "vb_login_username=" & Username & "&vb_login_password=&s=&do=login&vb_login_md5password=" & Password & "&vb_login_md5password_utf=" & Password
  13.  
  14.         Try
  15.             Dim request As HttpWebRequest = WebRequest.Create("http://hackershost.in/login.php?do=login")
  16.             request.Method = WebRequestMethods.Http.Post
  17.             request.ContentType = "application/x-www-form-urlencoded"
  18.             request.UserAgent = "-- vBulletin Vaidation  --"
  19.  
  20.  
  21.  
  22.             request.ContentLength = data.Length
  23.  
  24.             Dim rStream As New StreamWriter(request.GetRequestStream)
  25.  
  26.             rStream.Write(data)
  27.             rStream.Flush()
  28.             rStream.Close()
  29.  
  30.             Dim response As HttpWebResponse = request.GetResponse
  31.             Dim resReader As New StreamReader(response.GetResponseStream)
  32.  
  33.             Dim str As String = resReader.ReadToEnd
  34.  
  35.  
  36.             If str.Contains("Thank you for logging in") Then
  37.                 valid = True
  38.             Else
  39.                 valid = False
  40.             End If
  41.  
  42.  
  43.             response.Close()
  44.  
  45.         Catch ex As Exception
  46.             MessageBox.Show(ex.Message, "Error Hacking & Cracking Login!", MessageBoxButtons.OK, MessageBoxIcon.Error)
  47.  
  48.         End Try
  49.  
  50.         Return valid
  51.  
  52.     End Function
  53.  
  54.     Public Function MD5(ByVal number As String) As String
  55.  
  56.         Dim ASCIIenc As New ASCIIEncoding
  57.         Dim strReturn As String = String.Empty
  58.  
  59.         Dim ByteSourceText() As Byte = ASCIIenc.GetBytes(number)
  60.         Dim Md5Hash As New MD5CryptoServiceProvider
  61.         Dim ByteHash() As Byte = Md5Hash.ComputeHash(ByteSourceText)
  62.  
  63.         For Each b As Byte In ByteHash
  64.             strReturn &= b.ToString("x2")
  65.         Next
  66.  
  67.         Return strReturn
  68.  
  69.     End Function
  70. End Module
Advertisement
Add Comment
Please, Sign In to add comment