Advertisement
339r

Untitled

Apr 6th, 2020
691
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 1.17 KB | None | 0 0
  1. 'حط كوكيز حسابك
  2. Dim full_cookies As String = String.Empty
  3. ' حط الـ IDMEDIA حق المنشور
  4. Function Do_like(ByVal Cookies_is As String, ByVal idPOST As String) As Boolean
  5.         Try
  6.             Using w As New Net.WebClient
  7.                 w.Encoding = System.Text.Encoding.UTF8
  8.                 w.Headers.Add("Content-Type: application/x-www-form-urlencoded")
  9.                 w.Headers.Add("User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36")
  10.                 w.Headers.Add($"X-CSRFToken: {Regex.Match(Cookies_is, "csrftoken=(.*?);").Groups(1).Value}")
  11.                 w.Headers.Add("X-Requested-With: XMLHttpRequest")
  12.                 w.Headers.Add("Cookie", Cookies_is)
  13.                 Dim textrespon = w.UploadString("https://www.instagram.com/web/likes/" & idPOST & "/like/", "POST", "")
  14.                 If textrespon.Contains("""status"": ""ok""") Then
  15.                     Return True
  16.                 Else
  17.                     Return False
  18.                 End If
  19.             End Using
  20.         Catch ex As Exception
  21.             Return False
  22.         End Try
  23.  
  24.     End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement