This is the spec:
Specification
Design and implement a program, crack, that cracks passwords.
Implement your program in a file called crack.c in a directory called crack.
Your program should accept a single command-line argument: a hashed password.
If your program is executed without any command-line arguments or with more than one command-line argument, your program should print an error (of your choice) and exit immediately, with main returning 1 (thereby signifying an error).
Otherwise, your program must proceed to crack the given password, ideally as quickly as possible, ultimately printing the password in the clear followed by \n, nothing more, nothing less, with main returning 0.
Assume that each password has been hashed with C’s DES-based (not MD5-based) crypt function.
Assume that each password is no longer than (gasp) four characters
Assume that each password is composed entirely of alphabetical characters (uppercase and/or lowercase).
I read the man page for crypt, and now i'm more confused. I don't want to cross any lines of integrity, so before I give up, I thought I might ask here to see if someone's going to tell me that this looks way harder than it is.
thanks