Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Function Check(username As String, pass As String)
- Try
- Dim postData As String = "username=" & username & "&password=" & pass
- Dim req As HttpWebRequest
- req = WebRequest.Create("https://www.instagram.com/accounts/login/ajax/")
- Dim res As HttpWebResponse
- Dim en As Byte() = Encoding.UTF8.GetBytes(postData)
- req.Method = "POST"
- req.ContentType = "application/x-www-form-urlencoded"
- req.Headers.Add("X-CSRFToken", "ZxEWIjHiwFGMxQVpB0L5nkLXriSs1wN4")
- req.Headers.Add("X-Instagram-AJAX", "1")
- req.Headers.Add("X-Requested-With", "XMLHttpRequest")
- req.Headers.Add("Cookie", "rur=ATN; csrftoken=ZxEWIjHiwFGMxQVpB0L5nkLXriSs1wN4; mid=WRmszQALAAH3-sfP8J7hcMRCbK2L; ig_vw=1366; ig_pr=1")
- req.Referer = "https://www.instagram.com/"
- req.ContentLength = en.Length
- Dim ss As Stream = req.GetRequestStream
- ss.Write(en, 0, en.Length)
- ss.Close()
- res = req.GetResponse
- Dim re As New StreamReader(res.GetResponseStream)
- Dim ST = re.ReadToEnd
- TextBox1.AppendText(ST)
- If ST.Contains(My.Resources.{"authenticated": true, "user": true, "status": "ok"}) Then
- MsgBox("Login Good")
- Else
- MsgBox("Bad")
- End If
- Catch ex As Exception
- Return False
- End Try
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement