Question
(Crack the password) This is for you security people out there. Use code from (a prior assignment) to generate a random numeric password. Write a
(Crack the password) This is for you security people out there.
Use code from (a prior assignment) to generate a random numeric password. Write a program that uses brute force (tries different combinations until it finds the correct one) to find the password. *** DO NOT use break in your loops!
I included the code I used to generate the password in the prior assignment. I now need code to brute force a password from the code and display the number of tries the output should look like this in the end.
Enter Password Length 1 - 9: 4 Secret Password ->2535
Found Password ->2535 Tries ->1536
(Code from prior assignment below)
package javaapplication1;
import java.util.scanner; public class JavaApplication1 { public static void main(String[] args) { Scanner sc=new Scanner(System.in); System.out.print("Enter Password Length (1-9): "); int n=sc.nextInt(); int min=0,max=0,i,pass=0; String op="1"; if(n>=1 && n<=9) { for(i=1;i } } ============================
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started