Exemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            #region AES

            string line       = File.ReadLines("Users\\" + label4.Text + "\\salt.txt").Skip(1).Take(1).First();
            string DecryptKey = AesCryp.Decrypt(line);

            AesCryp.Key = DecryptKey;
            string ProviderAes = AesCryp.Encrypt(textBox1.Text);
            string EmailAes    = AesCryp.Encrypt(textBox2.Text);
            string PasswordAes = AesCryp.Encrypt(textBox3.Text);
            AesCryp.Key = "5j2gfx0y5m9mb1x6ejtz384p9b4hf5nq";

            #endregion AES

            #region CreateCombo

            string Dir = ("Users\\" + label4.Text + "\\Combos" + "\\" + textBox1.Text + " - " + textBox2.Text + ".txt");

            if (File.Exists(Dir))
            {
                MessageBox.Show("Combo Already Exists");
            }
            else
            {
                File.WriteAllText(Dir, EmailAes + " " + PasswordAes);

                MessageBox.Show("Combo Successfully Added");
            }

            #endregion CreateCombo
        }
Exemplo n.º 2
0
        private void button3_Click(object sender, EventArgs e)
        {
            #region AES

            string line       = File.ReadLines("Users\\" + label3.Text + "\\salt.txt").Skip(1).Take(1).First();
            string EncryptKey = AesCryp.Decrypt(line);

            AesCryp.Key = EncryptKey;
            string EmailAes    = AesCryp.Encrypt(textBox1.Text);
            string PasswordAes = AesCryp.Encrypt(textBox2.Text);
            AesCryp.Key = "5j2gfx0y5m9mb1x6ejtz384p9b4hf5nq";

            #endregion AES

            #region CreateCombo

            string Dir = ("Users\\" + label3.Text + "\\Combos" + "\\" + this.Text + " - " + textBox1.Text + ".txt");

            File.Delete("Users\\" + label3.Text + "\\Combos" + "\\" + this.Text + " - " + Email.Text + ".txt");

            File.WriteAllText(Dir, EmailAes + " " + PasswordAes);
            MessageBox.Show("Combo Successfully Added");

            button3.Enabled = false;
            button3.Visible = false;

            #endregion CreateCombo
        }
Exemplo n.º 3
0
        private void button2_Click(object sender, EventArgs e)
        {
            #region ImportPHP

            Stream         myStream  = null;
            OpenFileDialog theDialog = new OpenFileDialog();
            theDialog.Title            = "Open Text File";
            theDialog.Filter           = "TXT files|*.txt";
            theDialog.InitialDirectory = @"C:\";
            if (theDialog.ShowDialog() == DialogResult.OK)
            {
                string[] ReadLine  = File.ReadAllLines(theDialog.FileName);
                int      Worked    = 0;
                int      DidntWork = 0;

                foreach (string line in ReadLine)
                {
                    var splitt = line.Split(new string[] { "," }, StringSplitOptions.None);

                    string ReadKey    = File.ReadLines("Users\\" + label4.Text + "\\salt.txt").Skip(1).Take(1).First();
                    string EncryptKey = AesCryp.Decrypt(ReadKey);
                    AesCryp.Key = EncryptKey;
                    string Username = AesCryp.Encrypt(splitt[1]);
                    string Password = AesCryp.Encrypt(splitt[2]);
                    string Name     = AesCryp.Encrypt(splitt[4]);

                    AesCryp.Key = "5j2gfx0y5m9mb1x6ejtz384p9b4hf5nq";

                    string Dir = ("Users\\" + label4.Text + "\\Combos" + "\\" + splitt[4] + " - " + splitt[1] + ".txt");

                    if (File.Exists(Dir))
                    {
                        DidntWork++;
                    }
                    else if (splitt[1] == "" || splitt[2] == "" || splitt[4] == "")
                    {
                        DidntWork++;
                    }
                    else
                    {
                        File.WriteAllText(Dir, Username + " " + Password);

                        Worked++;
                    }
                }

                MessageBox.Show("Successfully Imported: " + Worked + " Accounts  (" + DidntWork + " Were not Imported!)");
            }

            #endregion ImportPHP
        }
Exemplo n.º 4
0
        private void button1_Click(object sender, EventArgs e)
        {
            #region AES

            string usrencrypted = AesCryp.Encrypt(textBox1.Text);

            #endregion AES

            #region MD5

            string username        = usrencrypted;
            byte[] encodedPassword = new UTF8Encoding().GetBytes(username);
            byte[] hash            = ((HashAlgorithm)CryptoConfig.CreateFromName("MD5")).ComputeHash(encodedPassword);
            string encoded         = BitConverter.ToString(hash).Replace("-", string.Empty).ToLower();

            #endregion MD5

            #region DecryptAES

            string line       = File.ReadLines("Users\\" + encoded + "\\salt.txt").Skip(1).Take(1).First();
            string reset      = File.ReadAllText("Users\\" + encoded + "\\reset.txt");
            string DecryptKey = AesCryp.Decrypt(line);

            AesCryp.Key = DecryptKey;
            string pwdencrypted = AesCryp.Encrypt(textBox3.Text);
            AesCryp.Key = "5j2gfx0y5m9mb1x6ejtz384p9b4hf5nq";

            #endregion DecryptAES

            #region Salt

            string readSalt    = File.ReadLines("Users\\" + encoded + "\\salt.txt").Skip(0).Take(1).First();
            string decryptSalt = AesCryp.Decrypt(readSalt);
            int    x           = 0;
            Int32.TryParse(decryptSalt, out x);

            SaltHash usr            = new SaltHash(pwdencrypted, x);
            string   strHashedReset = usr.ComputeSaltedHash();

            #endregion Salt

            if (strHashedReset == reset)
            {
                if (textBox2.Text == "")
                {
                    MessageBox.Show("You have to choose a new Password!");
                }
                else
                {
                    #region AES

                    string ReadLine    = File.ReadLines("Users\\" + encoded + "\\salt.txt").Skip(1).Take(1).First();
                    string DecryptLine = AesCryp.Decrypt(ReadLine);

                    AesCryp.Key = DecryptLine;
                    string PasswordEncrypted = AesCryp.Encrypt(textBox2.Text);
                    AesCryp.Key = "5j2gfx0y5m9mb1x6ejtz384p9b4hf5nq";

                    #endregion AES

                    #region SaltHash

                    string readSalt1    = File.ReadAllText("Users\\" + encoded + "\\salt.txt");
                    string decryptSalt1 = AesCryp.Decrypt(readSalt);
                    int    i            = 0;
                    Int32.TryParse(decryptSalt, out i);

                    SaltHash pwd = new SaltHash(PasswordEncrypted, i);
                    string   strHashedPassword = pwd.ComputeSaltedHash();

                    #endregion SaltHash

                    File.WriteAllText("Users\\" + encoded + "\\password.txt", strHashedPassword);

                    MessageBox.Show("Password Successfully changed!");
                }
            }
            else
            {
                MessageBox.Show("Reset is Incorrect!");
            }
        }
Exemplo n.º 5
0
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                #region AES

                string usrencrypted = AesCryp.Encrypt(textBox1.Text);

                #endregion AES

                #region MD5

                string username        = usrencrypted;
                byte[] encodedPassword = new UTF8Encoding().GetBytes(username);
                byte[] hash            = ((HashAlgorithm)CryptoConfig.CreateFromName("MD5")).ComputeHash(encodedPassword);
                string encoded         = BitConverter.ToString(hash).Replace("-", string.Empty).ToLower();

                #endregion MD5

                #region ReadPasswordWithVibes

                string line       = File.ReadLines("Users\\" + encoded + "\\salt.txt").Skip(1).Take(1).First();
                string DecryptKey = AesCryp.Decrypt(line);

                AesCryp.Key = DecryptKey;
                string pwdencrypted = AesCryp.Encrypt(textBox2.Text);
                AesCryp.Key = "5j2gfx0y5m9mb1x6ejtz384p9b4hf5nq";

                #endregion ReadPasswordWithVibes

                #region Login&CheckDir

                string dirName = new DirectoryInfo(@"Users\" + encoded).Name;

                if (Directory.Exists(@"Users\" + encoded))
                {
                    if (encoded == dirName)
                    {
                        #region SaltHash

                        string line1   = File.ReadLines("Users\\" + encoded + "\\salt.txt").First();
                        string readpwd = File.ReadAllText("Users\\" + encoded + "\\password.txt");

                        string decryptSalt = AesCryp.Decrypt(line1);
                        int    x           = 0;
                        Int32.TryParse(decryptSalt, out x);

                        SaltHash pwd = new SaltHash(pwdencrypted, x);
                        string   strHashedPassword = pwd.ComputeSaltedHash();

                        SaltHash usr = new SaltHash(usrencrypted, x);
                        string   strHashedUsername = usr.ComputeSaltedHash();

                        string encryptUsername = AesCryp.Encrypt(strHashedUsername);

                        #endregion SaltHash

                        #region CheckUsername

                        string line3 = File.ReadLines("Users\\" + encoded + "\\salt.txt").Skip(2).Take(1).First();

                        #endregion CheckUsername

                        if (readpwd == strHashedPassword)
                        {
                            if (line3 == encryptUsername)
                            {
                                #region LoadMain

                                label3.Text = encoded;
                                Main main = new Main();
                                main.Text        = "Current User: "******"Password or Username incorrect!");
                            }
                        }
                        else
                        {
                            MessageBox.Show("Password or Username incorrect!");
                        }
                    }
                    else
                    {
                        return;
                    }
                }
                else
                {
                    MessageBox.Show("Password or Username incorrect!");
                }

                #endregion Login&CheckDir
            }
            catch
            {
                #region ErrorMessage

                MessageBox.Show("An Error occured!");

                #endregion ErrorMessage
            }
        }
