Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports System.Net, System.Text.RegularExpressions
- Public Class Form1
- Dim csrftoken, cookies As String
- Dim w As New WebClient
- Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
- If Not LOGIN_insta(TextBox2.Text, TextBox1.Text) Then
- MsgBox("Fuck it's not true!!")
- Else
- MsgBox("LOGIN DONE!")
- MsgBox(csrftoken)
- End If
- End Sub
- Private Function LOGIN_insta(ByVal pass, ByVal user)
- Using w
- Dim datainput As New System.Collections.Specialized.NameValueCollection
- datainput.Add("username", user)
- datainput.Add("password", pass)
- Try
- w.Headers.Add("user-agent: Mozilla/5.0 (Linux; Android 8.0.0; SAMSUNG SM-J600G Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/7.4 Chrome/59.0.3071.125 Mobile Safari/537.36")
- w.Headers.Add("KeepAlive: True")
- w.Headers.Add("x-csrftoken", "messing")
- w.Headers.Add("accept-language", "en-US,en;q=0.9,ar-SA;q=0.8,ar;q=0.7")
- w.Headers.Add("content-type", "application/x-www-form-urlencoded")
- w.Headers.Add("x-instagram-ajax", "1")
- w.Headers.Add("x-requested-with: XMLHttpRequest")
- w.UploadValues("https://www.instagram.com/accounts/login/ajax/", "POST", datainput)
- If w.ResponseHeaders("set-cookie").Contains("sessionid") Then
- cookies = Regex.Match(w.ResponseHeaders("set-cookie"), "csrftoken=(.*?);").Value & Space(1) & Regex.Match(w.ResponseHeaders("set-cookie"), "ds_user_id=(.*?);").Value & Space(1) & Regex.Match(w.ResponseHeaders("set-cookie"), "mid=(.*?);").Value & Space(1) & Regex.Match(w.ResponseHeaders("set-cookie"), "rur=(.*?);").Value & Space(1) & Regex.Match(w.ResponseHeaders("set-cookie"), "sessionid=(.*?);").Value & Space(1) & Regex.Match(w.ResponseHeaders("set-cookie"), "shbid=(.*?);").Value & Space(1) & Regex.Match(w.ResponseHeaders("set-cookie"), "shbts=(.*?);").Value & Space(1) & Regex.Match(w.ResponseHeaders("set-cookie"), "urlgen=(.*?);").Value & Space(1)
- csrftoken = Regex.Match(cookies, "csrftoken=(.*?);").Groups(1).Value
- Return True
- Else
- Return False
- End If
- Catch ex As Exception
- Return False
- End Try
- End Using
- End Function
- Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
- Dim a = InputBox("ID MEDAI?:")
- do_like(a)
- End Sub
- Private Function do_like(ByVal id)
- Dim wb As New WebClient
- Dim rsa As String
- Try
- Using wb
- wb.Headers.Add("x-csrftoken", csrftoken)
- wb.Headers.Add("cookie", cookies)
- rsa = wb.UploadString("https://www.instagram.com/web/likes/" & id & "/like/", "POST")
- If rsa.Contains("{""status"": ""ok""}") Then
- MsgBox("Done")
- Else
- MsgBox(rsa)
- End If
- End Using
- Catch ex As System.Net.WebException
- MsgBox(ex.Message)
- End Try
- End Function
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement