private bool HandleUserInput() { var result = false; bool legalInput; // TODO: refactor this (verify, organize, catch exceptions). do { PrintCli(); legalInput = true; string userInput = Console.ReadLine(); string[] inputParts = userInput.Split(); switch (inputParts[0]) { case "start": _processor.ProcessPcaps(this._files); Console.SetCursorPosition(0, Console.CursorTop + 4); break; case "add-file": this._files.Add(userInput.Substring(9)); break; case "exit": result = true; break; case "show-passwords": PrintPasswords(); break; case "show-hashes": PrintHashes(); break; default: Console.WriteLine("Illegal Input."); legalInput = false; break; } }while (!legalInput); return(result); }
private void StartAnalyzing() { _processor.ProcessPcaps(this._files); Console.SetCursorPosition(0, Console.CursorTop + 5); }
private void runButton_Click(object sender, EventArgs e) { new Thread(() => _processor.ProcessPcaps(this._files)).Start(); }