Guest User

Untitled

a guest
Apr 9th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. Dim http As New WinHttp.WinHttpRequest
  2. http.Option(WinHttpRequestOption_EnableRedirects) = False
  3. url = "http://example.com"
  4. ' Launch the HTTP request
  5. http.Open "GET", url, False
  6. http.Send
  7. target=http.GetResponseHeaders("location")//get the target url for post
  8. Cookie=""
  9. postData="USER="&HttpUtility.UrlEncode(username)&"&PASSWORD="&password
  10. http.Open "POST", target, False
  11. http.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
  12. http.setRequestHeader "Cookie", Cookie
  13. http.Send postData
Add Comment
Please, Sign In to add comment