Exemplo n.º 6
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text == "" || textBox2.Text == "" || textBox3.Text == "")
            {
                MessageBox.Show("Fields cannot be blank!");
            }
            else
            {
                #region AES

                string UserEncrypted = AesCryp.Encrypt(textBox1.Text);

                string GenerateAesKey = RandomString();
                AesCryp.Key = GenerateAesKey;
                string PasswordEncrypted = AesCryp.Encrypt(textBox2.Text);
                string ResetEncrypted    = AesCryp.Encrypt(textBox3.Text);
                AesCryp.Key = "5j2gfx0y5m9mb1x6ejtz384p9b4hf5nq";
                string EncryptedAesKey = AesCryp.Encrypt(GenerateAesKey);


                #endregion AES

                #region MD5

                string username        = UserEncrypted;
                byte[] encodedPassword = new UTF8Encoding().GetBytes(username);
                byte[] hash            = ((HashAlgorithm)CryptoConfig.CreateFromName("MD5")).ComputeHash(encodedPassword);
                string encoded         = BitConverter.ToString(hash).Replace("-", string.Empty).ToLower();

                #endregion MD5

                if (Directory.Exists(@"Users\" + encoded))
                {
                    #region UserExistsWindow

                    MessageBox.Show("User Already Exists");

                    #endregion UserExistsWindow
                }
                else
                {
                    #region CreateSaltFile

                    Directory.CreateDirectory(@"Users\" + encoded);

                    int    mySalt        = SaltHash.CreateRandomSalt();
                    string stringsalt    = mySalt.ToString();
                    string saltencrypted = AesCryp.Encrypt(stringsalt);

                    File.WriteAllText("Users\\" + encoded + "\\salt.txt", saltencrypted);

                    #endregion CreateSaltFile

                    #region SaltHash

                    string readSalt    = File.ReadAllText("Users\\" + encoded + "\\salt.txt");
                    string decryptSalt = AesCryp.Decrypt(readSalt);
                    int    x           = 0;
                    Int32.TryParse(decryptSalt, out x);

                    SaltHash usr = new SaltHash(UserEncrypted, x);
                    string   strHashedUsername = usr.ComputeSaltedHash();

                    SaltHash pwd = new SaltHash(PasswordEncrypted, x);
                    string   strHashedPassword = pwd.ComputeSaltedHash();

                    SaltHash rst            = new SaltHash(ResetEncrypted, x);
                    string   strHashedReset = rst.ComputeSaltedHash();

                    string encryptUsername = AesCryp.Encrypt(strHashedUsername);

                    #endregion SaltHash

                    #region Create&Write

                    File.WriteAllText("Users\\" + encoded + "\\password.txt", strHashedPassword);
                    File.WriteAllText("Users\\" + encoded + "\\reset.txt", strHashedReset);

                    File.AppendAllText("Users\\" + encoded + "\\salt.txt", Environment.NewLine);
                    File.AppendAllText("Users\\" + encoded + "\\salt.txt", EncryptedAesKey);

                    File.AppendAllText("Users\\" + encoded + "\\salt.txt", Environment.NewLine);
                    File.AppendAllText("Users\\" + encoded + "\\salt.txt", encryptUsername);

                    Directory.CreateDirectory("Users\\" + encoded + "\\Combos");

                    MessageBox.Show("User Created Succefully!");

                    #endregion Create&Write
                }
            }
        }