Advertisement
Guest User

Untitled

a guest
Jul 7th, 2017
1,591
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 3.08 KB | None | 0 0
  1. Imports System.Net
  2. Imports System.Net.Sockets
  3. Imports System.IO
  4. Imports System.Text.RegularExpressions
  5. Imports System.Text
  6.  
  7.  
  8. Module Module1
  9.     Dim email$
  10.     Dim pass$
  11.     Dim user$
  12.     Dim name$
  13.     Function register(Email$, Pass$, user$, Name$)
  14.         Dim postData As String = "email=" & Email & "&password=" & Pass & "&username=" & user & "&first_name=" & Name
  15.         Dim tempCook As CookieContainer
  16.         Dim encoding As New UTF8Encoding
  17.         Dim bytedata As Byte() = encoding.GetBytes(postData)
  18.         Dim request As HttpWebRequest = DirectCast(WebRequest.Create("https://www.instagram.com/accounts/web_create_ajax/"), HttpWebRequest)
  19.         request.Headers.Add("X-CSRFToken", "4d1RHxO1YEYiEBys2mR28DEWDlbVN1yl")
  20.         request.ContentType = "application/x-www-form-urlencoded"
  21.         request.Headers.Add("X-Instagram-AJAX", "1")
  22.         request.Headers.Add("X-Requested-With", "XMLHttpRequest")
  23.         request.Headers.Add("Cookie", "mid=WV9-tAAEAAGbF0GmRpSJfU_uS_qj; js_datr=JbBhWCXpCLhu_i0Hy89QBFIG; csrftoken=4d1RHxO1YEYiEBys2mR28DEWDlbVN1yl; ig_pr=1.25; ig_vw=1525; ig_dru_dismiss=1485866364904; ig_aib_du=1487800189834; js_reg_ext_ref=http%3A%2F%2Fhelp.instagram.com; js_reg_fb_ref=https%3A%2F%2Fwww.facebook.com%2Fhelp%2Finstagram%2Fcontact%2F1652567838289083; js_reg_fb_gate=https%3A%2F%2Fwww.facebook.com%2Fhelp%2Finstagram%2F292478487812558; wd=1525x724; dpr=1.25")
  24.         request.Method = "POST"
  25.         request.KeepAlive = True
  26.         request.CookieContainer = tempCook
  27.         request.Referer = "https://www.instagram.com/"
  28.         request.UserAgent = "Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2.3) Gecko/20100401 Firefox/4.0 (.NET CLR 3.5.30729)"
  29.         request.ContentLength = bytedata.Length
  30.         Dim requestStream As Stream = request.GetRequestStream()
  31.         requestStream.Write(bytedata, 0, bytedata.Length)
  32.         requestStream.Close()
  33.         Dim responseS As HttpWebResponse
  34.         responseS = DirectCast(request.GetResponse(), HttpWebResponse)
  35.         Dim Reader As New StreamReader(responseS.GetResponseStream())
  36.         Dim thepage As String = Reader.ReadToEnd
  37.         If thepage.Contains("Another account is using") Then
  38.             Console.ForegroundColor = ConsoleColor.DarkRed
  39.             Console.WriteLine(user + "Has Been Fail Register !!")
  40.         Else
  41.             Console.ForegroundColor = ConsoleColor.DarkGreen
  42.             Console.WriteLine(user + "Has Been Successfuly Register !!")
  43.  
  44.         End If
  45.     End Function
  46.  
  47.  
  48.     Sub Main()
  49.         Console.WriteLine("Write Your Email ! : ")
  50.         email = Console.ReadLine()
  51.         Console.WriteLine("Write Your Password ! :")
  52.         pass = Console.ReadLine()
  53.         Console.WriteLine("Write Your Username ! :")
  54.         user = Console.ReadLine()
  55.         Console.WriteLine("Write Your FirstName ! :")
  56.         name = Console.ReadLine()
  57.         Console.WriteLine("--------------------------------------------")
  58.         Dim s As New Threading.Thread(AddressOf reg)
  59.         s.Start()
  60.     End Sub
  61.     Sub reg()
  62.         register(email, pass, user, name)
  63.     End Sub
  64. End Module
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement