Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- using System.Threading;
- using System.Runtime.CompilerServices;
- namespace MFJC
- {
- public partial class Login : Form
- {
- bool close = false;
- bool isConnecting = false;
- public Login()
- {
- InitializeComponent();
- }
- private delegate void closeFormDelegate();
- private void closeForm()
- {
- Close();
- }
- private void loginThreadMethod()
- {
- //label3.Visible = true;
- //Thread.Sleep(100);
- //label1.Visible = false;
- //label2.Visible = false;
- //textBox1.Visible = false;
- //textBox2.Visible = false;
- //checkBox1.Visible = false;
- //button1.Visible = false;
- String login = "";
- try
- {
- login = MFJCServer.GetLoginString(textBox1.Text, textBox2.Text);
- } catch (Exception e) {
- showInternetNotConnectedMessage();
- return;
- }
- if (login == "1")
- {
- 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");
- //label1.Visible = true;
- //label2.Visible = true;
- //textBox1.Visible = true;
- //textBox2.Visible = true;
- //checkBox1.Visible = true;
- //button1.Visible = true;
- //label3.Visible = false;
- isConnecting = false;
- return;
- }
- if (login == "0")
- {
- //label1.Visible = true;
- //label2.Visible = true;
- //textBox1.Visible = true;
- //textBox2.Visible = true;
- //checkBox1.Visible = true;
- //button1.Visible = true;
- //label3.Visible = false;
- 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");
- isConnecting = false;
- return;
- }
- if (login == "5")
- {
- //label1.Visible = true;
- //label2.Visible = true;
- //textBox1.Visible = true;
- //textBox2.Visible = true;
- //checkBox1.Visible = true;
- //button1.Visible = true;
- //label3.Visible = false;
- 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");
- isConnecting = false;
- return;
- }
- String[] license = login.Split("|".ToCharArray());
- String subscription = license[0];
- String subexpire = license[1];
- String credits = license[2];
- String concurrent = license[3];
- String attacks = license[4];
- String API = license[5];
- String Services = license[6];
- Program.user = textBox1.Text;
- Program.pass = textBox2.Text;
- Program.api = API;
- Program.attacks = attacks;
- String[] current = concurrent.Split("/".ToCharArray());
- Program.conc = current[1];
- Program.subs = subscription;
- Program.subexp = subexpire;
- Program.attacks = attacks;
- Program.services = Services;
- Program.credits = credits;
- List<string> ls = new List<string>();
- if (current[0] != "0") for (int i = 1; i <= Convert.ToInt16(current[0]); i++) ls.Add(license[6 + i]);
- //if (textBox1.Text != "mfjc" || textBox2.Text != "password")
- //{
- // MessageBox.Show("Please recheck your login credentials.", "MyStresser");
- // return;
- //}
- String catks = "";
- foreach (string asdf in ls) catks = catks + "\n" + asdf;
- MessageBox.Show("Subscribed to: " + subscription + "\nSubscribed until: " + subexpire + "\nCredits: " + credits + "\nConcurrent = " + concurrent + "\nattacks = " + attacks + "\nAPI: " + API + "\nServices: " + Services + catks, "MyStresser");
- MessageBox.Show("Welcome, " + textBox1.Text + "!", "MyStresser");
- if (current[0] == "0" || current[0] == "1")
- {
- Main main = new Main();
- main.Show();
- }
- else
- {
- Multiple multiple = new Multiple(ls);
- multiple.Show();
- }
- close = true;
- if (this.InvokeRequired)
- {
- closeFormDelegate del = closeForm;
- Invoke(del);
- }
- else
- {
- Close();
- }
- isConnecting = false;
- }
- private void showInternetNotConnectedMessage()
- {
- MessageBox.Show("A connection to MyStresser could not be established. Please check your internet connection.", "MyStresser");
- isConnecting = false;
- }
- [MethodImpl(MethodImplOptions.Synchronized)]
- private void button1_Click(object sender, EventArgs e)
- {
- if (isConnecting)
- {
- return;
- }
- isConnecting = true;
- if (!InternetCheck.isInternetConnected())
- {
- showInternetNotConnectedMessage();
- return;
- }
- if (checkBox1.Checked)
- {
- Properties.Settings.Default.user = textBox1.Text;
- Properties.Settings.Default.pass = textBox2.Text;
- Properties.Settings.Default.remember = true;
- }
- else
- {
- Properties.Settings.Default.user = "";
- Properties.Settings.Default.pass = "";
- Properties.Settings.Default.remember = false;
- }
- Properties.Settings.Default.Save();
- if (textBox1.Text.Length < 4 || textBox2.Text.Length < 4)
- {
- MessageBox.Show("These are invalid login details. Please try again.", "MyStresser");
- isConnecting = false;
- return;
- }
- Thread thread = new Thread(new ThreadStart(loginThreadMethod));
- thread.Start();
- }
- private void Form2_Load(object sender, EventArgs e)
- {
- if (Properties.Settings.Default.remember)
- {
- textBox1.Text = Properties.Settings.Default.user;
- textBox2.Text = Properties.Settings.Default.pass;
- checkBox1.Checked = true;
- }
- }
- private void Login_FormClosed(object sender, FormClosedEventArgs e)
- {
- if (!close)
- {
- Application.Exit();
- Environment.Exit(0);
- }
- }
- private void checkBox1_CheckedChanged(object sender, EventArgs e)
- {
- if(!checkBox1.Checked)
- {
- Properties.Settings.Default.user = "";
- Properties.Settings.Default.pass = "";
- Properties.Settings.Default.remember = false;
- Properties.Settings.Default.Save();
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment