Advertisement
Guest User

Untitled

a guest
Sep 14th, 2016
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.36 KB | None | 0 0
  1. //login زر
  2.  
  3. Dim html As String
  4. Dim web As WebClient = New WebClient
  5. web = New WebClient
  6. web.Headers("User-Agent") = "Googlebot/2.1"
  7. html = web.DownloadString("http://www.313team.biz/ip.php")
  8. Dim ipfromurl As String = html
  9. ' Dim hwid As String = getHWID()
  10.  
  11.  
  12.  
  13. cookie()
  14. h = log("https://www.instagram.com/accounts/login/?force_classic_login", "csrfmiddlewaretoken=" & TextBox6.Text & "&username=" & TextBox1.Text & "&password=" & TextBox2.Text, "https://www.instagram.com/accounts/login/?force_classic_login")
  15.  
  16.  
  17.  
  18.  
  19. Public Sub cookie()
  20. Dim postData As String = ""
  21. Dim tempCookies As New CookieContainer
  22. Dim encoding As New ASCIIEncoding
  23. Dim byteData As Byte() = encoding.GetBytes(postData)
  24. Dim postReq As HttpWebRequest = DirectCast(WebRequest.Create("https://www.instagram.com/accounts/login/?force_classic_login"), HttpWebRequest)
  25. postReq.CookieContainer = tempCookies
  26. Dim postresponse As HttpWebResponse
  27. postresponse = DirectCast(postReq.GetResponse(), HttpWebResponse)
  28. tempCookies.Add(postresponse.Cookies)
  29. cokkie = tempCookies
  30. Dim postreqreader As New StreamReader(postresponse.GetResponseStream())
  31. Dim thepage As String = postreqreader.ReadToEnd
  32. TextBox6.Text = cokkie.ToString
  33. Dim regx As New Regex("name=""csrfmiddlewaretoken"" value=""(.*?)""/>", RegexOptions.IgnoreCase)
  34. Dim mactches As MatchCollection = regx.Matches(thepage)
  35. For Each match As Match In mactches
  36. TextBox6.Text = match.Value
  37. TextBox6.Text = TextBox6.Text.Replace("name=""csrfmiddlewaretoken"" value=""", "")
  38. TextBox6.Text = TextBox6.Text.Replace("""/>", "")
  39. tok = TextBox6.Text
  40. Next
  41. End Sub
  42. Public Function log(ByVal url As String, ByVal post As String, ByVal referer As String) As String
  43. Dim encoding As New ASCIIEncoding
  44. Dim byteData As Byte() = encoding.GetBytes(post)
  45. postReq = DirectCast(WebRequest.Create(url), HttpWebRequest)
  46. postReq.Method = "POST"
  47. postReq.KeepAlive = True
  48. postReq.CookieContainer = cokkie
  49. postReq.ContentType = "application/x-www-form-urlencoded"
  50. postReq.Referer = referer
  51. postReq.UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0"
  52. postReq.ContentLength = byteData.Length
  53. Dim postreqstream As Stream = postReq.GetRequestStream()
  54. postreqstream.Write(byteData, 0, byteData.Length)
  55. postreqstream.Close()
  56. postresponse = DirectCast(postReq.GetResponse(), HttpWebResponse)
  57. Dim postreqreader As New StreamReader(postresponse.GetResponseStream())
  58. Dim thepage As String = postreqreader.ReadToEnd
  59. If thepage.Contains("profile_pic_url") = True Then
  60. MsgBox("successful login", MsgBoxStyle.Information)
  61. GroupBox2.Enabled = True
  62. GroupBox3.Enabled = True
  63. GroupBox4.Enabled = True
  64. GroupBox1.Enabled = False
  65. Else
  66. MsgBox("يوجد خطا بتسجيل الدخول تاكد من اسم المستخدم وكلمة المرور" & vbCrLf & "تاكد ان كلمة المرور لا تحتوي على رموز", MsgBoxStyle.Critical)
  67.  
  68. End If
  69.  
  70. End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement