Question: Java: I need help with this Brute Force code for Information Security project. import java.util.Scanner; public class Brute { public static void main(String[] args) {

Java: I need help with this Brute Force code for Information Security project.

import java.util.Scanner;

public class Brute {

public static void main(String[] args) {

System.out.print("Please type in Password");

Scanner input = new Scanner(System.in);

String newinput = input + "";

String[] arr = newinput.split("");

int[] nums = new int[255];

for (int p = 0; p < 255; p++) {

Character.toString ((char) p);

int nums[] = p;

for (char i = ' '; i < nums.length; i++) {

for (int j = 0; j < arr.length; j++) {

if (i == arr[j]) {

System.out.print("Password is Met!");

}else {

System.out.print("The password is either unhackable or takes too long!");

}

}

}

}

}

}

--------------------------------------------

int nums[] = p;

Type mismatch: cannot convert from

int to int[]

if (i == arr[j])

incompatible operand types char and String

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!