1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
/*
* This program is copyright Alec Muffett 1993, portions copyright other authors.
* The authors disclaim all responsibility or liability with respect to it's usage
* or its effect upon hardware or computer systems.
*/
#include <stdio.h>
#define IN_CRACKLIB
#include "config.h"
#include "crack.h"
#include "packer.h"
int
main(argc, argv)
int argc;
char *argv[];
{
uint32_t i;
PWDICT *pwp;
if (argc <= 1)
{
fprintf(stderr, "Usage:\t%s dbname\n", argv[0]);
return (-1);
}
if (!(pwp = PWOpen (argv[1], "r")))
{
perror ("PWOpen");
return (-1);
}
for (i=0; i < PW_WORDS(pwp); i++)
{
register char *c;
if (!(c = (char *) GetPW (pwp, i)))
{
fprintf(stderr, "error: GetPW %d failed\n", i);
continue;
}
printf ("%s\n", c);
}
return (0);
}
|