Advertisement
339r

INSTAGRAM DO LIKE & LOGINE - VB.Net

Jun 14th, 2019
2,257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 3.27 KB | None | 0 0
  1.  
  2. Imports System.Net, System.Text.RegularExpressions
  3. Public Class Form1
  4.     Dim csrftoken, cookies As String
  5.     Dim w As New WebClient
  6.     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
  7.         If Not LOGIN_insta(TextBox2.Text, TextBox1.Text) Then
  8.             MsgBox("Fuck it's not true!!")
  9.         Else
  10.             MsgBox("LOGIN DONE!")
  11.             MsgBox(csrftoken)
  12.         End If
  13.     End Sub
  14.  
  15.     Private Function LOGIN_insta(ByVal pass, ByVal user)
  16.         Using w
  17.             Dim datainput As New System.Collections.Specialized.NameValueCollection
  18.             datainput.Add("username", user)
  19.             datainput.Add("password", pass)
  20.             Try
  21.  
  22.                 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")
  23.                 w.Headers.Add("KeepAlive: True")
  24.                 w.Headers.Add("x-csrftoken", "messing")
  25.                 w.Headers.Add("accept-language", "en-US,en;q=0.9,ar-SA;q=0.8,ar;q=0.7")
  26.                 w.Headers.Add("content-type", "application/x-www-form-urlencoded")
  27.                 w.Headers.Add("x-instagram-ajax", "1")
  28.                 w.Headers.Add("x-requested-with: XMLHttpRequest")
  29.                 w.UploadValues("https://www.instagram.com/accounts/login/ajax/", "POST", datainput)
  30.                 If w.ResponseHeaders("set-cookie").Contains("sessionid") Then
  31.                     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)
  32.                     csrftoken = Regex.Match(cookies, "csrftoken=(.*?);").Groups(1).Value
  33.                     Return True
  34.                 Else
  35.                     Return False
  36.                 End If
  37.  
  38.             Catch ex As Exception
  39.                 Return False
  40.             End Try
  41.         End Using
  42.     End Function
  43.  
  44.     Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
  45.         Dim a = InputBox("ID MEDAI?:")
  46.         do_like(a)
  47.     End Sub
  48.  
  49.     Private Function do_like(ByVal id)
  50.         Dim wb As New WebClient
  51.  
  52.         Dim rsa As String
  53.         Try
  54.  
  55.  
  56.             Using wb
  57.                 wb.Headers.Add("x-csrftoken", csrftoken)
  58.                 wb.Headers.Add("cookie", cookies)
  59.                 rsa = wb.UploadString("https://www.instagram.com/web/likes/" & id & "/like/", "POST")
  60.                 If rsa.Contains("{""status"": ""ok""}") Then
  61.                     MsgBox("Done")
  62.                 Else
  63.                     MsgBox(rsa)
  64.                 End If
  65.             End Using
  66.         Catch ex As System.Net.WebException
  67.             MsgBox(ex.Message)
  68.         End Try
  69.     End Function
  70. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement