Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports System.Text.RegularExpressions
- Imports System.Net
- Imports System.IO
- Public Class Form1
- Function login() As String
- Try
- Dim request As HttpWebRequest = HttpWebRequest.Create("https://www.insfollow.com/logins")
- request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0"
- request.Accept = "application/json, text/javascript, */*; q=0.01"
- request.ContentType = "application/x-www-form-urlencoded; charset=UTF-8"
- request.Method = "POST"
- Dim data As Byte() = System.Text.Encoding.Default.GetBytes("username=" & "username here" & "&password=" & "password here")
- request.ContentLength = data.LongLength
- Dim st As Stream = request.GetRequestStream
- st.Write(data, 0, data.Length)
- st.Flush()
- st.Close()
- Return New StreamReader(request.GetResponse.GetResponseStream()).ReadToEnd
- Catch ex As WebException
- Return "error: " & New StreamReader(ex.Response.GetResponseStream()).ReadToEnd
- End Try
- End Function
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement