SHARE
TWEET

Untitled

a guest Jul 16th, 2019 113 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     class Inhand
  2.     {
  3.         string id;
  4.         string ip;
  5.         string username;
  6.         string password;
  7.        
  8.         public string Id { get => id; set => id = value; }
  9.         public string Ip { get => ip; set => ip = value; }
  10.         public string Username { get => username; set => username = value; }
  11.         public string Password { get => password; set => password = value; }
  12.  
  13.         public Inhand(string id, string ip, string username, string password)
  14.         {
  15.             Id = id;
  16.             Ip = ip;
  17.             Username = username;
  18.             Password = password;
  19.         }
  20.  
  21.         public void IO_ON()
  22.         {
  23.             string payload = $"http://{Ip}/apply.cgi/?_ajax=1&_web_cmd=%21%0Aio%20output%201%20on%0A";
  24.             byte[] byteArray = Encoding.ASCII.GetBytes(payload);
  25.             WebRequest request = WebRequest.Create(payload);
  26.             request.Credentials = new NetworkCredential(Username, Password);
  27.             request.Method = "POST";
  28.             request.ContentLength = (byteArray).Length;
  29.             request.ContentType = "application/x-www-form-urlencoded";
  30.             Stream datastream = request.GetRequestStream();
  31.             datastream.Write(byteArray, 0, payload.Length);
  32.         }
  33.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top