Advertisement
Guest User

vbtoc#

a guest
Apr 3rd, 2016
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1.  
  2. try {
  3. HttpWebRequest s = default(HttpWebRequest);
  4. UTF8Encoding enc = default(UTF8Encoding);
  5. string postdata = null;
  6. byte[] postdatabytes = null;
  7. s = HttpWebRequest.Create("https://www.roblox.com/newlogin");
  8. enc = new System.Text.UTF8Encoding();
  9. postdata = "username=" + username + "&password=" + password + "&submitLogin=Log+In&ReturnUrl=";
  10.  
  11. postdatabytes = enc.GetBytes(postdata);
  12. s.Method = "POST";
  13. System.Net.ServicePointManager.ServerCertificateValidationCallback = (object sender, System.Security.Cryptography.X509Certificates.X509Certificate certificate, System.Security.Cryptography.X509Certificates.X509Chain chain, System.Net.Security.SslPolicyErrors sslPolicyErrors) => true;
  14. s.AllowAutoRedirect = false;
  15. s.ContentType = "application/x-www-form-urlencoded";
  16. s.ContentLength = postdatabytes.Length;
  17.  
  18. using (stream == s.GetRequestStream()) {
  19. stream.Write(postdatabytes, 0, postdatabytes.Length);
  20. }
  21.  
  22. } catch (Exception ex) {
  23. Interaction.MsgBox("Was Unable to get Cookie!");
  24. Environment.Exit(0);
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement