Commits

Palmer, 2E0EOL committed 407837d

Commit the first version of these tools as a separate repo.
For older versions, see the oclegact repo.

Comments (0)

Files changed (23)

+# $Id: Makefile.am,v 0.5 2007/06/09 17:18:00 ddrp Exp $
+#
+# Copyright (C) 2001-2007 Daybo Logic.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+# 3. Neither the name of the project nor the names of its contributors
+#    may be used to endorse or promote products derived from this software
+#    without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+
+AUTOMAKE_OPTIONS=foreign
+
+CFLAGS= -g -Wall -W -Wcast-qual -Wcast-align -Waggregate-return \
+ -Wpointer-arith -Wshadow -Wmissing-prototypes -Winline \
+ -Wstrict-prototypes -Wredundant-decls -Wwrite-strings -Wformat=2 \
+ -Wformat-security -Wformat-nonliteral -Wundef -Wredundant-decls \
+ -Wbad-function-cast -Wnested-externs -Wmissing-declarations \
+ -Wunknown-pragmas
+ 
+noinst_PROGRAMS = caesar \
+  contact_info \
+  countregusers \
+  crack \
+  md2pwd \
+  md4pwd \
+  md5pwd \
+  sha1pwd \
+  modpriv \
+  make_countries \
+  create_filelist \
+  verify_filelist
+
+caesar_LDADD = $(DAYBOCRYPTLIB)
+
+caesar_SOURCES = caesar.c
+
+contact_info_LDADD = $(DAYBOTHREADSLIB) $(BLAKELIB) $(RTTBLIB) $(DLINILIB) $(DPCRTLMMLIB) $(MYSQLLIB) $(DAYBOCRYPTLIB) $(THREADLIB)
+
+contact_info_SOURCES = contact_info.c
+
+countregusers_LDADD = $(DAYBOTHREADSLIB) $(BLAKELIB) $(RTTBLIB) $(DLINILIB) $(DPCRTLMMLIB) $(MYSQLLIB) $(DAYBOCRYPTLIB) $(THREADLIB)
+
+countregusers_SOURCES = countregusers.c sup_options.c
+
+crack_LDADD = $(DAYBOCRYPTLIB)
+
+crack_SOURCES = crack.c
+
+md2pwd_LDADD = $(DAYBOCRYPTLIB)
+
+md2pwd_SOURCES = md2pwd.c
+
+md4pwd_LDADD = $(DAYBOCRYPTLIB)
+
+md4pwd_SOURCES = md4pwd.c
+
+md5pwd_LDADD = $(DAYBOCRYPTLIB)
+
+md5pwd_SOURCES = md5pwd.c
+
+sha1pwd_LDADD = $(DAYBOCRYPTLIB)
+
+sha1pwd_SOURCES = sha1pwd.c
+
+make_countries_SOURCES = make_countries.c
+
+modpriv_LDADD = $(DAYBOTHREADSLIB) $(BLAKELIB) $(RTTBLIB) $(DLINILIB) $(DPCRTLMMLIB) $(MYSQLLIB) $(DAYBOCRYPTLIB) $(THREADLIB)
+
+modpriv_SOURCES = modpriv.c
+
+create_filelist_SOURCES = create_filelist.c sup_filelist.c
+
+verify_filelist_SOURCES = verify_filelist.c sup_filelist.c
+
+EXTRA_DIST = GNUmakefile \
+  Makefile.bor \
+  _deps.bor \
+  _deps.gnu \
+  mksubst.pl
+# $Id: Makefile.bor,v 0.6 2005/09/20 12:50:00 ddrp Exp $
+#
+# Copyright (C) 2001-2004 Daybo Logic.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+# 3. Neither the name of the project nor the names of its contributors
+#    may be used to endorse or promote products derived from this software
+#    without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# Makefile for the common tools in this directory, for Borland/Win32 systems
+
+!include ../MasterMake.bor
+
+ERASE=perl -w ../../shared/scripts/erase.pl
+IPATH=-I../src -I$(PREFIX_INC) -I../blake -I../../shared/c99.h
+CFLAGS=$(MASTER_CFLAGS)
+LFLAGS=$(MASTER_LFLAGS)
+
+TOOLS=countregusers \
+      crack \
+      md2pwd \
+      md4pwd \
+      md5pwd \
+      sha1pwd \
+      modpriv \
+      make_countries \
+      verify_filelist \
+      caesar
+
+BLAKE_LIB=../blake$(LIB)
+DPCRTLMM_LIB=$(PREFIX_LIB)/dpcrtlmm$(LIB)
+DAYBOCRYPT_LIB=$(PREFIX_LIB)/dybocryp$(LIB)
+RTTB_LIB=$(PREFIX_LIB)rttb$(LIB)
+
+LIBS=$(BLAKE_LIB) $(DPCRTLMM_LIB) $(DAYBOCRYPT_LIB) $(RTTB_LIB)
+
+all : $(TOOLS)
+        @echo FIXME: modpriv does not support mnemonicals, contact ddrp
+
+depend:
+        if exist $(RESFILE) $(ERASE) $(RESPFILE)
+        if exist *$(H) $(DIR) *$(H) > $(RESPFILE)
+        if exist *$(C) $(DIR) *$(C) >> $(RESPFILE)
+        if exist *$(CPP) $(DIR) *$(CPP) >> $(RESPFILE)
+        daybodep $(IPATH) @$(RESPFILE) > $(DEPSFILE)
+
+#-------------------------------------------
+countregusers : countregusers$(EXE)
+countregusers$(EXE) : countregusers$(C)
+        $(CC) $(CFLAGS) $(IPATH) -ocountregusers$(O) countregusers$(C)
+        $(CPPC) $(LFLAGS) -ecountregusers$(EXE) countregusers$(O) $(LIBS)
+!ifndef DEBUG
+        $(STRIP) countregusers$(EXE)
+!endif
+#-------------------------------------------
+crack : crack$(EXE)
+crack$(EXE) : crack$(C)
+        $(CC) $(CFLAGS) $(IPATH) -o crack$(O) $<
+        $(CPPC) $(LFLAGS) -o $@ crack$(O) $(DAYBOCRYPT_LIB)
+!ifndef DEBUG
+        $(STRIP) $@
+!endif
+#-------------------------------------------
+md2pwd : md2pwd$(EXE)
+md2pwd$(EXE) : hashpwd$(C)
+        $(CC) $(CFLAGS) -DHASHPWD_USEHASH=0 $(IPATH) -omd2pwd$(O) hashpwd$(C)
+        $(CPPC) $(LFLAGS) md2pwd$(O) $(DAYBOCRYPT_LIB)
+!ifndef DEBUG
+        $(STRIP) $@
+!endif
+#-------------------------------------------
+md4pwd : md4pwd$(EXE)
+md4pwd$(EXE) : hashpwd$(C)
+        $(CC) $(CFLAGS) -DHASHPWD_USEHASH=1 $(IPATH) -omd4pwd$(O) hashpwd$(C)
+        $(CPPC) $(LFLAGS) md4pwd$(O) $(DAYBOCRYPT_LIB)
+!ifndef DEBUG
+        $(STRIP) $@
+!endif
+#-------------------------------------------
+md5pwd : md5pwd$(EXE)
+md5pwd$(EXE) : hashpwd$(C)
+        $(CC) $(CFLAGS) -DHASHPWD_USEHASH=2 $(IPATH) -omd5pwd$(O) hashpwd$(C)
+        $(CPPC) $(LFLAGS) md5pwd$(O) $(DAYBOCRYPT_LIB)
+!ifndef DEBUG
+        $(STRIP) $@
+!endif
+#-------------------------------------------
+sha1pwd : sha1pwd$(EXE)
+sha1pwd$(EXE) : hashpwd$(C)
+       $(CC) $(CFLAGS) -DHASHPWD_USEHASH=3 $(IPATH) -osha1pwd$(O) hashpwd$(C)
+       $(CPPC) $(LFLAGS) sha1pwd$(O) $(DAYBOCRYPT_LIB)
+!ifndef DEBUG
+       $(STRIP) $@
+!endif
+#-------------------------------------------
+modpriv : modpriv$(EXE)
+modpriv$(EXE) : modpriv$(C)
+        $(CC) $(CFLAGS) $(IPATH) -o modpriv$(O) $<
+        $(CPPC) $(LFLAGS) -o $@ modpriv$(O) $(LIBS)
+!ifndef DEBUG
+        $(STRIP) $@
+!endif
+#-------------------------------------------
+make_countries : make_countries$(EXE)
+make_countries$(EXE) : make_countries$(C)
+        $(CC) $(CFLAGS) $(IPATH) -o make_countries$(O) $<
+        $(CC) $(LFLAGS) -o $@ make_countries$(O)
+!ifndef DEBUG
+        $(STRIP) $@
+!endif
+#-------------------------------------------
+verify_filelist : verify_filelist$(EXE)
+verify_filelist$(EXE) : verify_filelist$(C)
+        $(CC) $(CFLAGS) $(IPATH) -o verify_filelist$(O) $<
+        $(CC) $(LFLAGS) -o $@ verify_filelist$(O)
+!ifndef DEBUG
+        $(STRIP) $@
+!endif
+#-------------------------------------------
+caesar : caesar$(EXE)
+caesar$(EXE) : caesar$(C)
+        $(CC) $(CFLAGS) $(IPATH) -o caesar$(O) $<
+        $(CC) $(LFLAGS) -o $@ caesar$(O) $(DAYBOCRYPT_LIB)
+!ifndef DEBUG
+        $(STRIP) $@
+!endif
+#-------------------------------------------
+
+
+clean:
+        $(ERASE) $(TOOLS) core DPCRTLMM.LOG
+        $(ERASE) countregusers$(O) crack$(O) md2pwd$(O) md4pwd$(O) md5pwd$(O) sha1pwd$(O) modpriv$(O) make_countries$(O) verify_filelist$(O) caesar$(O)
+        echo. > $(DEPSFILE)
+        $(ERASE) $(RESPFILE)
+
+
+!include $(DEPSFILE)
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# $Id: Makefile.am,v 0.5 2007/06/09 17:18:00 ddrp Exp $
+#
+# Copyright (C) 2001-2007 Daybo Logic.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+# 3. Neither the name of the project nor the names of its contributors
+#    may be used to endorse or promote products derived from this software
+#    without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+noinst_PROGRAMS = caesar$(EXEEXT) contact_info$(EXEEXT) \
+	countregusers$(EXEEXT) crack$(EXEEXT) md2pwd$(EXEEXT) \
+	md4pwd$(EXEEXT) md5pwd$(EXEEXT) sha1pwd$(EXEEXT) \
+	modpriv$(EXEEXT) make_countries$(EXEEXT) \
+	create_filelist$(EXEEXT) verify_filelist$(EXEEXT)
+subdir = tools
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+PROGRAMS = $(noinst_PROGRAMS)
+am_caesar_OBJECTS = caesar.$(OBJEXT)
+caesar_OBJECTS = $(am_caesar_OBJECTS)
+am__DEPENDENCIES_1 =
+caesar_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_contact_info_OBJECTS = contact_info.$(OBJEXT)
+contact_info_OBJECTS = $(am_contact_info_OBJECTS)
+contact_info_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
+am_countregusers_OBJECTS = countregusers.$(OBJEXT) \
+	sup_options.$(OBJEXT)
+countregusers_OBJECTS = $(am_countregusers_OBJECTS)
+countregusers_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
+am_crack_OBJECTS = crack.$(OBJEXT)
+crack_OBJECTS = $(am_crack_OBJECTS)
+crack_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_create_filelist_OBJECTS = create_filelist.$(OBJEXT) \
+	sup_filelist.$(OBJEXT)
+create_filelist_OBJECTS = $(am_create_filelist_OBJECTS)
+create_filelist_LDADD = $(LDADD)
+am_make_countries_OBJECTS = make_countries.$(OBJEXT)
+make_countries_OBJECTS = $(am_make_countries_OBJECTS)
+make_countries_LDADD = $(LDADD)
+am_md2pwd_OBJECTS = md2pwd.$(OBJEXT)
+md2pwd_OBJECTS = $(am_md2pwd_OBJECTS)
+md2pwd_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_md4pwd_OBJECTS = md4pwd.$(OBJEXT)
+md4pwd_OBJECTS = $(am_md4pwd_OBJECTS)
+md4pwd_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_md5pwd_OBJECTS = md5pwd.$(OBJEXT)
+md5pwd_OBJECTS = $(am_md5pwd_OBJECTS)
+md5pwd_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_modpriv_OBJECTS = modpriv.$(OBJEXT)
+modpriv_OBJECTS = $(am_modpriv_OBJECTS)
+modpriv_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am_sha1pwd_OBJECTS = sha1pwd.$(OBJEXT)
+sha1pwd_OBJECTS = $(am_sha1pwd_OBJECTS)
+sha1pwd_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_verify_filelist_OBJECTS = verify_filelist.$(OBJEXT) \
+	sup_filelist.$(OBJEXT)
+verify_filelist_OBJECTS = $(am_verify_filelist_OBJECTS)
+verify_filelist_LDADD = $(LDADD)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(caesar_SOURCES) $(contact_info_SOURCES) \
+	$(countregusers_SOURCES) $(crack_SOURCES) \
+	$(create_filelist_SOURCES) $(make_countries_SOURCES) \
+	$(md2pwd_SOURCES) $(md4pwd_SOURCES) $(md5pwd_SOURCES) \
+	$(modpriv_SOURCES) $(sha1pwd_SOURCES) \
+	$(verify_filelist_SOURCES)
+DIST_SOURCES = $(caesar_SOURCES) $(contact_info_SOURCES) \
+	$(countregusers_SOURCES) $(crack_SOURCES) \
+	$(create_filelist_SOURCES) $(make_countries_SOURCES) \
+	$(md2pwd_SOURCES) $(md4pwd_SOURCES) $(md5pwd_SOURCES) \
+	$(modpriv_SOURCES) $(sha1pwd_SOURCES) \
+	$(verify_filelist_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BLAKELIB = @BLAKELIB@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = -g -Wall -W -Wcast-qual -Wcast-align -Waggregate-return \
+ -Wpointer-arith -Wshadow -Wmissing-prototypes -Winline \
+ -Wstrict-prototypes -Wredundant-decls -Wwrite-strings -Wformat=2 \
+ -Wformat-security -Wformat-nonliteral -Wundef -Wredundant-decls \
+ -Wbad-function-cast -Wnested-externs -Wmissing-declarations \
+ -Wunknown-pragmas
+
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DAYBOCRYPTLIB = @DAYBOCRYPTLIB@
+DAYBOTHREADSLIB = @DAYBOTHREADSLIB@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLINILIB = @DLINILIB@
+DLSTDS_HEADERS = @DLSTDS_HEADERS@
+DPCRTLMMLIB = @DPCRTLMMLIB@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+GREP = @GREP@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MYSQLLIB = @MYSQLLIB@
+MYSQL_HEADERS = @MYSQL_HEADERS@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RTTBLIB = @RTTBLIB@
+SERVER_THREADS_PTH_FALSE = @SERVER_THREADS_PTH_FALSE@
+SERVER_THREADS_PTH_TRUE = @SERVER_THREADS_PTH_TRUE@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+THREADLIB = @THREADLIB@
+VERSION = @VERSION@
+ZLIB = @ZLIB@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build_alias = @build_alias@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+AUTOMAKE_OPTIONS = foreign
+caesar_LDADD = $(DAYBOCRYPTLIB)
+caesar_SOURCES = caesar.c
+contact_info_LDADD = $(DAYBOTHREADSLIB) $(BLAKELIB) $(RTTBLIB) $(DLINILIB) $(DPCRTLMMLIB) $(MYSQLLIB) $(DAYBOCRYPTLIB) $(THREADLIB)
+contact_info_SOURCES = contact_info.c
+countregusers_LDADD = $(DAYBOTHREADSLIB) $(BLAKELIB) $(RTTBLIB) $(DLINILIB) $(DPCRTLMMLIB) $(MYSQLLIB) $(DAYBOCRYPTLIB) $(THREADLIB)
+countregusers_SOURCES = countregusers.c sup_options.c
+crack_LDADD = $(DAYBOCRYPTLIB)
+crack_SOURCES = crack.c
+md2pwd_LDADD = $(DAYBOCRYPTLIB)
+md2pwd_SOURCES = md2pwd.c
+md4pwd_LDADD = $(DAYBOCRYPTLIB)
+md4pwd_SOURCES = md4pwd.c
+md5pwd_LDADD = $(DAYBOCRYPTLIB)
+md5pwd_SOURCES = md5pwd.c
+sha1pwd_LDADD = $(DAYBOCRYPTLIB)
+sha1pwd_SOURCES = sha1pwd.c
+make_countries_SOURCES = make_countries.c
+modpriv_LDADD = $(DAYBOTHREADSLIB) $(BLAKELIB) $(RTTBLIB) $(DLINILIB) $(DPCRTLMMLIB) $(MYSQLLIB) $(DAYBOCRYPTLIB) $(THREADLIB)
+modpriv_SOURCES = modpriv.c
+create_filelist_SOURCES = create_filelist.c sup_filelist.c
+verify_filelist_SOURCES = verify_filelist.c sup_filelist.c
+EXTRA_DIST = GNUmakefile \
+  Makefile.bor \
+  _deps.bor \
+  _deps.gnu \
+  mksubst.pl
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  tools/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  tools/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstPROGRAMS:
+	-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
+caesar$(EXEEXT): $(caesar_OBJECTS) $(caesar_DEPENDENCIES) 
+	@rm -f caesar$(EXEEXT)
+	$(LINK) $(caesar_LDFLAGS) $(caesar_OBJECTS) $(caesar_LDADD) $(LIBS)
+contact_info$(EXEEXT): $(contact_info_OBJECTS) $(contact_info_DEPENDENCIES) 
+	@rm -f contact_info$(EXEEXT)
+	$(LINK) $(contact_info_LDFLAGS) $(contact_info_OBJECTS) $(contact_info_LDADD) $(LIBS)
+countregusers$(EXEEXT): $(countregusers_OBJECTS) $(countregusers_DEPENDENCIES) 
+	@rm -f countregusers$(EXEEXT)
+	$(LINK) $(countregusers_LDFLAGS) $(countregusers_OBJECTS) $(countregusers_LDADD) $(LIBS)
+crack$(EXEEXT): $(crack_OBJECTS) $(crack_DEPENDENCIES) 
+	@rm -f crack$(EXEEXT)
+	$(LINK) $(crack_LDFLAGS) $(crack_OBJECTS) $(crack_LDADD) $(LIBS)
+create_filelist$(EXEEXT): $(create_filelist_OBJECTS) $(create_filelist_DEPENDENCIES) 
+	@rm -f create_filelist$(EXEEXT)
+	$(LINK) $(create_filelist_LDFLAGS) $(create_filelist_OBJECTS) $(create_filelist_LDADD) $(LIBS)
+make_countries$(EXEEXT): $(make_countries_OBJECTS) $(make_countries_DEPENDENCIES) 
+	@rm -f make_countries$(EXEEXT)
+	$(LINK) $(make_countries_LDFLAGS) $(make_countries_OBJECTS) $(make_countries_LDADD) $(LIBS)
+md2pwd$(EXEEXT): $(md2pwd_OBJECTS) $(md2pwd_DEPENDENCIES) 
+	@rm -f md2pwd$(EXEEXT)
+	$(LINK) $(md2pwd_LDFLAGS) $(md2pwd_OBJECTS) $(md2pwd_LDADD) $(LIBS)
+md4pwd$(EXEEXT): $(md4pwd_OBJECTS) $(md4pwd_DEPENDENCIES) 
+	@rm -f md4pwd$(EXEEXT)
+	$(LINK) $(md4pwd_LDFLAGS) $(md4pwd_OBJECTS) $(md4pwd_LDADD) $(LIBS)
+md5pwd$(EXEEXT): $(md5pwd_OBJECTS) $(md5pwd_DEPENDENCIES) 
+	@rm -f md5pwd$(EXEEXT)
+	$(LINK) $(md5pwd_LDFLAGS) $(md5pwd_OBJECTS) $(md5pwd_LDADD) $(LIBS)
+modpriv$(EXEEXT): $(modpriv_OBJECTS) $(modpriv_DEPENDENCIES) 
+	@rm -f modpriv$(EXEEXT)
+	$(LINK) $(modpriv_LDFLAGS) $(modpriv_OBJECTS) $(modpriv_LDADD) $(LIBS)
+sha1pwd$(EXEEXT): $(sha1pwd_OBJECTS) $(sha1pwd_DEPENDENCIES) 
+	@rm -f sha1pwd$(EXEEXT)
+	$(LINK) $(sha1pwd_LDFLAGS) $(sha1pwd_OBJECTS) $(sha1pwd_LDADD) $(LIBS)
+verify_filelist$(EXEEXT): $(verify_filelist_OBJECTS) $(verify_filelist_DEPENDENCIES) 
+	@rm -f verify_filelist$(EXEEXT)
+	$(LINK) $(verify_filelist_LDFLAGS) $(verify_filelist_OBJECTS) $(verify_filelist_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/caesar.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/contact_info.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/countregusers.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crack.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/create_filelist.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/make_countries.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md2pwd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md4pwd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5pwd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modpriv.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha1pwd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sup_filelist.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sup_options.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/verify_filelist.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+uninstall-info-am:
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-noinstPROGRAMS mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-noinstPROGRAMS ctags distclean distclean-compile \
+	distclean-generic distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-exec install-exec-am install-info \
+	install-info-am install-man install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-info-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
+/*
+Copyright (C) 2001-2007 Daybo Logic.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the project nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+*/
+/*
+  Caesar's cipher quick and simple encoder tool.
+  - Uses authoritiative copy in Blake.
+*/
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif /*HAVE_CONFIG_H*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <limits.h>
+#include <time.h>
+#include <string.h>
+
+#if defined(DAYBOTHREADS_NT)
+# include <windows.h>
+#elif defined(DAYBOTHREADS_PTH)
+# include <pth.h>
+#else
+# include <errno.h>
+# include <pthread.h>
+#endif /*DAYBOTHREADS_NT*/
+
+#ifdef HDRSTOP
+# pragma hdrstop
+#endif /*HDRSTOP*/
+
+#include "dlstdinc.h"
+#include "daybocrypt.h"
+#include "blake.h"
+/*--------------------------------------------------------------------*/
+#ifdef OVERCHAT_RCS_STAMPS
+static const char *rcsid =
+  "$Id: caesar.c,v 0.6 2007/01/21 13:39:00 ddrp Exp $";
+#endif /*OVERCHAT_RCS_STAMPS*/
+
+static void Cipher(
+  enum caesarCipherMode Mode,
+  const char *Text,
+  unsigned int Key
+);
+/*--------------------------------------------------------------------*/
+int main(int argc, char *argv[])
+{
+  const unsigned int key = 14;
+  int argi;
+
+  #ifdef OVERCHAT_RCS_STAMPS
+    blake_Unused(rcsid);
+  #endif /*OVERCHAT_RCS_STAMPS*/
+
+  puts(
+    "Caesar\'s cipher utility.  (C)2002-2007 Daybo Logic, all rights "
+    "reserved.\n"
+  );
+  printf("Using key %u\n\n", key);
+
+  if ( argc < 2 )
+    printf("Type %s <text>\n", argv[0]);
+  else {
+    for ( argi = 1; argi < argc; argi++ ) {
+      Cipher(ccmEncipher, argv[argi], key);
+      putchar((int)' ');
+    }
+
+    putchar((int)'\n');
+  }
+
+  return EXIT_SUCCESS;
+}
+/*--------------------------------------------------------------------*/
+static void Cipher(
+  enum caesarCipherMode Mode,
+  const char *Text,
+  unsigned int Key
+)
+{
+  char *textCopy;
+  unsigned int len;
+
+  len = strlen(Text);
+  if ( len ) {
+    textCopy = malloc(++len);
+    if ( textCopy ) {
+      strcpy(textCopy, Text);
+      if ( daybocrypt_CaesarCipher(Mode, textCopy, Key) == caesarSuccess )
+        printf("%s", textCopy);
+      else
+        puts("ERROR IN CIPHER");
+
+      free(textCopy);
+    }
+    else
+      fprintf(stderr, "Failed to allocate %u bytes.\n", len);
+  }
+
+  return;
+}
+/*--------------------------------------------------------------------*/
+/*
+Copyright (C) 2001-2007 Daybo Logic.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the project nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+*/
+/*
+  Tool for printing Blake contact info from authoritive Blake functions.
+*/
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif /*HAVE_CONFIG_H*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <limits.h>
+#include <time.h>
+#include <string.h>
+
+#if defined(DAYBOTHREADS_NT)
+# include <windows.h>
+#elif defined(DAYBOTHREADS_PTH)
+# include <pth.h>
+#else
+# include <errno.h>
+# include <pthread.h>
+#endif /*DAYBOTHREADS_NT*/
+
+#ifdef HDRSTOP
+# pragma hdrstop
+#endif /*HDRSTOP*/
+
+#include "dlstdinc.h"
+#include "daybocrypt.h"
+#include "blake.h"
+/*-------------------------------------------------------------------------*/
+#ifdef OVERCHAT_RCS_STAMPS
+static const char *rcsid =
+  "$Id: contact_info.c,v 0.4 2007/01/21 20:26:00 ddrp Stab $";
+#endif /*OVERCHAT_RCS_STAMPS*/
+
+static void ErrorPrinter(
+  const char *File,
+  const unsigned int Line,
+  const enum blakeError Err
+);
+
+static enum blakeError PrintEntry(
+  const enum blakeContactInfoType ContactInfoType,
+  const unsigned int Index,
+  char *Buff,
+  const size_t Size
+);
+
+static void PrintInfo(
+  const enum blakeContactInfoType ContactInfoType,
+  const char *Buff
+);
+
+static void Title(void);
+
+int main(void);
+
+#define PrintError(err) \
+          ErrorPrinter((__FILE__), (__LINE__), (err))
+/*-------------------------------------------------------------------------*/
+int main()
+{
+  char* buff;
+  unsigned int size;
+  enum blakeError err = blakeSuccess;
+  int exitVal = EXIT_SUCCESS;
+
+  Title();
+  if ( blake_Init() ) {
+    err = blake_GetContactInfoMaxLen(&size);
+    if ( err == blakeSuccess && size ) {
+      buff = (char*)malloc(++size);
+      if ( buff ) {
+        unsigned int idx = 0U;
+
+        do {
+          err = PrintEntry(blakeCitName, idx, buff, size);
+          if ( err != blakeSuccess ) break;
+          err = PrintEntry(blakeCitEmail, idx, buff, size);
+          if ( err != blakeSuccess ) break;
+          err = PrintEntry(blakeCitTasks, idx, buff, size);
+          idx++;
+
+          putc((int)'\n', stdout);
+        } while ( err == blakeSuccess );
+
+        if ( err != blakeRange ) exitVal = EXIT_FAILURE;
+        free(buff);
+      }
+      else {
+        PrintError(blakeNotEnoughMem);
+        exitVal = EXIT_FAILURE;
+      }
+    }
+    else {
+      PrintError(err);
+      exitVal = EXIT_FAILURE;
+    }
+
+    blake_Cleanup();
+  }
+  else {
+    printf("ERROR: Cannot initialise Blake\n");
+    exitVal = EXIT_FAILURE;
+  }
+
+  return exitVal;
+}
+/*-------------------------------------------------------------------------*/
+static void ErrorPrinter(
+  const char *File,
+  const unsigned int Line,
+  const enum blakeError Err
+)
+{
+  const char *mnemonic = blake_GetErrorMessageMnemonic(Err);
+  printf(
+    "Error: in \"%s\" at line %u - %s (%u)\n",
+    File,
+    Line,
+    (mnemonic) ? (mnemonic) : ("unknown"),
+    (unsigned int)Err
+  );
+}
+/*-------------------------------------------------------------------------*/
+static enum blakeError PrintEntry(
+  const enum blakeContactInfoType ContactInfoType,
+  const unsigned int Index,
+  char *Buff,
+  const size_t Size
+)
+{
+  enum blakeError err = blake_GetContactInfo(
+    ContactInfoType,
+    Index,
+    Buff,
+    Size
+  );
+
+  if ( err != blakeSuccess && err != blakeRange)
+    PrintError(err);
+
+  if ( err == blakeSuccess )
+    PrintInfo(ContactInfoType, Buff);
+
+  return err;
+}
+/*-------------------------------------------------------------------------*/
+static void PrintInfo(
+  const enum blakeContactInfoType ContactInfoType,
+  const char *Buff
+)
+{
+  if ( ContactInfoType == blakeCitName )
+    printf("%s\t", Buff);
+  else if ( ContactInfoType == blakeCitEmail )
+    printf("<%s>\n", Buff);
+  else if ( ContactInfoType == blakeCitTasks ) {
+    unsigned int len;
+    const char* ptr = Buff;
+    while ( (len = strlen(ptr)) ) {
+      printf("%s\n", ptr);
+      ptr += len + 1;
+    }
+  }
+  else
+    printf("\nUnknown contact info type\n");
+
+  return;
+}
+/*-------------------------------------------------------------------------*/
+static void Title()
+{
+  const char title[] = "OverChat credits, maintainers and contributors";
+  const unsigned int len = (sizeof(title)-1)/sizeof(title[0]);
+  unsigned int i;
+
+  printf("%s\n", title);
+  for ( i = 0U; i < len; i++ )
+    putc((int)'=', stdout);
+
+  for ( i = 0U; i < 2; i++ )
+    putc((int)'\n', stdout);
+}
+/*-------------------------------------------------------------------------*/
+/*
+Copyright (C) 2001-2007 Daybo Logic.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the project nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+*/
+/*
+  Returns the count of registered users.
+  - DDRP <www.daybologic.co.uk/mailddrp/>
+
+  Requires:
+  Blake,
+  Daybo Logic standards package.
+*/
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif /*HAVE_CONFIG_H*/
+
+#include <stdio.h>
+
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#endif /*HAVE_STDLIB_H*/
+
+#ifdef HAVE_LIMITS_H
+# include <limits.h>
+#endif /*HAVE_LIMITS_H*/
+
+#include <time.h>
+
+#if defined(DAYBOTHREADS_NT)
+# include <windows.h>
+#elif defined(DAYBOTHREADS_PTH)
+# include <pth.h>
+#else
+# include <errno.h>
+# include <pthread.h>
+#endif /*DAYBOTHREADS_NT*/
+
+#ifdef HDRSTOP
+# pragma hdrstop
+#endif /*HDRSTOP*/
+
+#include "dlstdinc.h"
+#include "blake.h"
+#include "sup_options.h"
+
+#ifdef OVERCHAT_RCS_STAMPS
+static const char *rcsid =
+  "$Id: countregusers.c,v 0.4 2007/03/14 11:47:00 ddrp Exp $";
+#endif /*OVERCHAT_RCS_STAMPS*/
+
+static int Run(const char *FileName);
+static void Cleanup(void);
+
+int main(int argc, char *argv[])
+{
+  int argi;
+
+  #ifdef OVERCHAT_RCS_STAMPS
+    blake_Unused(rcsid);
+  #endif /*OVERCHAT_RCS_STAMPS*/
+
+  if ( argc < 2 ) {
+    printf("Must supply at least one database filename.\n"
+           "%s <database ...>\n\n", argv[0]);
+    return EXIT_FAILURE;
+  }
+
+  if ( blake_Init() ) {
+    atexit(Cleanup);
+  }
+  else {
+    puts("Failed to initialised Blake\n");
+    return EXIT_FAILURE;
+  }
+
+  for ( argi = 1; argi < argc; argi++ ) {
+    int nUsers = Run(argv[argi]);
+    if (nUsers == -1 ) {
+      printf("%s : Failed to process database\n", argv[argi]);
+      return EXIT_FAILURE;
+    }
+    else
+      printf("%s : %d users.\n", argv[argi], nUsers);
+  }
+
+  return EXIT_SUCCESS;
+}
+
+static int Run(const char* FileName)
+{
+  BLAKE_DATABASE_HANDLE handle;
+  enum blakeError err;
+  int ret = -1; /* Error by default */
+
+  err = blake_db_CreateHandle(
+    options_GetDbHost(),
+    options_GetDbName(),
+    options_GetDbUser(),
+    options_GetDbPass(),
+    options_GetDbTable(),
+    &handle
+  );
+  if ( err == blakeSuccess ) {
+    err = blake_db_LockTable(handle);
+    if ( err == blakeSuccess ) {
+      ret = (int)blake_db_CountUsers(handle);
+      blake_db_UnlockTable(handle);
+    }
+    blake_db_DestroyHandle(handle);
+  }
+
+  return ret;
+}
+
+static void Cleanup()
+{
+  blake_Cleanup();
+}
+/*
+Copyright (C) 2001-2007 Daybo Logic.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the project nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+*/
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif /*HAVE_CONFIG_H*/
+
+#include <stdio.h>
+#include <limits.h>
+#ifdef HDRSTOP
+# pragma hdrstop
+#endif /*HDRSTOP*/
+
+#include "dlstdinc.h"
+#include "daybocrypt.h"
+
+#ifdef OVERCHAT_RCS_STAMPS
+static const char *rcsid =
+  "$Id: crack.c,v 0.4 2007/01/21 21:01:00 ddrp Exp $";
+#endif /*OVERCHAT_RCS_STAMPS*/
+
+int main()
+{
+  int _char;
+
+  while ( _char = getchar() ) {
+    char blah[2];
+
+    if ( _char == EOF ) break;
+    blah[0] = (char)_char;
+    blah[1] = '\0';
+    daybocrypt_CaesarCipher(ccmDecipher, blah, 18);
+    printf("%s", blah);
+  }
+  return 0;
+}

create_filelist.c

+/*
+Copyright (C) 2001-2007 Daybo Logic.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the project nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+*/
+/*
+  Package verify-list creation utility for the OverChat source
+  distribution.
+
+  create_filelist (C) 2007 Daybo Logic, all rights reserved.
+  Maintainer: David Duncan Ross Palmer <daybologic.co.uk/mailddrp>
+*/
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif /*HAVE_CONFIG_H*/
+
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif /*HAVE_SYS_TYPES_H*/
+
+#ifdef HAVE_DIRENT_H
+# include <dirent.h>
+#endif /*HAVE_DIRENT_H*/
+
+#ifdef HAVE_STRING_H
+# include <string.h>
+#endif /*HAVE_STRING_H*/
+
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#endif /*HAVE_STDLIB_H*/
+
+#include <stdio.h>
+
+#ifdef HDRSTOP
+# pragma hdrstop
+#endif /*HDRSTOP*/
+
+#include "sup_filelist.h"
+
+#ifdef OVERCHAT_RCS_STAMPS
+static const char *rcsid =
+  "$Id: create_filelist.c,v 0.1 2007/03/14 13:37:00 ddrp Exp $";
+#endif /*OVERCHAT_RCS_STAMPS*/
+/*-------------------------------------------------------------------------*/
+int main(
+  const int ArgC,
+  const char *ArgV[]
+);
+
+static void Loop(
+  FILE *OutHandle,
+  const char *Dir
+);
+
+static void Write(
+  FILE *OutFile,
+  const char *Line
+);
+
+static struct S_Application Application;
+/*-------------------------------------------------------------------------*/
+int main(
+  const int ArgC,
+  const char *ArgV[]
+)
+{
+  FILE *outHandle;
+  if ( ArgC >= 1 ) {
+    Application.ExeName = ArgV[0];
+  }
+
+  if ( ArgC > 2 ) {
+    Warning(&Application, wTooManyArgs, ArgV[2], NULL);
+    return EXIT_FAILURE;
+  }
+  else if ( ArgC < 2 ) {
+    Error(&Application, eTooFewArgs, NULL, NULL);
+    return EXIT_FAILURE;
+  }
+  else {
+    Application.File = ArgV[1];
+  }
+
+  outHandle = fopen(Application.File, "wt");
+  if ( outHandle ) {
+    Loop(outHandle, ".");
+    fclose(outHandle);
+  }
+  else {
+    Error(&Application, eNoCreat, Application.File, NULL);
+    return EXIT_FAILURE;
+  }
+  return EXIT_SUCCESS;
+}
+/*-------------------------------------------------------------------------*/
+static void Loop(
+  FILE *OutHandle,
+  const char *Dir
+)
+{
+  char buff[LOCALBUFFSZ];
+
+  DIR *ocdir = opendir(Dir);
+  if ( ocdir ) {
+    struct dirent entry_store;
+    struct dirent *ptr;
+    while ( !readdir_r(ocdir, &entry_store, &ptr) ) {
+      if ( ptr ) {
+        if ( strcmp(ptr->d_name, ".") && strcmp(ptr->d_name, "..") ) {
+          buff[0] = '\0';
+          if ( strlen(ptr->d_name)+1 > sizeof(buff) - strlen(buff) ) {
+            Warning(&Application, wTrunc, Dir, ptr->d_name);
+            continue;
+          }
+          (void)strncat(buff, Dir, sizeof(buff)-strlen(buff)-1);
+          (void)strncat(buff, "/", sizeof(buff)-strlen(buff)-1);
+          (void)strncat(buff, ptr->d_name, sizeof(buff)-strlen(buff)-1);
+          Write(OutHandle, buff);
+          if ( ptr->d_type == DT_DIR ) {
+            Loop(OutHandle, buff);
+          }
+        }
+      }
+      else break;
+    }
+    closedir(ocdir);
+  }
+}
+/*-------------------------------------------------------------------------*/
+static void Write(
+  FILE *OutFile,
+  const char *Line
+)
+{
+  if ( OutFile ) {
+    fprintf(OutFile, "%s\n", Line);
+  }
+  return;
+}
+/*-------------------------------------------------------------------------*/
+/*
+Copyright (C) 2001-2007 Daybo Logic.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the project nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+*/
+/*
+  This program will output in source form the digest of the string(s) passed
+  so that a program can re-run the appropriate hashing function and compare
+  the digests to determine if the password is right, without having to store
+  the real password in the source code.  Thus protecting against people
+  reverse engineering closed source code to regain the programmers' passwords.
+
+  Of course, it's still possible to locate the sums but much, much harer than
+  looking for strings, even if the digests are found, they must be attacked
+  for months on high speed computers to find the password from the digest.
+
+  hashpwd should be compiled seperately for all the supported hashes.
+  For example, with -DHASHPWD_USEHASH=0, -DHASHPWD_USEHASH=1, see the
+  source to see which numbers are supported.
+  - DDRP
+*/
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif /*HAVE_CONFIG_H*/
+
+#ifdef HAVE_LIMITS_H
+# include <limits.h>
+#endif /*HAVE_LIMITS_H*/
+
+#include <stdio.h>
+#include <string.h>
+
+#ifdef HDRSTOP
+# pragma hdrstop
+#endif /*HDRSTOP*/
+
+#include "dlstdinc.h"
+#include "daybocrypt.h"
+
+#ifdef OVERCHAT_RCS_STAMPS
+static const char *rcsid =
+  "$Id: hashpwd.c,v 0.6 2007/03/14 12:41:10 ddrp Exp $";
+#endif /*OVERCHAT_RCS_STAMPS*/
+
+#if ( HASHPWD_USEHASH == 0 )
+
+# define HASHNAME ("Rivest RSA/MD2")
+# define HASHLEN (DAYBOCRYPT_MD2_HASHLEN)
+# define CTX MD2_CTX
+# define Init daybocrypt_MD2Init
+# define Update daybocrypt_MD2Update
+# define Final(digest, context) \
+           daybocrypt_MD2Final((digest), (context))
+
+#elif ( HASHPWD_USEHASH == 1 )
+
+# define HASHNAME ("Rivest RSA/MD4")
+# define HASHLEN (DAYBOCRYPT_MD4_HASHLEN)
+# define CTX MD4_CTX
+# define Init daybocrypt_MD4Init
+# define Update daybocrypt_MD4Update
+# define Final(digest, context) \
+           daybocrypt_MD4Final((digest), (context))
+
+#elif ( HASHPWD_USEHASH == 2 )
+
+# define HASHNAME ("Rivest RSA/MD5")
+# define HASHLEN (DAYBOCRYPT_MD5_HASHLEN)
+# define CTX MD5_CTX
+# define Init daybocrypt_MD5Init
+# define Update daybocrypt_MD5Update
+# define Final(digest, context) \
+           daybocrypt_MD5Final((digest), (context))
+
+#elif ( HASHPWD_USEHASH == 3 )
+
+# define HASHNAME ("US NSA/SHA-1")
+# define HASHLEN (DAYBOCRYPT_SHA1_HASHLEN)
+# define CTX SHA1_CTX
+# define Init daybocrypt_SHA1Reset
+# define Update daybocrypt_SHA1Input
+# define Final(digest, context) \
+           daybocrypt_SHA1Result((context), (digest))
+
+#else
+
+# error ("Supported HASHPWD_USEHASH's are MD2,MD4,MD5,SHA1")
+
+#endif
+
+/*
+  Strips newlines and such
+*/
+static const char *Strip(
+  char *Password,
+  unsigned int PasswordLength
+);
+
+int main(int argc, char* argv[])
+{
+  CTX context;
+  unsigned char digest[HASHLEN];
+  int argi;
+
+  if ( argc < 2 ) {
+    printf("ERROR: Type %s <passwords ...>\n", argv[0]);
+    return 1;
+  }
+
+  for ( argi = 1; argi < argc; argi++ ) {
+    int i; /* General purpose looping */
+    unsigned int l = strlen(argv[argi]);
+
+    Init(&context);
+    Update(&context, (const unsigned char*)(Strip(argv[argi], l)), l);
+    Final(digest, &context);
+
+    printf(
+      "/* This password has been summed with algorithm %s from "
+      "libdaybocrypt, source password is: %s */\n",
+      HASHNAME,
+      Strip(argv[argi], l)
+    );
+
+    printf("/*\n  ");
+    for ( i = 0; i < HASHLEN; i++ )
+      printf("%02x", digest[i]);
+    printf("\n*/\n");
+
+    printf("const unsigned char expectedSum%u[%u] = { ", argi, HASHLEN);
+
+    for ( i = 0; i < HASHLEN; i++ ) {
+      printf("\'\\x%02x\'", digest[i]);
+      if ( i != HASHLEN-1 )
+        printf(",");
+      printf(" ");
+    }
+    puts("};");
+  }
+
+  return 0;
+}
+
+static const char* Strip(char* Password, unsigned int PasswordLength)
+{
+  unsigned int i;
+
+  for ( i = 0U; i < PasswordLength; i++ ) {
+    if ( Password[i] == '\n' ) {
+      Password[i] = '\0';
+      break;
+    }
+  }
+  return Password;
+}
+/*
+Copyright (C) 2001-2007 Daybo Logic.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the project nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+*/
+/*
+  Country creation for OverChat.
+  Created by David Duncan Ross Palmer <www.daybologic.co.uk/mailddrp>
+  For more information see
+           http://www.daybologic.co.uk/overchat/tools/make_countries.html
+
+  The general premise is that stdin wants a list of countries (stored in
+  ../countries.txt) and it will output the C code neccersary for the two-
+  letter (ccTLD) codes and the name of a country to be linked.
+*/
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif /*HAVE_CONFIG_H*/
+
+#ifdef HAVE_LIMITS_H
+# include <limits.h>
+#endif /*HAVE_LIMITS_H*/
+
+#include <stdio.h>
+#include <string.h>
+
+#ifdef HDRSTOP
+# pragma hdrstop
+#endif
+
+#include "dlstdinc.h"
+
+#ifdef OVERCHAT_RCS_STAMPS
+static const char *rcsid =
+  "$Id: make_countries.c,v 0.3 2007/03/14 13:29:00 ddrp Exp $";
+#endif /*OVERCHAT_RCS_STAMPS*/
+
+int main(void);
+
+static char *StripNewline(
+  char *Str
+);
+
+int main()
+{
+  char lineBuff[1024];
+  bool cctld = false;
+  unsigned int count = 0U;
+
+  printf(
+    "/*\n"
+    "  Countries on planet Earth (except Antarctica which doesn't have any "
+    "countries)\n"
+    "  Auto-generated with tools/make_countries from an authoritive source\n"
+    "  OverChat make_countries (C) 2002-2007 Daybo Logic, all rights "
+    "reserved.\n"
+    "/*\n\n"
+    "static const struct {\n"
+    "  char* Name;\n"
+    "  char* Code;\n"
+    "} Countries[] = {\n"
+  );
+
+  while ( fgets(lineBuff, sizeof(lineBuff)-1, stdin) ) {
+    if ( lineBuff[0] != ' ' && lineBuff[0] != '\n' ) {
+      StripNewline(lineBuff);
+      if ( !cctld ) /* Country */
+        printf("  { \"%s\", ", lineBuff);
+      else { /* Code */
+        printf("\"%s\" }, /* %u */\n", lineBuff, count);
+        count++;
+      }
+      cctld = !cctld;
+    }
+  }
+
+  printf("}\n\n");
+  printf("/* %u countries made. */\n\n", count);
+  fprintf(stderr, "%u countries made.\n\n", count);
+  return 0;
+}
+
+static char *StripNewline(
+  char *Str
+)
+{
+  char *ptr = strrchr(Str, '\n');
+  if ( ptr )
+    *ptr = '\0';
+  return Str;
+}
+/*
+Copyright (C) 2001-2007 Daybo Logic.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the project nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+*/
+
+#define HASHPWD_USEHASH (0)
+#include "hashpwd.c"
+/*
+Copyright (C) 2001-2007 Daybo Logic.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the project nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+*/
+
+#define HASHPWD_USEHASH (1)
+#include "hashpwd.c"
+/*
+Copyright (C) 2001-2007 Daybo Logic.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the project nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+*/
+
+#define HASHPWD_USEHASH (2)
+#include "hashpwd.c"
+#!/usr/bin/perl
+# $Id: mksubst.pl,v 0.1 2004/01/16 20:51:00 ddrp Exp $
+#
+# Copyright (C) 2004 Daybo Logic.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+# 3. Neither the name of the project nor the names of its contributors
+#    may be used to endorse or promote products derived from this software
+#    without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+
+# This program parses any given Makefile (usually those which are)
+# automatically generated, and replaces certain strings with
+# other strings.  This is all generally automated and instructions
+# or scripts for doing this will be under the relevant directories.
+#
+# How to use (if you're maintaining an auto-generated Makefile):
+# perl -w mksubst.pl [infile] [outfile]
+#
+# The outfile will have _all_ occourences of the strings in
+# @original replaced with the equivilants in @replacement.
+#
+
+use strict;
+
+my $AppName = 'mksubst';
+my $AppVersion = '0.1';
+my $AppYear = '2004';
+my $AppTimeStamp = '20040116';
+my $inFile = 0;
+my $outFile = 0;
+
+my @original = (
+  'Borland C++ IDE generated makefile',
+  'c:\bc5'
+);
+
+my @replacement = (
+  'Borland C++ IDE generated makefile, parsed by Daybo Logic mksubst.pl',
+  '$(MAKEDIR)\..'
+);
+
+exit(main()); # Start her up
+
+sub main
+{
+  Title();
+
+  if ( !CheckArguments() ) {
+    Help();
+    return 1;
+  }
+
+  if ( !Run() ) {
+    Error('It\'s gone pear shaped.');
+    return 1;
+  }
+
+  return 0;
+}
+
+sub CheckArguments
+{
+  my $argsAllowed = 1;
+
+  foreach (@ARGV) {
+    if ( $argsAllowed ) {
+      if ( ($_ eq '-h') || ($_ eq '--help') ) {
+        Help();
+        exit(0);
+      }
+      elsif ( ($_ eq '--') ) {
+        $argsAllowed = 0;
+        next;
+      }
+    }
+    # Treat as filename
+    if ( !$inFile ) {
+      $inFile = $_;
+      next;
+    }
+    elsif ( !$outFile ) {
+      $outFile = $_;
+      next;
+    }
+    Error('Too many command line arguments');
+    return 0;
+  }
+
+  if ( !$inFile ) {
+    Error('Input file not specified');
+    return 0;
+  }
+  if ( !$outFile ) {
+    Error('Output file not specified');
+    return 0;
+  }
+  return 1; # OK
+}
+
+sub Error
+{
+  my (@messages) = @_;
+  print($AppName . ' (ERROR): ');
+  foreach(@messages) {
+    print($_);
+  }
+  print("\n");
+}
+
+sub Help
+{
+  print("mksubst <oldfile> <newfile>\n\n");
+  print("oldfile\n\tis the input file\n");
+  print("newfile\n\tis the file into which we make the substitutions\n");
+  print("-h or --help\n\tThis information\n\n");
+  print("email http://www.daybologic.co.uk/mailddrp/ incase of problems.\n\n");
+}
+
+sub Title
+{
+  print("Daybo Logic $AppName MakeFile substitor $AppVersion ($AppTimeStamp)\n");
+  print("(C)Copyright $AppYear David Duncan Ross Palmer, see source for license.\n\n");
+}
+/*
+Copyright (C) 2001-2007 Daybo Logic.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the project nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+*/
+/*
+  This is a a simple tool for the server administrator to bipass security
+  and change a user's privilege level.  It will work for every user,
+  except if they have the nickname "DDRP".  This is a safe guard and
+  could of course be abused by modifying this source code.
+  Anyroad.  Just incase we can't change a privilege remotely, this tool
+  should come in handy.  By default, the program will display the privilege
+  level of a user unless the new level is specified after the nick.
+
+  Syntax: ./modpriv <database> <nickname> [new level]
+          ./modpriv --display-levels
+
+  Levels may be the numbers or the mnemonics used in the code (see
+  blake.h or type ./modpriv --display-levels
+*/
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif /*HAVE_CONFIG_H*/
+
+#include <stdio.h>
+#include <limits.h>
+#include <time.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if defined(DAYBOTHREADS_NT)
+# include <windows.h>
+#elif defined(DAYBOTHREADS_PTH)
+# include <pth.h>
+#else
+# include <errno.h>
+# include <pthread.h>
+#endif /*DAYBOTHREADS_NT*/
+
+#ifdef HDRSTOP
+# pragma hdrstop
+#endif /*HDRSTOP*/
+
+#include "dlstdinc.h"
+#include "blake.h"
+#include "sup_options.c"
+
+#ifdef OVERCHAT_RCS_STAMPS
+static const char *rcsid =
+  "$Id: modpriv.c,v 0.5 2007/03/14 13:19:00 ddrp Exp $";
+#endif /*OVERCHAT_RCS_STAMPS*/
+
+static void Help(const char* ProgramName);
+static void PrintClearance(const char* NickName, unsigned int Clearance);
+static void DisplayLevels(void);
+static bool DisplayLevel(const char* FileName, const char* NickName);
+static bool SetLevel(
+  const char *FileName,
+  const char *NickName,
+  const unsigned int NewLevel
+);
+static void Cleanup(void);
+static void PrintUserNotExist(const char* NickName);
+static void PrintDatabaseNotExist(const char* FileName);
+static bool NickTest(const char* NickName);
+static unsigned int GetClearanceNumeric(const char* LevelString);
+/*-------------------------------------------------------------------------*/
+int main(int argc, char* argv[])
+{
+  bool acceptOptions = true;
+  int argi;
+  char* filename = NULL;
+  char* nick = NULL;
+  char* level = NULL;
+
+  if ( !blake_Init() ) {
+    fputs("Cannot initialise Blake.\n", stdout);
+    return EXIT_FAILURE;
+  }
+  atexit(Cleanup);
+
+  for ( argi = 1; argi < argc; argi++ ) {
+    if ( acceptOptions && argv[argi][0] == '-' ) { /* Option? */
+      if (
+        strcmp(argv[argi], "--help") == 0 ||
+        strcmp(argv[argi], "-h") == 0
+      ) { /* Want help? */
+        Help(argv[0]); /* Give 'em help */
+        return EXIT_SUCCESS;
+      }
+      if ( strcmp(argv[argi], "--display-levels") == 0 ) {
+        /* User wants to see all the allowable options */
+        DisplayLevels();
+        return EXIT_SUCCESS;
+      }
+      if ( strcmp(argv[argi], "--") == 0 ) { /* No more options allowed */
+        acceptOptions = false;
+      }
+    }
+    else { /* Not an option, this means it's a filename/nick/level */
+      if ( !filename ) {
+        filename = argv[argi];
+        continue;
+      }
+      if ( !nick ) {
+        nick = argv[argi];
+        continue;
+      }
+      if ( !level ) {
+        level = argv[argi];
+        continue;
+      }
+    }
+  }
+
+  if ( !filename ) {
+    fputs("ERROR: No database filename specified.\n", stdout);
+    return EXIT_FAILURE;
+  }
+  if ( !nick ) {
+    fputs("ERROR: No nickname specified.\n", stdout);
+    return EXIT_FAILURE;
+  }
+  if ( !NickTest(nick) ) {
+    fputs("ERROR: Nickname errors, quitting.\n", stdout);
+    return EXIT_FAILURE;
+  }
+  if ( !level ) {
+    if ( !DisplayLevel(filename, nick) )
+      return EXIT_FAILURE;
+  }
+  else {
+    unsigned int levelNumeric = GetClearanceNumeric(level);
+    if ( levelNumeric > 0 ) {
+      if ( levelNumeric == CLEARANCE_ROOT )
+        printf("d00d, have you gone nuts, don\'t assign %s r00t!\n", nick);
+      else if ( levelNumeric == CLEARANCE_SUPREME_COMMANDER )
+        printf("d00d!!  Don\'t give %s supreme status!\n", nick);
+
+      if ( !SetLevel(filename, nick, levelNumeric) )
+        return EXIT_FAILURE;
+    }
+    else
+      printf("Not writing this privilege\n\n");
+  }
+
+  return EXIT_SUCCESS;
+}
+
+static void Help(
+  const char *ProgramName
+)
+{
+  printf("Syntax...\n");
+  printf("---------\n\n");
+  printf("%s <database> <nickname> [level]             or\n", ProgramName);
+  printf("%s --display-levels\n\n", ProgramName);
+  printf("<database> means the name of the database, the filename\n");
+  printf("<nickname> is the name of the person whose privileges you are changing\n");
+  printf("[level] is the optional new privilege level in numeric or mnemonic form\n");
+  printf("--display-levels displays all possible privilege levels\n");
+  printf("Type --help for this notice.  Type -- to disable options after that point\n");
+  printf("Without a level modifier, a user's current clearance level is displayed\n");
+  printf("For further information, visit http://www.daybologic.co.uk/overchat/tools/modpriv.html\n");
+}
+
+static void PrintClearance(
+  const char *NickName,
+  unsigned int Clearance
+)
+{
+  if ( NickName ) {