Question: 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

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 ARRAY OR BREAK IN YOUR LOOPS!

I included the code I used to generate the password in the prior assignment.

Enter Password Length 1 - 9: 4 Secret Password ->2535

Found Password ->2535 Tries ->1536

Previous assignment bellow

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!