Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Function check_Email(Email As String)
- Try
- Dim PostData As String = "email=" & Email & "&username=&first_name=&opt_into_one_tap=false"
- Dim Encoding As New UTF8Encoding
- Dim Byt As Byte() = Encoding.GetBytes(PostData)
- Dim web As HttpWebRequest = DirectCast(WebRequest.Create("https://www.instagram.com/accounts/web_create_ajax/attempt/"), HttpWebRequest)
- web.Method = "POST"
- web.KeepAlive = True
- web.Accept = "*/*"
- web.ContentType = "application/x-www-form-urlencoded"
- web.Headers.Add("Accept-Language", "en-US,en;q=0.5")
- web.Headers.Add("Cookie", "mid=Xr7xYgALAAE5BozHJ0Lqbg9uqYxt;" & "csrftoken=v31GAEbkCzYECPgq4dNNjq2HsiwiRvWs")
- web.Headers.Add("X-CSRFToken", "v31GAEbkCzYECPgq4dNNjq2HsiwiRvWs")
- web.Headers.Add("X-Instagram-AJAX", "cd3027e24501")
- web.Headers.Add("X-Requested-With", "XMLHttpRequest")
- web.Proxy = Nothing
- web.ContentLength = Byt.Length
- web.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
- web.Host = "www.instagram.com"
- Dim Stream As Stream = web.GetRequestStream()
- Stream.Write(Byt, 0, Byt.Length)
- Stream.Flush()
- Stream.Close()
- Dim ResponseStream As HttpWebResponse = DirectCast(web.GetResponse(), HttpWebResponse)
- Dim StreamReader As New StreamReader(ResponseStream.GetResponseStream())
- Dim Response As String = StreamReader.ReadToEnd
- If Response.Contains("email_is_taken") Then
- MsgBox("Taken.")
- Else
- MsgBox("Available.")
- End If
- Catch ex As Exception
- MsgBox("Error")
- End Try
- Return False
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement