Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Function Checkusername(ByVal user As String) As Object
- Dim result As Object = False
- Dim cookieContainer As CookieContainer = New CookieContainer()
- Application.DoEvents()
- Try
- Dim s As String = String.Concat(New String() {"email=givsfghsfghsfghsfghsfgheaway.emaisfghsfghsl01%2Bewlfle", user, "wlfsfghsfghsfghfsghsfghsfghsfghsfghsfghew%40gmail.com&password=Sw2xishere&username=", user, "&first_name=Sw2x"})
- Dim httpWebRequest As HttpWebRequest = CType(WebRequest.Create("https://www.instagram.com/accounts/web_create_ajax/attempt/"), HttpWebRequest)
- httpWebRequest.Method = "POST"
- httpWebRequest.Host = "www.instagram.com"
- httpWebRequest.UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0"
- httpWebRequest.Headers.Add("X-CSRFToken", "Ksxp4bSKAoX0sJhSdXH1Y58LzCvQbqbV")
- httpWebRequest.ContentType = "application/x-www-form-urlencoded; charset=UTF-8"
- httpWebRequest.Headers.Add("X-Requested-With", "XMLHttpRequest")
- httpWebRequest.Headers.Add("Cookie", "csrftoken=Ksxp4bSKAoX0sJhSdXH1Y58LzCvQbqbV; ds_user_id=3527398730; mid=V4RDNgAEAAEVQHfeBMMKmFqJAgHZ")
- httpWebRequest.KeepAlive = True
- httpWebRequest.Referer = "https://www.instagram.com/"
- httpWebRequest.Timeout = 1000000
- Dim bytes As Byte() = Encoding.ASCII.GetBytes(s)
- httpWebRequest.ContentLength = CLng(bytes.Length)
- Dim requestStream As Stream = httpWebRequest.GetRequestStream()
- requestStream.Write(bytes, 0, bytes.Length)
- requestStream.Flush()
- requestStream.Close()
- Dim flag As Boolean = New StreamReader(CType(httpWebRequest.GetResponse(), HttpWebResponse).GetResponseStream()).ReadToEnd().Contains("true")
- If flag Then
- result = True
- End If
- Catch expr_171 As Exception
- result = False
- End Try
- Return result
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement