My program is supposed to be a brute force password cracker (school assignment). The input arguments are as follows..
./crack threads keysize target
The program needs to check passwords of length keysize, but also need to check shorter ones. I am unsure of how to go about writing something that will just change one letter at a time, and then continue doing this.. (keysize max is going to 8)
Example..
keysize = 5, so a loop (I think) would need to modify something that is equal to "aaaaa" to "aaaab" to "aaaac", putting each result into crypt_r(), along with the salt (first two characters of target) until a match is found.
I'm using crypt_r because the next step is to add multi-threading.
Unsure if anything else is really needed to explain this question. Would be glad to clarify.