Advertisement
tayeb33

Untitled

Jan 27th, 2019
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. Imports System.Text.RegularExpressions
  2. Imports System.Net
  3. Imports System.IO
  4. Public Class Form1
  5. Function login() As String
  6. Try
  7. Dim request As HttpWebRequest = HttpWebRequest.Create("https://www.insfollow.com/logins")
  8. request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0"
  9. request.Accept = "application/json, text/javascript, */*; q=0.01"
  10. request.ContentType = "application/x-www-form-urlencoded; charset=UTF-8"
  11. request.Method = "POST"
  12. Dim data As Byte() = System.Text.Encoding.Default.GetBytes("username=" & "username here" & "&password=" & "password here")
  13. request.ContentLength = data.LongLength
  14. Dim st As Stream = request.GetRequestStream
  15. st.Write(data, 0, data.Length)
  16. st.Flush()
  17. st.Close()
  18. Return New StreamReader(request.GetResponse.GetResponseStream()).ReadToEnd
  19. Catch ex As WebException
  20. Return "error: " & New StreamReader(ex.Response.GetResponseStream()).ReadToEnd
  21. End Try
  22. End Function
  23. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement