1/* 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 6 * and upwards. 7 */ 8 9#include "packer.h" 10 11int 12main(argc, argv) 13 int argc; 14 char *argv[]; 15{ 16 int32 i; 17 PWDICT *pwp; 18 char buffer[STRINGSIZE]; 19 20 if (argc <= 1) 21 { 22 fprintf(stderr, "Usage:\t%s dbname\n", argv[0]); 23 return (-1); 24 } 25 26 if (!(pwp = PWOpen (argv[1], "r"))) 27 { 28 perror ("PWOpen"); 29 return (-1); 30 } 31 32 for (i=0; i < PW_WORDS(pwp); i++) 33 { 34 register char *c; 35 36 if (!(c = (char *) GetPW (pwp, i))) 37 { 38 fprintf(stderr, "error: GetPW %d failed\n", i); 39 continue; 40 } 41 42 printf ("%s\n", c); 43 } 44 45 return (0); 46} 47