/* Atanas Dimitrov USER1 Homework Assignment #3 CS6900 Dr. Li */ #include #include #include #include "./crypt.h" int main() { //this will be the output string from crypt char *password_enc; //set password to 00000000 initially char password[]={ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; int i, j, k,l=0; //counters etc. char letter='a'; //initial letter to try char *slt="AY"; //salt #1 //from a to z for (l=0; l<26; l++) { //from 1 to 8 bytes long for (i=0; i<8; i++) { //clear password memset(password, 0x0, 64); //set password to 1 letter i bytes long for (j=0; j<=i; j++) { password[j]=letter+l; } //encrypt the password if (strcmp(password_enc=crypt(password, slt), "AYyjN.wDnZKuc")==0) printf("%8s\n", password); fflush(stdout); } } exit(0); } /* rrrrrrrr = AYyjN.wDnZKuc PASSWORD FOR USER 1 is rrrrrrrr */