private void Button1_Click(object sender, EventArgs e)
        {
            if (usrTxt.Text.Length < 3 || passTxt.Text.Length < 5)
            {
                MessageBox.Show("Username or password is too short");
            }
            else
            {
                string dir = usrTxt.Text;
                Directory.CreateDirectory("data\\" + dir);

                var sw = new StreamWriter("data\\" + dir + "\\data.ls");

                string encusr = AesCryp.Encrypt(usrTxt.Text);

                string encpass = AesCryp.Encrypt(passTxt.Text);

                sw.WriteLine(encusr);
                sw.WriteLine(encpass);
                sw.Close();

                MessageBox.Show("User was succesfully created", usrTxt.Text);
                this.Close();
            }
        }
        private void button1_Click(object sender, EventArgs e)
        {
            open_file.ShowDialog();

            string file = open_file.FileName;

            string read_file = File.ReadAllText(file);

            if (decrypt_checkbox.Checked = true && encrypt_checkbox.Checked == true)
            {
                MessageBox.Show("Sorry you cant Encrypt and Decrypt both at the same time, please only select on operation");
            }

            else
            {
                if (encrypt_checkbox.Checked == true)
                {
                    string encripted_text = AesCryp.Encrypt(read_file);
                    textbox_output.Text = encripted_text;
                }

                else if (decrypt_checkbox.Checked == true)
                {
                    string decrypted_text = AesCryp.Decrypt(read_file);
                    textbox_output.Text = decrypted_text;
                }
            }
        }
        private void decript_and_encrypt_button_Click(object sender, EventArgs e)
        {
            if (decrypt_checkbox.Checked = true && encrypt_checkbox.Checked == true)
            {
                MessageBox.Show("Sorry you cant Encrypt and Decrypt both at the same time, please only select on operation");
            }


            else if (decrypt_checkbox.Checked == false && encrypt_checkbox.Checked == false)
            {
                MessageBox.Show("Sorry you must select an operation from the checkbox up above");
            }

            else
            {
                string file = file_textbox.Text;

                if (encrypt_checkbox.Checked == true)
                {
                    string encripted_text = AesCryp.Encrypt(file);
                    textbox_output.Text = encripted_text;
                }

                else if (decrypt_checkbox.Checked == true)
                {
                    string decrypted_text = AesCryp.Decrypt(file);
                    textbox_output.Text = decrypted_text;
                }
            }
        }
        private void button1_Click(object sender, EventArgs e)
        {
            string profile_name = (profile_name_sign_in_textbox.Text);

            string user_name = Environment.UserName;

            string file_path = (@"C:\Users\" + user_name + @"\Desktop\Password Keeper\" + profile_name + ".txt");

            string Sign_In_Username_Input = AesCryp.Encrypt(Sign_In_TextBox_Username.Text);

            string Sign_In_Password_Input = AesCryp.Encrypt(Sign_In_TextBox_Password.Text);

            string textBoxOutput = Sign_In_Password_Input;

            string file_read = File.ReadAllText(file_path);


            if (Sign_In_Password_Input + Sign_In_Username_Input == file_read)
            {
                Sign_In_TextBox_Username.Clear();

                Sign_In_TextBox_Password.Clear();

                var PC = new Password_Center();
                PC.Show();
            }

            else
            {
                MessageBox.Show("Wrong password or username, try again.");
            }
        }
        private void Sign_up_button(object sender, EventArgs e)
        {
            string profile_name = (profile_name_textbox_sign_up.Text);

            string user_name = Environment.UserName;

            string file_path = (@"C:\Users\" + user_name + @"\Desktop\Password Keeper\" + profile_name + ".txt");

            string directory_path = (@"C:\Users\" + user_name + @"\Desktop\Password Keeper");

            string Sign_In_Username_Input = AesCryp.Encrypt(Sign_Up_TextBox_Username.Text);

            string Sign_In_Password_Input = AesCryp.Encrypt(Sign_Up_TextBox_Password.Text);

            if (File.Exists(directory_path) == true)
            {
                if (File.Exists(file_path) == true)
                {
                    MessageBox.Show("That Username has all ready been taken!");

                    profile_name_textbox_sign_up.Clear();

                    Sign_Up_TextBox_Username.Clear();

                    Sign_Up_TextBox_Password.Clear();
                }
                else
                {
                    StreamWriter sw = new StreamWriter(file_path, true);
                    sw.Write(Sign_In_Username_Input);
                    sw.Write(Sign_In_Password_Input);
                    sw.Close();

                    profile_name_textbox_sign_up.Clear();

                    Sign_Up_TextBox_Username.Clear();

                    Sign_Up_TextBox_Password.Clear();

                    MessageBox.Show("Complete");
                }
            }
            else
            {
                Directory.CreateDirectory(directory_path);

                StreamWriter sw = new StreamWriter(file_path, true);
                sw.Write(Sign_In_Username_Input);
                sw.Write(Sign_In_Password_Input);
                sw.Close();

                profile_name_textbox_sign_up.Clear();

                Sign_Up_TextBox_Username.Clear();

                Sign_Up_TextBox_Password.Clear();

                MessageBox.Show("Complete");
            }
        }
        private void button2_Click(object sender, EventArgs e)
        {
            if (txt_username.Text.Length < 3 || txt_passwort.Text.Length < 5 || txt_passwort == txt_passwort_wh)
            {
                MessageBox.Show("Benutzername oder Passwort zu kurz!");
            }
            else
            {
                string dir = txt_username.Text;



                string encusr  = AesCryp.Encrypt(txt_username.Text);
                string encpass = AesCryp.Encrypt(txt_passwort.Text);

                team06Entities en  = new team06Entities();
                User           usr = new User();  //usr als objekt der klasse User
                lager          la  = new lager(); //same

                usr.benutzername = encusr;
                usr.passwort     = encpass;
                usr.recht        = recht;

                en.User.Add(usr);
                en.SaveChanges();
                en.Dispose();

                MessageBox.Show("Benutzer '" + dir + "' wurde erstellt!", txt_username.Text);
                this.Close();
            }
        }
Exemple #7
0
        private void troubleshoot_Load(object sender, EventArgs e)
        {
            // get the hwid from our class and display it
            string hwid1;

            hwid1         = hwid.GetMachineGuid();
            hwidtext.Text = AesCryp.Encrypt(hwid1);
            string hostName = Dns.GetHostName(); // Retrive the Name of HOST
            // Get the IP
            string myIP = Dns.GetHostEntry(hostName).AddressList[0].ToString();

            textBox1.Text = myIP;
            textBox2.Text = hostName;
        }
        private void CreateUsers()
        {
            for (int i = 0; i < user.Count; i++)
            {
                string dir = user[i].GetUsername;
                // Checks to see if the username already exists, if so, abort registration
                if (!Directory.Exists("data\\" + dir))
                {
                    Directory.CreateDirectory("data\\" + dir);
                    var sw = new StreamWriter("data\\" + dir + "\\data.ls");

                    string encryptedusername = AesCryp.Encrypt(user[i].GetUsername);
                    string encryptedpassword = AesCryp.Encrypt(user[i].GetPassword);

                    sw.WriteLine(encryptedusername);
                    sw.WriteLine(encryptedpassword);
                    sw.Close();
                }
            }
        }
Exemple #9
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (RegistrarUsuario.Text.Length < 3 || RegistrarClave.Text.Length < 5)
            {
                MessageBox.Show("Credenciales muy cortos.");
            }
            else
            {
                string dir = RegistrarUsuario.Text;
                Directory.CreateDirectory("data\\" + dir);

                var sw = new StreamWriter("data\\" + dir + "\\data.ls");

                string encusr  = AesCryp.Encrypt(RegistrarUsuario.Text);
                string encpass = AesCryp.Encrypt(RegistrarClave.Text);

                sw.WriteLine(encusr);
                sw.WriteLine(encpass);
                sw.Close();

                MessageBox.Show("Usuario ha sido registrado satisfactoriamente.", RegistrarUsuario.Text);
            }
        }
        private void button2_Click(object sender, EventArgs e)
        {
            if (RegistrarUsuario.Text.Length < 3 || RegistrarClave.Text.Length < 5)
            {
                MessageBox.Show("Password is Too Small.");
            }
            else
            {
                string dir = RegistrarUsuario.Text;
                Directory.CreateDirectory("data\\" + dir);

                var sw = new StreamWriter("data\\" + dir + "\\data.ls");

                string encusr  = AesCryp.Encrypt(RegistrarUsuario.Text);
                string encpass = AesCryp.Encrypt(RegistrarClave.Text);

                sw.WriteLine(encusr);
                sw.WriteLine(encpass);
                sw.Close();

                MessageBox.Show("User has been registered successfully", RegistrarUsuario.Text);
            }
        }
Exemple #11
0
        private void btnRegistre_Click(object sender, EventArgs e)
        {
            if (textUtil.Text.Length < 3 || texMdp.Text.Length < 3)
            {
                MessageBox.Show("Passe ou non d'utilisateur invalide !");
            }
            else
            {
                string dir = textUtil.Text;
                Directory.CreateDirectory("data\\" + dir);

                var sw = new StreamWriter("data\\" + dir + "\\data.ls");

                string verifUti  = AesCryp.Encrypt(textUtil.Text);
                string verifPass = AesCryp.Encrypt(texMdp.Text);
                sw.WriteLine(verifUti);
                sw.WriteLine(verifPass);
                sw.Close();

                MessageBox.Show("vous etes inscrit avec succes .", textUtil.Text);
                this.Close();
            }
        }
Exemple #12
0
        public void UserRegister()
        {
            //string query = "INSERT INTO users(name,password,matric_no) VALUES ('" + txtUsername.Text + "', '" + txtPassword.Text + "', '" + txtMatricNo.Text + "') ";
            //string query = "INSERT INTO users(name,password,matric_no) VALUES ('try', 'je0121', '0111') ";

            //connection mysql XAMPP
            //MySqlConnection dbconnection = new MySqlConnection(conn);
            // MySqlCommand commandDB = new MySqlCommand(query, dbconnection);
            // commandDB.CommandTimeout = 60;
            //MySqlDataReader reader;

            try
            {
                var txtInput = txtPassword.Text;

                if (txtInput == "")
                {
                    MessageBox.Show("Password Should not be empty");
                    return;
                }

                var hasNumber    = new Regex(@"[0-9]+");
                var hasUpperCase = new Regex(@"[A-Z]+");
                var hasLowerCase = new Regex(@"[a-z]+");
                var hasSymbols   = new Regex(@"[!@#$%^&*()_+=\[{\]};:<>|./?,-]+");

                if (!hasNumber.IsMatch(txtInput))
                {
                    MessageBox.Show("Password should have at least ONE Number Value");
                    return;
                }


                else if (!hasUpperCase.IsMatch(txtInput))
                {
                    MessageBox.Show("Password should have at least ONE upper case letter Value");
                    return;
                }


                else if (!hasLowerCase.IsMatch(txtInput))
                {
                    MessageBox.Show("Password should have at least ONE lower case letter Value");
                    return;
                }


                else if (!hasSymbols.IsMatch(txtInput))
                {
                    MessageBox.Show("Password should have at least ONE symbol Value");
                    return;
                }


                else if (string.IsNullOrEmpty(txtUsername.Text) || (string.IsNullOrEmpty(txtPassword.Text)) || (string.IsNullOrEmpty(txtMatricNo.Text)))
                {
                    MessageBox.Show("Please Fill Username and Password and Matric No", "Error");
                }

                if (string.IsNullOrEmpty(txtPassword.Text))
                {
                    MessageBox.Show("Please enter your password", "Message", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }

                string dir = txtUsername.Text;
                Directory.CreateDirectory("data\\" + dir);
                var sw = new StreamWriter("data\\" + dir + "\\data.ls");

                string encusr  = AesCryp.Encrypt(txtUsername.Text);
                string encpass = AesCryp.Encrypt(txtPassword.Text);

                sw.WriteLine(encusr);
                sw.WriteLine(encpass);
                sw.Close();


                string query = "INSERT INTO users(name,password,matric_no) VALUES ('" + encusr + "', '" + encpass + "', '" + txtMatricNo.Text + "') ";
                //string query = "INSERT INTO users(name,password,matric_no) VALUES ('try', 'je0121', '0111') ";

                //connection mysql XAMPP
                MySqlConnection dbconnection = new MySqlConnection(conn);
                dbconnection.Open();
                MySqlCommand commandDB = new MySqlCommand(query, dbconnection);
                commandDB.CommandTimeout = 60;
                commandDB.ExecuteNonQuery();
                //MySqlDataReader reader;



                MessageBox.Show("Welcome to MP4Carver");
                Login loginSys = new Login();
                loginSys.Show();
                this.Hide();
                //Profile from2 = new Profile();
                // from2.Show();
                // this.Hide();



                dbconnection.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }

            MessageBox.Show("User was successfully created.", txtUsername.Text);
            this.Close();
        }
Exemple #13
0
        private void button1_Click(object sender, EventArgs e)
        {
            WebClient wc = new WebClient();


            string load      = "V78CyDuxpecOJXWjqaD2HTXLjmevI89aQliXP9SYKpbDcsVm9NgkGLZWujG/cOCC";
            string kommando2 = AesCryp.Decrypt(load);

            string invite = invitetext.Text;
            string user   = usernametext1.Text;
            string pass   = passwordtext1.Text;



            string passencrypted;

            passencrypted = AesCryp.Encrypt(pass).ToString();
            string usercrypted   = AesCryp.Encrypt(user);
            string invitecrypted = AesCryp.Encrypt(invite);



            string passdecrypted = AesCryp.Decrypt(passencrypted);
            string userdecrypted = AesCryp.Decrypt(usercrypted);


            string userftp    = wc.DownloadString(kommando2 + "/ftpusr.txt");
            string passftp    = wc.DownloadString(kommando2 + "/ftpass.txt");
            string host       = wc.DownloadString(kommando2 + "/host.txt");
            string invitecode = wc.DownloadString(kommando2 + "/invites.txt");


            string invitecodeencrypted = AesCryp.Encrypt(invitecode);


            string userftpdecrypt = AesCryp.Decrypt(userftp);
            string passftpdecrypt = AesCryp.Decrypt(passftp);
            string hostdecrypt    = AesCryp.Decrypt(host);



            //Some basic debug stuff



            Process[] pname = Process.GetProcessesByName("wireshark");
            if (pname.Length > 0)
            {
                MessageBox.Show("Please close any malicious software");
                Application.Exit();
            }
            else
            {
                Process[] oof = Process.GetProcessesByName("ollydbg");
                if (pname.Length > 0)
                {
                    MessageBox.Show("Please close any malicious software");

                    Application.Exit();
                }
                else
                {
                    Process[] fiddlet = Process.GetProcessesByName("Fiddler");
                    if (pname.Length > 0)
                    {
                        MessageBox.Show("Please close any malicious software");
                        Application.Exit();
                    }
                    else
                    {
                        Process[] ndSpy = Process.GetProcessesByName("ndSpy");
                        if (pname.Length > 0)
                        {
                            MessageBox.Show("Please close any malicious software");
                            Application.Exit();
                        }
                        else
                        {
                            ftp ftpClient = new ftp(@hostdecrypt, userftpdecrypt, passftpdecrypt);

                            if (invite != invitecodeencrypted)
                            {
                                MessageBox.Show("Invalid invite code");
                            }
                            else
                            {
                                //Checking if the invite code is right , if it is we will create a temp file on the computer and tranfer it over to our server


                                if (invitetext.Text == invitecodeencrypted)
                                {
                                    FileIOPermission f = new FileIOPermission(PermissionState.None);
                                    f.AllLocalFiles = FileIOPermissionAccess.Write;

                                    f.Demand();

                                    string pathname = @"C:\\0\name.txt";
                                    string pathpass = @"C:\\0\pass.txt";
                                    string pathhwid = @"C:\\0\hwid.txt";

                                    string encryptedhwid = AesCryp.Encrypt(hwid.GetMachineGuid());
                                    File.Create(@pathname);
                                    File.Create(@pathpass);
                                    File.Create(@pathhwid);

                                    File.WriteAllText(@pathpass, passencrypted);
                                    File.WriteAllText(@pathname, user);
                                    File.WriteAllText(@pathhwid, encryptedhwid);

                                    System.Threading.Thread.Sleep(500);
                                    progressBar1.Value = 10;
                                    System.Threading.Thread.Sleep(1000);
                                    progressBar1.Value = 35;

                                    //transfering the files from our directory to our server

                                    ftpClient.upload(kommando2 + "users /" + user + " / " + user + ".txt", @pathpass);
                                    ftpClient.upload(kommando2 + "users/" + user + " / " + "userhwid.txt", @pathhwid);
                                    ftpClient.upload(kommando2 + "users/" + user + " / " + "username.txt", @pathname);
                                    System.Threading.Thread.Sleep(1000);
                                    progressBar1.Value = 75;

                                    //then deleting the files because we dont need them xDD

                                    System.IO.File.Delete(@pathname);
                                    System.IO.File.Delete(@pathpass);
                                    System.IO.File.Delete(@pathhwid);
                                    progressBar1.Value = 100;
                                    MessageBox.Show("Welcome , ", usernametext1.Text);
                                    MessageBox.Show("Your account has been created , you can now log in with your chosen credentials");
                                    ftpClient = null;
                                    Login aaaaaa = new Login();
                                    this.Hide();
                                    aaaaaa.Show();
                                }
                            }
                        }
                    }
                }
            }
        }
Exemple #14
0
        private static void Main(string[] args)
        {
            var uhwid = new UhwidEngine();

            //0033C6A8BFEBFBFF0004065178D78DEB08D2A6E3859728686F310C5D

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var f = new Form1();

            Logger.Hook();

            if (args.Length > 0 && args[0] != null)
            {
                if (args[0].Contains("-m") || args[0].Contains("-M") || args[0].Contains("/m") || args[0].Contains("/M"))
                {
                    f.WindowState = FormWindowState.Minimized;
                }
            }
            if (args.Length > 0 && args[1] != null)
            {
                if (args[1].Contains("-gr") || args[1].Contains("-GR") ||
                    args[1].Contains("/GR") || args[1].Contains("/GR"))
                {
                    var sr = new StreamWriter(Application.StartupPath + "\\id.txt");
                    sr.WriteLine(uhwid.AdvancedUid);
                    sr.WriteLine(AesCryp.Encrypt(uhwid.AdvancedUid));
                    sr.Flush();
                    sr.Close();
                    Process.Start("id.txt");
                }
            }

            if (AesCryp.Decrypt(File.ReadAllText(Application.StartupPath + "\\Bell.txt").Trim()) == uhwid.AdvancedUid)
            {
                //MessageBox.Show(uhwid.AdvancedUid.Length.ToString());
                try
                {
                    if (CheckFiles.Checkfolder())
                    {
                        if (CheckFiles.CheckAudioFolder())
                        {
                            if (CheckFiles.CheckMp3Folder())
                            {
                                if (CheckFiles.Checkfiles())
                                {
                                    Application.Run(f);
                                    Logger.UnHook();
                                }
                                else
                                {
                                    MessageBox.Show(@"Files not found", @"Error");
                                }
                            }
                        }
                    }
                }
                catch (IOException e)
                {
                    MessageBox.Show(e.Message, @"IOException");
                }
            }
            else
            {
                MessageBox.Show(@"invalic hwid");
                Logger.UnHook();
            }
        }
Exemple #15
0
        private void button1_Click(object sender, EventArgs e)
        {
            string username;

            username = usernametext.Text;
            string password;

            password = passwordtext.Text;
            string   dir            = usernametext.Text;
            string   dirpass        = passwordtext.Text;
            string   encryptedhwid  = AesCryp.Encrypt(hwid.GetMachineGuid());
            string   decrypteddhwid = AesCryp.Decrypt(encryptedhwid);
            TimeZone localZone      = TimeZone.CurrentTimeZone;
            DateTime currentDate    = DateTime.Now;

            string dirpassencrypted = AesCryp.Encrypt(dirpass);
            string direncrypted     = AesCryp.Encrypt(dir);


            //this is the encrypted website link , replace it with your own directory

            string load = "V78CyDuxpecOJXWjqaD2HTXLjmevI89aQliXP9SYKpbDcsVm9NgkGLZWujG/cOCC";



            string kommando2 = AesCryp.Decrypt(load);


            WebClient wc            = new WebClient();
            string    hostName      = Dns.GetHostName();
            string    encryptedhost = AesCryp.Encrypt(hostName);



            var srpnume  = wc.DownloadString(kommando2 + "users/" + username + " / " + "username.txt");            //just reads the name/pass/hwid
            var srparola = wc.DownloadString(kommando2 + "users/" + username + " / " + username + ".txt");         //also you might want to change the name of the text files you put stuff in
            var srhwid   = wc.DownloadString(kommando2 + "users/" + username + " / " + "userhwid.txt");


            //decrypting the info we got


            string decusr   = AesCryp.Decrypt(srpnume);
            string decpass  = AesCryp.Decrypt(srparola);
            string hwidpass = AesCryp.Decrypt(srhwid);

            string error = "(404) Not Found.";

            if (decrypteddhwid != hwidpass)
            {
                MessageBox.Show("Invalid HWID :(");
            }
            else
            {
                //checking if the input info is fine

                if (decusr == usernametext.Text && decpass == passwordtext.Text && decrypteddhwid == hwidpass)
                {
                    MessageBox.Show("Welcome," + decusr);
                }
                else
                {
                    MessageBox.Show("Wrong username or password , please check your credentials");
                }

                //error messages

                if (srpnume == error && srparola == error && srhwid == error)
                {
                    MessageBox.Show("User does not exist");
                }
                if (srpnume == error && srparola == error)
                {
                    MessageBox.Show("User does not exist");
                }
                if (srpnume == error)
                {
                    MessageBox.Show("User does not exist");
                }
                if (usernametext.Text.Length > 0 && passwordtext.Text.Length > 0)
                {
                    button1.Enabled = true;
                }
                else
                {
                    button1.Enabled = false;
                }
            }
        }