Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro SQL Server Administration

Authors: Peter Carter

1st Edition

1484207106, 9781484207109

More Books

Students also viewed these Databases questions

Question

What is meant by the term service recovery?

Answered: 1 week ago

Question

10. What is meant by a feed rate?

Answered: 1 week ago

Question

In an Excel Pivot Table, how is a Fact/Measure Column repeated?

Answered: 1 week ago