Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try {
- HttpWebRequest s = default(HttpWebRequest);
- UTF8Encoding enc = default(UTF8Encoding);
- string postdata = null;
- byte[] postdatabytes = null;
- s = HttpWebRequest.Create("https://www.roblox.com/newlogin");
- enc = new System.Text.UTF8Encoding();
- postdata = "username=" + username + "&password=" + password + "&submitLogin=Log+In&ReturnUrl=";
- postdatabytes = enc.GetBytes(postdata);
- s.Method = "POST";
- System.Net.ServicePointManager.ServerCertificateValidationCallback = (object sender, System.Security.Cryptography.X509Certificates.X509Certificate certificate, System.Security.Cryptography.X509Certificates.X509Chain chain, System.Net.Security.SslPolicyErrors sslPolicyErrors) => true;
- s.AllowAutoRedirect = false;
- s.ContentType = "application/x-www-form-urlencoded";
- s.ContentLength = postdatabytes.Length;
- using (stream == s.GetRequestStream()) {
- stream.Write(postdatabytes, 0, postdatabytes.Length);
- }
- } catch (Exception ex) {
- Interaction.MsgBox("Was Unable to get Cookie!");
- Environment.Exit(0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement