1 /* cac.c - crypt and compare
11 int main(int argc, char *argv[]) {
17 printf("usage: %s <shadow-file> <password>\n",argv[0]);
21 file_h=fopen(argv[1],"r");
23 printf("error: cant open %s for reading\n",argv[1]);
26 printf("reading %s\n",argv[1]);
29 while(fgets(temp,256,file_h)) {
30 if(strstr(temp,"root")) {
31 /* none md5 way ... */
33 if(strncmp(crypt(argv[2],(temp+5)),(temp+5),13)==0)
34 printf("succes: %s\n",argv[2]);
35 else printf("wrong\n");