create a program that will do a brute force attack to crack passwords. program should ask user for a password and program should fin the password. experiment with different sizes, maximum of 4 characters. try passwords with numbers and letters of alphabet in both lower and upper case.
also calculate how long it takes to crack a password.
function difftime(then, now) in <ctime.h> library may be used
If this is genuinely an assignment you've been given, then you must have had some kind of teaching on how to write a simple C++ program, to the point where your teacher thinks you're able to handle this assignment.
Think about it. Imagine the steps you might have to go through to do crack a password. Then start trying to write the code to achieve those steps. When you hit a specific problem, then post your code here, explain the problem, and we'll help.
> experiment with different sizes, maximum of 4 characters
> passwords with numbers and letters of alphabet in both lower and upper case.
Each character could be any one of 62 possibilities (26 lower case + 26 upper case + 10 digits)
If we have a password of four characters, the number of possibilities are 62 * 62 * 62 * 62 == 14776336
Brute force implies that these should be generated one by one till a match is found.