/// <summary> /// Main part of the program /// create a reference to PasswordList and AttackLogic /// Initiates the brute force attack /// </summary> private void AttackMainSequence() { PasswordList passwordList = new PasswordList(); AttackLogic attackLogic = new AttackLogic(); StartBruteForce(passwordList, attackLogic); }
/// <summary> /// Initiates the attack by calling the SimulateTextEntry method. /// </summary> /// <param name="passwordList"></param> /// <returns>returns false once no more input is available.</returns> internal bool DoAttack(PasswordList passwordList) { Console.WriteLine("Attack pewpew Laz0rz !!!"); Console.WriteLine("========================"); KeyboardSimulator keyboardSimulator = new KeyboardSimulator(inputSimulator); foreach (string pass in passwordList.passwordList) { keyboardSimulator.TextEntry(pass); inputSimulator.Keyboard.KeyPress(WindowsInput.Native.VirtualKeyCode.RETURN); } return(false); }
/// <summary> /// The main attack sequence /// </summary> /// <param name="passwordList">a reference to an isntance of class containing the list to use for the brute force</param> /// <param name="attackLogic">a reference to an instance of the class containing the attack logic</param> private void StartBruteForce(PasswordList passwordList, AttackLogic attackLogic) { bool doingAttack; do { attackLogic.MainAttackAnswerParser(); attackLogic.CountDown(); doingAttack = attackLogic.DoAttack(passwordList); }while (doingAttack); bool redo = AttackRedo(); if (redo) { StartBruteForce(passwordList, attackLogic); } }