SHARE
TWEET

Login System [C#]

theiotlord Nov 17th, 2019 (edited) 199 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.             string username = USERNAMEBOXHERE.Text; // Note: This uses any raw formatted web page with user:pass format
  2.             string password = PASSWORDBOXHERE.Text;
  3.  
  4.             string value = username + ":" + password;
  5.             string value2 = username+ ":" + password;
  6.             string USER = USERNAMEBOXHERE.Text;
  7.             string PASS = PASSWORDBOXHERE.Text;
  8.  
  9.             if (USER == "" && PASS == "")
  10.             {
  11.                 MessageBox.Show("Error, Nothing filled in.");
  12.                 this.Close();
  13.             }
  14.             if (PASS == "")
  15.             {
  16.                 MessageBox.Show("Error, Password not filled in.");
  17.                 this.Close();
  18.             }
  19.  
  20.             if (USER == "")
  21.             {
  22.                 MessageBox.Show("Error, Username not filled in.");
  23.                 this.Close();
  24.             }
  25.  
  26.             WebClient webClient = new WebClient();
  27.  
  28.  
  29.             bool flag3 = webClient.DownloadString("YOURRAWLINKHERE").Contains(value);
  30.             if (flag3)
  31.             {
  32.                 this.Hide();
  33.                 MessageBox.Show("Successfully Logged In.);
  34.  
  35.                 YOURREDIRECTFORMHERE m = new YOURREDIRECTFORMHERE();
  36.                 m.Show();
  37.                
  38.             }
  39.             else
  40.             {
  41.                
  42.                     MessageBox.Show("Incorrect credentials.");
  43.                
  44.             }
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
 
Top