Guest User

Untitled

a guest
Apr 7th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.87 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. using System.Threading;
  10. using System.Runtime.CompilerServices;
  11.  
  12. namespace MFJC
  13. {
  14. public partial class Login : Form
  15. {
  16. bool close = false;
  17. bool isConnecting = false;
  18. public Login()
  19. {
  20. InitializeComponent();
  21. }
  22.  
  23. private delegate void closeFormDelegate();
  24.  
  25. private void closeForm()
  26. {
  27. Close();
  28. }
  29.  
  30. private void loginThreadMethod()
  31. {
  32. //label3.Visible = true;
  33. //Thread.Sleep(100);
  34. //label1.Visible = false;
  35. //label2.Visible = false;
  36. //textBox1.Visible = false;
  37. //textBox2.Visible = false;
  38. //checkBox1.Visible = false;
  39. //button1.Visible = false;
  40. String login = "";
  41. try
  42. {
  43. login = MFJCServer.GetLoginString(textBox1.Text, textBox2.Text);
  44. } catch (Exception e) {
  45. showInternetNotConnectedMessage();
  46. return;
  47. }
  48. if (login == "1")
  49. {
  50. MessageBox.Show("The username or password entered does not exist. Please check\nthat your details are entered properly. Have you changed your password\nrecently? If you forgot it, use the Forgot Password button on the website.", "MyStresser");
  51. //label1.Visible = true;
  52. //label2.Visible = true;
  53. //textBox1.Visible = true;
  54. //textBox2.Visible = true;
  55. //checkBox1.Visible = true;
  56. //button1.Visible = true;
  57. //label3.Visible = false;
  58. isConnecting = false;
  59. return;
  60. }
  61. if (login == "0")
  62. {
  63. //label1.Visible = true;
  64. //label2.Visible = true;
  65. //textBox1.Visible = true;
  66. //textBox2.Visible = true;
  67. //checkBox1.Visible = true;
  68. //button1.Visible = true;
  69. //label3.Visible = false;
  70. MessageBox.Show("You have been banned from MyStresser. Please visit the website\nto review your offenses resulting in this action as well\nas to pay the reactivation fee if applicable.", "MyStresser");
  71. isConnecting = false;
  72. return;
  73. }
  74. if (login == "5")
  75. {
  76. //label1.Visible = true;
  77. //label2.Visible = true;
  78. //textBox1.Visible = true;
  79. //textBox2.Visible = true;
  80. //checkBox1.Visible = true;
  81. //button1.Visible = true;
  82. //label3.Visible = false;
  83. MessageBox.Show("You do not have any active subscription or credits left!\nThe client is useless without money in your account.\nPlease visit the website to restock!", "MyStresser");
  84. isConnecting = false;
  85. return;
  86. }
  87. String[] license = login.Split("|".ToCharArray());
  88. String subscription = license[0];
  89. String subexpire = license[1];
  90. String credits = license[2];
  91. String concurrent = license[3];
  92. String attacks = license[4];
  93. String API = license[5];
  94. String Services = license[6];
  95. Program.user = textBox1.Text;
  96. Program.pass = textBox2.Text;
  97. Program.api = API;
  98. Program.attacks = attacks;
  99. String[] current = concurrent.Split("/".ToCharArray());
  100. Program.conc = current[1];
  101. Program.subs = subscription;
  102. Program.subexp = subexpire;
  103. Program.attacks = attacks;
  104. Program.services = Services;
  105. Program.credits = credits;
  106.  
  107. List<string> ls = new List<string>();
  108. if (current[0] != "0") for (int i = 1; i <= Convert.ToInt16(current[0]); i++) ls.Add(license[6 + i]);
  109. //if (textBox1.Text != "mfjc" || textBox2.Text != "password")
  110. //{
  111. // MessageBox.Show("Please recheck your login credentials.", "MyStresser");
  112. // return;
  113. //}
  114. String catks = "";
  115. foreach (string asdf in ls) catks = catks + "\n" + asdf;
  116.  
  117. MessageBox.Show("Subscribed to: " + subscription + "\nSubscribed until: " + subexpire + "\nCredits: " + credits + "\nConcurrent = " + concurrent + "\nattacks = " + attacks + "\nAPI: " + API + "\nServices: " + Services + catks, "MyStresser");
  118.  
  119. MessageBox.Show("Welcome, " + textBox1.Text + "!", "MyStresser");
  120. if (current[0] == "0" || current[0] == "1")
  121. {
  122. Main main = new Main();
  123. main.Show();
  124. }
  125. else
  126. {
  127. Multiple multiple = new Multiple(ls);
  128. multiple.Show();
  129. }
  130. close = true;
  131. if (this.InvokeRequired)
  132. {
  133. closeFormDelegate del = closeForm;
  134. Invoke(del);
  135. }
  136. else
  137. {
  138. Close();
  139. }
  140.  
  141. isConnecting = false;
  142. }
  143.  
  144. private void showInternetNotConnectedMessage()
  145. {
  146. MessageBox.Show("A connection to MyStresser could not be established. Please check your internet connection.", "MyStresser");
  147. isConnecting = false;
  148. }
  149.  
  150. [MethodImpl(MethodImplOptions.Synchronized)]
  151. private void button1_Click(object sender, EventArgs e)
  152. {
  153. if (isConnecting)
  154. {
  155. return;
  156. }
  157. isConnecting = true;
  158. if (!InternetCheck.isInternetConnected())
  159. {
  160. showInternetNotConnectedMessage();
  161. return;
  162. }
  163. if (checkBox1.Checked)
  164. {
  165. Properties.Settings.Default.user = textBox1.Text;
  166. Properties.Settings.Default.pass = textBox2.Text;
  167. Properties.Settings.Default.remember = true;
  168. }
  169. else
  170. {
  171. Properties.Settings.Default.user = "";
  172. Properties.Settings.Default.pass = "";
  173. Properties.Settings.Default.remember = false;
  174. }
  175. Properties.Settings.Default.Save();
  176. if (textBox1.Text.Length < 4 || textBox2.Text.Length < 4)
  177. {
  178. MessageBox.Show("These are invalid login details. Please try again.", "MyStresser");
  179. isConnecting = false;
  180. return;
  181. }
  182. Thread thread = new Thread(new ThreadStart(loginThreadMethod));
  183. thread.Start();
  184. }
  185.  
  186. private void Form2_Load(object sender, EventArgs e)
  187. {
  188. if (Properties.Settings.Default.remember)
  189. {
  190. textBox1.Text = Properties.Settings.Default.user;
  191. textBox2.Text = Properties.Settings.Default.pass;
  192. checkBox1.Checked = true;
  193. }
  194. }
  195.  
  196. private void Login_FormClosed(object sender, FormClosedEventArgs e)
  197. {
  198. if (!close)
  199. {
  200. Application.Exit();
  201. Environment.Exit(0);
  202. }
  203. }
  204.  
  205. private void checkBox1_CheckedChanged(object sender, EventArgs e)
  206. {
  207. if(!checkBox1.Checked)
  208. {
  209. Properties.Settings.Default.user = "";
  210. Properties.Settings.Default.pass = "";
  211. Properties.Settings.Default.remember = false;
  212. Properties.Settings.Default.Save();
  213. }
  214. }
  215. }
  216. }
Add Comment
Please, Sign In to add comment