2 * This program is copyright Alec Muffett 1993. The author disclaims all
3 * responsibility or liability with respect to it's usage or its effect
4 * upon hardware or computer systems, and maintains copyright as set out
5 * in the "LICENCE" document which accompanies distributions of Crack v4.0
10 * Modified as part of the krb5-strength project as follows:
12 * 2009-10-14 Russ Allbery <rra@stanford.edu>
13 * - Add ANSI C protototypes for all functions.
14 * 2010-03-14 Russ Allbery <rra@stanford.edu>
15 * - Use unsigned long instead of int32 to avoid printf warnings.
21 main(int argc, char *argv[])
26 char buffer[STRINGSIZE];
30 fprintf(stderr, "Usage:\t%s dbname\n", argv[0]);
34 if (!(pwp = PWOpen(argv[1], "w")))
42 for (readed = 0; fgets(buffer, STRINGSIZE, stdin); /* nothing */)
46 buffer[MAXWORDLEN - 1] = '\0';
52 fprintf(stderr, "skipping line: %lu\n", readed);
56 if (PutPW(pwp, buffer))
58 fprintf(stderr, "error: PutPW '%s' line %luy\n", buffer, readed);
66 printf("%lu %lu\n", readed, wrote);