private static void StartClient() { try { IPAddress ip = IPAddress.Parse("10.154.1.37"); IPEndPoint remoteEP = new IPEndPoint(ip, Port); client.BeginConnect(remoteEP, new AsyncCallback(ConnectCallback), client); ConnectDone.WaitOne(); List <UserInfoClearText> list = crack.RunCracking(); string answer = string.Empty; for (int i = 0; 1 < list.Count; i++) { answer = list[i].ToString(); } Send(client, answer); SendDone.WaitOne(); Receive(client); ReceiveDone.WaitOne(); crack.RunCracking(); Console.WriteLine("Response received : {0}", response); byte[] words = Encoding.ASCII.GetBytes(response); SaveFile(words); } catch (Exception e) { Console.WriteLine(e.ToString()); } }
static void Main() { Cracking cracker = new Cracking(); //cracker.RunCracking(); Thread myThread = new Thread(new ThreadStart(cracker.RunCracking())); Thread myThread2 = new Thread(new ThreadStart(cracker.RunCracking())); //Task.Factory.StartNew(() => cracker.RunCracking()); }
static void Main() { Cracking cracker = new Cracking(); cracker.RunCracking(); Console.ReadLine(); }
private async Task <List <UserInfoClearText> > DoHack(WorkInfo work) { Cracking crack = new Cracking(); List <UserInfoClearText> result = await Task.Run(() => crack.RunCracking(work)); return(result); }
static void Main() { Cracking cracker = new Cracking(); Console.WriteLine("---> Centralized:"); cracker.RunCracking(); Console.WriteLine(); Console.WriteLine("---> Simple (one threaded encryption) Pipeline:"); cracker.RunCrackingModified(1); Console.WriteLine(); Console.WriteLine("---> Master/Slave'd (10-threaded encryption) Pipeline:"); cracker.RunCrackingModified(10); Console.WriteLine(); Console.WriteLine("Program ended successfully!"); Console.ReadLine(); }