Advertisement
Guest User

Untitled

a guest
Mar 24th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.10 KB | None | 0 0
  1. namespace Loader
  2. {
  3. public partial class Form2 : MetroForm
  4. {
  5. public Form2()
  6. {
  7. InitializeComponent();
  8. }
  9.  
  10. string hwid;
  11.  
  12. private void Form2_Load(object sender, EventArgs e)
  13. {
  14. hwid = HWDI.GetMachineGuid();
  15.  
  16. if (Properties.Settings.Default.Checked == true)
  17. {
  18. metroTextBox1.Text = Properties.Settings.Default.Username;
  19. metroTextBox2.Text = Properties.Settings.Default.Password;
  20. metroCheckBox1.Checked = Properties.Settings.Default.Checked;
  21. }
  22. }
  23.  
  24. string UppercaseFirst(string str)
  25. {
  26. if (string.IsNullOrEmpty(str))
  27. return string.Empty;
  28. return char.ToUpper(str[0]) + str.Substring(1).ToLower();
  29. }
  30.  
  31. private void metroButton1_Click(object sender, EventArgs e)
  32. {
  33. string str = metroTextBox1.Text;
  34. string upstr = UppercaseFirst(str);
  35.  
  36. Properties.Settings.Default.Username = upstr;
  37. Properties.Settings.Default.Password = metroTextBox2.Text;
  38. Properties.Settings.Default.Checked = metroCheckBox1.Checked;
  39. Properties.Settings.Default.Save();
  40.  
  41. webBrowser1.Navigate("https://thaisen.pw/forums/auth/check.php?username=" + metroTextBox1.Text + "&password=" + metroTextBox2.Text + "&hwid=" + hwid);
  42. }
  43.  
  44. private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
  45. {
  46. if (webBrowser1.DocumentText.Contains("p1"))
  47. {
  48. if (webBrowser1.DocumentText.Contains("g4") || webBrowser1.DocumentText.Contains("g8"))
  49. {
  50. if (webBrowser1.DocumentText.Contains("h1"))
  51. {
  52. this.Hide();
  53. var form3 = new Form3();
  54. form3.Closed += (s, args) => this.Close();
  55. form3.Show();
  56. }
  57. else if (webBrowser1.DocumentText.Contains("h2"))
  58. {
  59. MessageBox.Show("HWID Incorrect");
  60. }
  61. else if (webBrowser1.DocumentText.Contains("h3"))
  62. {
  63. MessageBox.Show("New HWID Set");
  64. }
  65. }
  66. else
  67. {
  68. MessageBox.Show("Group Incorrect");
  69. }
  70. }
  71. else
  72. {
  73. MessageBox.Show("Password Incorrect");
  74. }
  75. }
  76.  
  77. private void metroLink1_Click(object sender, EventArgs e)
  78. {
  79. System.Diagnostics.Process.Start("https://thaisen.pw/forums/member.php?action=lostpw");
  80. }
  81.  
  82. private void pictureBox2_Click(object sender, EventArgs e)
  83. {
  84. pictureBox2.Visible = false;
  85. }
  86.  
  87. private void pictureBox3_Click(object sender, EventArgs e)
  88. {
  89. pictureBox2.Visible = true;
  90. }
  91. }
  92. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement