testcheck
packer
cracklib-packer
-create-cracklib-dict
+cracklib-check
Makefile
.libs
.deps
sbin_SCRIPTS = create-cracklib-dict cracklib-format
LDADD = ../lib/libcrack.la
-AM_CPPFLAGS = -I. -I.. -I$(top_srcdir)/lib
-cracklib-check_SOURCES = cracklib-check.c
-cracklib-check_LDADD = $(LDADD)
+AM_CPPFLAGS = -I. -I.. -I$(top_srcdir)/lib '-DDEFAULT_CRACKLIB_DICT="$(pkgdatadir)/pw_dict"'
-cracklib-packer_SOURCES = packer.c
-cracklib-packer_LDADD = $(LDADD)
+cracklib_check_SOURCES = check.c
+cracklib_check_LDADD = $(LDADD)
-cracklib-unpacker_SOURCES = unpacker.c
-cracklib-unpacker_LDADD = $(LDADD)
+cracklib_packer_SOURCES = packer.c
+cracklib_packer_LDADD = $(LDADD)
+
+cracklib_unpacker_SOURCES = unpacker.c
+cracklib_unpacker_LDADD = $(LDADD)
testlib_SOURCES = testlib.c
testlib_LDADD = $(LDADD)
--- /dev/null
+#!/bin/sh
+if [ -z "$*" ]; then
+ echo "Usage:"
+ echo " create-cracklib-dict wordlist ..."
+ echo
+ echo "This script takes one or more word list files as arguments"
+ echo "and converts them into cracklib dictionaries for use"
+ echo "by password checking programs. The results are placed in"
+ echo "the default compiled-in dictionary location."
+ echo
+ echo "If you wish to store the dictionary in a different location,"
+ echo "use the cracklib-format and cracklib-packer commands directly."
+ echo
+ echo "Example:"
+ echo "create-cracklib-dict /usr/share/words"
+else
+ cracklib-format $* | cracklib-packer
+fi
+
+++ /dev/null
-#!/bin/sh
-
-###
-# This program is copyright Alec Muffett 1993. The author disclaims all
-# responsibility or liability with respect to it's usage or its effect
-# upon hardware or computer systems, and maintains copyright as set out
-# in the "LICENCE" document which accompanies distributions of Crack v4.0
-# and upwards.
-###
-
-### Use zcat to read compressed (as well as uncompressed) dictionaries.
-### Compressed dictionaries can save quite a lot of disk space.
-CAT="gzip -cdf"
-###CAT="zcat"
-###CAT="cat"
-
-### in case of explosion, invoke "sort" with "-T" option pointing to a lot
-### of free space in a directory somewhere.
-
-SORT="sort"
-###SORT="sort -T /tmp"
-
-$CAT $* |
- tr '[A-Z]' '[a-z]' |
- tr -cd '\012[a-z][0-9]' |
- $SORT |
- uniq |
- grep -v '^#' |
- grep -v '^$'
int32 wrote;
PWDICT *pwp;
char buffer[STRINGSIZE];
+ char *file;
if (argc <= 1)
+ {
+ file = DEFAULT_CRACKLIB_DICT;
+ }
+ else
+ {
+ file = argv[1];
+ }
+
+ if ( argc == 2 && (!strcmp(argv[1], "-h") || !strcmp(argv[1], "--help")) )
{
fprintf(stderr, "Usage:\t%s dbname\n", argv[0]);
+ fprintf(stderr, " if dbname is not specified, will use compiled in default of (%s).", DEFAULT_CRACKLIB_DICT);
return (-1);
}
- if (!(pwp = PWOpen(argv[1], "w")))
+ if (!(pwp = PWOpen(file, "w")))
{
- perror(argv[1]);
+ perror(file);
return (-1);
}