Esempio n. 1
0
        private void btnKerko_Click(object sender, EventArgs e)
        {
            try
            {
                txtRezultati.Text = formaKryesore.txtPassword.Text;
                string pass = ((FormaKryesore)formaKryesore).txtPassword.Text;

                //String toSearch = txtRezultati.Text;
                string toSearch   = pass;
                String pathSource = @"PasswordDictionary.txt";

                using (StreamReader sr = new StreamReader(pathSource))
                {
                    String line;
                    while ((line = sr.ReadLine()) != null)
                    {
                        if (line == toSearch)
                        {
                            // Console.ForegroundColor = ConsoleColor.Red;
                            txtRezultati.ForeColor = Color.Green;
                            //txtRezultati.Text = "Password is:  " + line.ToString();
                            txtRezultati.Text = line.ToString();
                            Decriptionform    = new FormaDekriptimi();
                            //formaKryesore.Hide();
                            //Decriptionform.Show();
                            break;
                        }
                        else
                        {
                            txtRezultati.ForeColor = Color.Red;
                            txtRezultati.Text      = "No match found !";
                            Decriptionform         = new FormaDekriptimi();
                            Decriptionform.Close();
                        }
                    }
                }
            }
            catch (Exception eX)
            {
                MessageBox.Show(eX.Message);
            }
        }
Esempio n. 2
0
        private void dESECBDecryptionToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormaDekriptimi dec = new FormaDekriptimi();

            dec.ShowDialog();
        }