1
0
mirror of https://frontier.innolan.net/rainlance/amiga-apg.git synced 2025-11-20 23:30:44 +00:00

Added Amiga OS changes

This commit is contained in:
llsth
2015-03-09 16:45:18 +01:00
parent bc6121451b
commit a1b58308e1
58 changed files with 4538 additions and 9195 deletions

View File

94
INSTALL
View File

@ -1,94 +0,0 @@
Installation
There are 2 types of installation: (1) stand-alone, (2) client-server
(See README for details). You can use each type separetly or you can
use them together.
The simplest way to install this package is:
1. untar the distribution and cd to the top:
% gzip -d -c apg-2.X.XX.tar.gz | tar xf -
% cd apg-2.X.XX
If you are reading this file, you probably have already done this!
2. Edit the Makefile
3. make the software:
For stand-alone:
% make standalone
For client-server:
% make cliserv
For both:
% make all
During the make process compiler will generate some warnings
Just ignore this fact. I'm working to fix them.
4. install the binaries and man pages. You may need to be superuser
to do this (depending on where you are installing things):
% su
# make install
5. You can remove the program binaries and object files from the
source code directory by typing
% make clean
NOTE: THE REST IS FOR CLIENT-SERVER INSTALLATION ONLY !!!
6. Modify your /etc/inetd.conf file to contain the line below.
You may have to modify it to support your version of the file.
pwdgen stream tcp nowait nobody /usr/local/sbin/apgd apgd [options]
or
pwdgen stream tcp nowait nobody /usr/sbin/tcpd /usr/local/sbin/apgd [options]
if you use tcp_wrapers. (for options see apgd(8) manpage)
For all OS versions you must modify, your /etc/services file needs
to include the following line:
pwdgen 129/tcp # PWDGEN service
7. Restart inetd with a
# kill -HUP inetdpid
8. Configure your syslogd daemon to handle events `daemon.info' and
`daemon.debug' see syslogd(8) and syslog.conf(5)
9. Check that apgd is working
% telnet your.host.name 129
or
% telnet your.host.name pwdgen
10. Customize your apgcli.pl - APG client
Edit apgcli.pl file that can be found in src/perl directory of
source distribution tree
----------------------------------> src/perl/apgcli.pl
#!/usr/bin/perl -w # Put here the real location of perl
$host = "localhost"; # Put here the name of your APG server
use IO::Socket;
$remote = IO::Socket::INET->new(
Proto => "tcp",
PeerAddr => $host,
PeerPort => "pwdgen(129)",
)
or die "cannot connect to pwdgen port at $host";
while ( <$remote> ) { print }
----------------------------------> src/perl/apgcli.pl
END

View File

@ -1,46 +0,0 @@
Installation of APG toolkit for CYGWIN
Generaly there are 2 types of installation:
(1) standalone
(2) client-server
but only standalone installation implemented for CYGWIN yet.
APGD(server) works too, but it has some bugs and i could
not recommend to use it.
The instruction below IS FOR STANDALONE INSTALLATION ONLY
The simplest way to install this package is:
1. untar the distribution and cd to the top:
% gzip -d -c apg-2.X.XX.tar.gz | tar xf -
% cd apg-2.X.XX
If you are reading this file, you probably have already done this!
2. Edit the Makefile
3. make the software:
For standalone:
% make cygwin
4. install the binaries and man pages.
There are some problems with install for CYGWIN.
Sorry... But you have to do it manualy
% make install-cygwin
5. You can remove the program binaries and object files from the
source code directory by typing
% make clean
NOTE: You can use APG without CYGWIN, you need only cygwin*.dll.
Copy APG.EXE to the directory you want and copy CYGWIN*.DLL
in the same directory. Now you can run APG.EXE in the MS-DOS Prompt
or just cliking on it.
Adel I. Mirzazhanov
a-del@iname.com

122
Makefile
View File

@ -1,19 +1,19 @@
##################################################################
# Directories
# Install dirs
INSTALL_PREFIX = /usr/local
#INSTALL_PREFIX = /usr/local
# Full default path is /usr/local/bin
APG_BIN_DIR = /bin
#APG_BIN_DIR = /bin
# Full default path is /usr/local/man/man1
APG_MAN_DIR = /man/man1
#APG_MAN_DIR = /man/man1
# Full default path is /usr/local/sbin
APGD_BIN_DIR = /sbin
#APGD_BIN_DIR = /sbin
# Full default path is /usr/local/man/man8
APGD_MAN_DIR = /man/man8
#APGD_MAN_DIR = /man/man8
# You should not edit 2 lines below
APGBFM_CLIBS = -lm
@ -34,8 +34,8 @@ APG_CLIBS = -lm
# 'APG_CLIBS += -lcrypto'
# This works on MacOS X
#
STANDALONE_OPTIONS += -DAPG_USE_CRYPT
APG_CLIBS += -lcrypt
#STANDALONE_OPTIONS += -DAPG_USE_CRYPT
#APG_CLIBS += -lcrypt
##################################################################
# Support for cracklib
@ -54,18 +54,20 @@ APG_CLIBS += -lcrypt
# If you want to use SHA1 for random number genetation then you
# must uncomment the folowing 2 lines
#
#STANDALONE_OPTIONS += -DAPG_USE_SHA
STANDALONE_OPTIONS += -DAPG_USE_SHA
#CLISERV_OPTIONS += -DAPG_USE_SHA
##################################################################
# You can modify CC variable if you have compiler other than GCC
# But the code was designed and tested with GCC
CC = gcc
CC = m68k-amigaos-gcc
##################################################################
# Compilation flags
# You should comment the line below for AIX+native cc
CFLAGS = -Wall
CFLAGS = -O2 -m68000 -resident -noixemul -s -Wall
CFLAGS2 = -O2 -m68020 -resident -noixemul -s -Wall
CFLAGS4 = -O2 -m68040 -resident -noixemul -s -Wall
####################################################################
# If you plan to install APG daemon you should look at lines below #
@ -120,61 +122,73 @@ HEADERS = owntypes.h pronpass.h randpass.h restrict.h errs.h rnd.h \
./cast/cast.h ./cast/cast_sboxes.h getopt.h convert.h
OBJECTS = rnd.o ./cast/cast.o pronpass.o randpass.o restrict.o apg.o errors.o
standalone: apg apgbfm
standalone: apg apg2 apg4 apgbfm apgbfm2 apgbfm4
all: standalone cliserv
all: standalone #cliserv
cliserv: apgd apgbfm
#cliserv: apgd apgbfm
cygwin: standalone
#cygwin: standalone
apg:
${CC} ${CFLAGS} ${STANDALONE_OPTIONS} -o ${PROGNAME} ${SOURCES} ${APG_CLIBS}
apgd:
${CC} ${CFLAGS} -DCLISERV ${CLISERV_OPTIONS} -o ${CS_PROGNAME} ${SOURCES} ${APG_CS_CLIBS}
apg2:
${CC} ${CFLAGS2} ${STANDALONE_OPTIONS} -o ${PROGNAME}2 ${SOURCES} ${APG_CLIBS}
apg4:
${CC} ${CFLAGS4} ${STANDALONE_OPTIONS} -o ${PROGNAME}4 ${SOURCES} ${APG_CLIBS}
#apgd:
# ${CC} ${CFLAGS} -DCLISERV ${CLISERV_OPTIONS} -o ${CS_PROGNAME} ${SOURCES} ${APG_CS_CLIBS}
apgbfm:
${CC} ${FLAGS} -DAPGBFM -o ${BFM_PROGNAME} ${BFM_SOURCES} ${APGBFM_CLIBS}
${CC} ${CFLAGS} -DAPGBFM -o ${BFM_PROGNAME} ${BFM_SOURCES} ${APGBFM_CLIBS}
strip:
strip ${PROGNAME}
strip ${CS_PROGNAME}
strip ${BFM_PROGNAME}
apgbfm2:
${CC} ${CFLAGS2} -DAPGBFM -o ${BFM_PROGNAME}2 ${BFM_SOURCES} ${APGBFM_CLIBS}
install:
if test -x ./apg; then \
./mkinstalldirs ${INSTALL_PREFIX}${APG_BIN_DIR}; \
./mkinstalldirs ${INSTALL_PREFIX}${APG_MAN_DIR}; \
./install-sh -c -m 0755 -o root -g ${FIND_GROUP} ./apg ${INSTALL_PREFIX}${APG_BIN_DIR}; \
./install-sh -c -m 0444 ./doc/man/apg.1 ${INSTALL_PREFIX}${APG_MAN_DIR}; \
fi
if test -x ./apgd; then \
./mkinstalldirs ${INSTALL_PREFIX}${APGD_BIN_DIR}; \
./mkinstalldirs ${INSTALL_PREFIX}${APGD_MAN_DIR}; \
./install-sh -c -m 0755 -o root -g ${FIND_GROUP} ./apgd ${INSTALL_PREFIX}${APGD_BIN_DIR}; \
./install-sh -c -m 0444 ./doc/man/apgd.8 ${INSTALL_PREFIX}${APGD_MAN_DIR}; \
fi
if test -x ./apgbfm; then \
./mkinstalldirs ${INSTALL_PREFIX}${APG_BIN_DIR}; \
./mkinstalldirs ${INSTALL_PREFIX}${APG_MAN_DIR}; \
./install-sh -c -m 0755 -o root -g ${FIND_GROUP} ./apgbfm ${INSTALL_PREFIX}${APG_BIN_DIR}; \
./install-sh -c -m 0444 ./doc/man/apgbfm.1 ${INSTALL_PREFIX}${APG_MAN_DIR}; \
fi
apgbfm4:
${CC} ${CFLAGS4} -DAPGBFM -o ${BFM_PROGNAME}4 ${BFM_SOURCES} ${APGBFM_CLIBS}
install-cygwin:
if test -x ./apg.exe; then \
./mkinstalldirs ${INSTALL_PREFIX}${APG_BIN_DIR}; \
./mkinstalldirs ${INSTALL_PREFIX}${APG_MAN_DIR}; \
./install-sh -c -m 0755 ./apg.exe ${INSTALL_PREFIX}${APG_BIN_DIR}; \
./install-sh -c -m 0444 ./doc/man/apg.1 ${INSTALL_PREFIX}${APG_MAN_DIR}; \
fi
if test -x ./apgbfm.exe; then \
./mkinstalldirs ${INSTALL_PREFIX}${APG_BIN_DIR}; \
./mkinstalldirs ${INSTALL_PREFIX}${APG_MAN_DIR}; \
./install-sh -c -m 0755 ./apgbfm.exe ${INSTALL_PREFIX}${APG_BIN_DIR}; \
./install-sh -c -m 0444 ./doc/man/apgbfm.1 ${INSTALL_PREFIX}${APG_MAN_DIR}; \
fi
#strip:
# strip ${PROGNAME}
# strip ${CS_PROGNAME}
# strip ${BFM_PROGNAME}
#install:
# if test -x ./apg; then \
#./mkinstalldirs ${INSTALL_PREFIX}${APG_BIN_DIR}; \
#./mkinstalldirs ${INSTALL_PREFIX}${APG_MAN_DIR}; \
#./install-sh -c -m 0755 -o root -g ${FIND_GROUP} ./apg ${INSTALL_PREFIX}${APG_BIN_DIR}; \
#./install-sh -c -m 0444 ./doc/man/apg.1 ${INSTALL_PREFIX}${APG_MAN_DIR}; \
#fi
# if test -x ./apgd; then \
#./mkinstalldirs ${INSTALL_PREFIX}${APGD_BIN_DIR}; \
#./mkinstalldirs ${INSTALL_PREFIX}${APGD_MAN_DIR}; \
#./install-sh -c -m 0755 -o root -g ${FIND_GROUP} ./apgd ${INSTALL_PREFIX}${APGD_BIN_DIR}; \
#./install-sh -c -m 0444 ./doc/man/apgd.8 ${INSTALL_PREFIX}${APGD_MAN_DIR}; \
#fi
# if test -x ./apgbfm; then \
#./mkinstalldirs ${INSTALL_PREFIX}${APG_BIN_DIR}; \
#./mkinstalldirs ${INSTALL_PREFIX}${APG_MAN_DIR}; \
#./install-sh -c -m 0755 -o root -g ${FIND_GROUP} ./apgbfm ${INSTALL_PREFIX}${APG_BIN_DIR}; \
#./install-sh -c -m 0444 ./doc/man/apgbfm.1 ${INSTALL_PREFIX}${APG_MAN_DIR}; \
#fi
#
#install-cygwin:
# if test -x ./apg.exe; then \
#./mkinstalldirs ${INSTALL_PREFIX}${APG_BIN_DIR}; \
#./mkinstalldirs ${INSTALL_PREFIX}${APG_MAN_DIR}; \
#./install-sh -c -m 0755 ./apg.exe ${INSTALL_PREFIX}${APG_BIN_DIR}; \
#./install-sh -c -m 0444 ./doc/man/apg.1 ${INSTALL_PREFIX}${APG_MAN_DIR}; \
#fi
# if test -x ./apgbfm.exe; then \
#./mkinstalldirs ${INSTALL_PREFIX}${APG_BIN_DIR}; \
#./mkinstalldirs ${INSTALL_PREFIX}${APG_MAN_DIR}; \
#./install-sh -c -m 0755 ./apgbfm.exe ${INSTALL_PREFIX}${APG_BIN_DIR}; \
#./install-sh -c -m 0444 ./doc/man/apgbfm.1 ${INSTALL_PREFIX}${APG_MAN_DIR}; \
#fi
clean:
rm -f ${CS_PROGNAME} ${PROGNAME} ${BFM_PROGNAME} ${OBJECTS} *core*
rm -f ${CS_PROGNAME} ${PROGNAME} ${PROGNAME}2 ${PROGNAME}4 ${BFM_PROGNAME} ${BFM_PROGNAME}2 ${BFM_PROGNAME}4 ${OBJECTS} *core*

41
README
View File

@ -1,41 +0,0 @@
APG v2.1.0 was tested and found working on:
i386 FreeBSD 4.6-RELEASE
Intel Solaris 8 gcc-2.95.2
SPARC Solaris 8 gcc-2.95.2
RedHat Linux 7.2
APG v1.2.13 was tested and found working on:
i386 FreeBSD 4.0-RELEASE
NetBSD (reported by Tomasz Luchowski <zuntum@eik.pl>)
OpenBSD (reported by Rick VanNorman <rick@neverslow.com>)
i386 Linux-Mandrake 6.0
i386 Linux-Redhat 7.0
i386 Linux-Mandrake 7.2 (reported by Andrew J. Caird <acaird@advance-inc.com>)
Intel Solaris 8 gcc-2.95.2
SPARC Solaris 8 gcc-2.95.2
Intel Windows 2000+CYGWIN v1.1.4
HP-UX 10.20 HP ANSI C Compilier (reported by Alexander J Pierce <apierce@boi.hp.com>)
HP-UX 11.00 HP ANSI C Compilier (reported by Alexander J Pierce <apierce@boi.hp.com>)
HP-UX 11.00 gcc-2.95.2 (reported by Andrew J. Caird <acaird@advance-inc.com>)
IRIX 6.5.8 gcc-2.95.2 (reported by Andrew J. Caird <acaird@advance-inc.com>)
AIX 4.3.3+native cc (reported by Philip Le Riche <pleriche@uk03.bull.co.uk>)
AIX 4.3.3+gcc (reported by Philip Le Riche <pleriche@uk03.bull.co.uk>)
NOTE:
This release (APG v2.1.0b1) is NOT yet compatible with TkAPG (Tcl/Tk frontend for APG)
Any compatibility reports are welcome
* For installation instructions see INSTALL
* For usage instructions see manpages
* For tips see doc/APG_TIPS
* For copying information see COPYING
See also APG Homepage at: http://www.adel.nursat.kz/apg/
ANY PATCHES OR SUGGESTIONS ARE WELCOME
Adel I. Mirzazhanov
E-mail: a-del@iname.com

View File

@ -1,11 +0,0 @@
APG is now supports CYGWIN
(thanks to Graham Bloice <gragam.bloice@trihedral.com>)
* For installation instructions see INSTALL.CYGWIN
* For usage instructions see manpages
* For copying information see COPYING
See also APG Homepage at: http://www.adel.nursat.kz/apg/
Adel I. Mirzazhanov
E-mail: a-del@iname.com

31
THANKS
View File

@ -1,31 +0,0 @@
Graham Bloice <graham.bloice@trihedral.com>
Rainer Wichmann <st8h304@hs.uni-hamburg.de>
Andreas Ehliar <ehliar@lysator.liu.se>
Chris Foote <chris@senet.com.au>
Robert Kovacs <mess@datanet.hu>
Peter Pentchev <roam@orbitel.bg>
Adrian Ho <lexfiend@usa.net>
Andrew J. Caird <acaird@advance-inc.com>
Alexander J Pierce <apierce@boi.hp.com>
Philip Le Riche <pleriche@uk03.bull.co.uk>
Tomasz Luchowski <zuntum@eik.pl>
Barton Hodges <barton@gcmcomputers.com>
Rick VanNorman <rick@neverslow.com>
Tomaz Zupan <tomaz.zupan@orpo.si>
Marc Haber <Marc.Haber@plannet.de>
Tom Schutter <tom@platte.com>
Matt Mullins <matt_mullins@ared.uscourts.gov>
Mike Robbins <mike.robbins@sweetolive.net>
Bernhard Wesely <mail@weselyb.net>
Allen Wells <Allen.Wells@state.mn.us>
Jose Nazario <jose@crimelabs.net>
Sebastian Stark <seb@todesplanet.de>
Joseph P. Crotty <jcrotty18@attbi.com>
Schlies, Peter <PSchlies@syntellect.com>
Eugene Podkopaev <eugene@emetex.ru>
Bill Plesko <bplesko@mcguirebearing.com>
Bartosz Sobolewski - Worthy <worthy@data.pl>
James Mancini <jmancini@netreo.net>
Arno Wilhelm <a.wilhelm@phion.com>
Michael Matthews <mjmatt@qsun.mt.att.com>
K.-M. Hansche <klaus-martin.hansche@kvberlin.de>

14
TODO
View File

@ -1,14 +0,0 @@
TODO
----
Priority Hi:
* Fix some code style or other errors if any.
Priority Medium:
* Include support for some other random number generation
algorithms (Blum-Blum-Shub, FIPS 186-3)
* Make some interfase for plug-in language modules
for pronounceable password generation.

26
apg.c
View File

@ -109,6 +109,7 @@
unsigned int pass; /* password generation mode */
unsigned int filter; /* password generation mode */
};
#ifndef CLISERV
UINT32 get_user_seq (void);
UINT32 com_line_user_seq (char * seq);
@ -123,17 +124,15 @@ int construct_mode(char *str_mode, struct pass_m * mde);
/*
** main()
*/
int
main (int argc, char *argv[])
int main (int argc, char *argv[])
{
int i = 0;
int restrict_res = 0;
char *pass_string;
char *hyph_pass_string;
char *pass_string = NULL;
char *hyph_pass_string = NULL;
time_t tme;
int option = 0; /* programm option */
int algorithm = 0; /* algorithm for generation */
@ -145,8 +144,8 @@ main (int argc, char *argv[])
int exclude_list_present = FALSE; /* exclude list present */
int quiet_present = FALSE; /* quiet mode flag */
int hyph_req_present = FALSE; /* Request to print hyphenated password */
char *restrictions_file; /* dictionary file name */
char *plain_restrictions_file; /* dictionary file name */
char *restrictions_file = NULL; /* dictionary file name */
char *plain_restrictions_file = NULL; /* dictionary file name */
struct pass_m mode;
unsigned int pass_mode_present = FALSE; /* password generation mode flag */
USHORT min_pass_length = DEFAULT_MIN_PASS_LEN; /* min password length */
@ -162,7 +161,7 @@ main (int argc, char *argv[])
#endif /* APG_USE_CRACKLIB*/
#ifndef CLISERV
char *com_line_seq;
char *spell_pass_string;
char *spell_pass_string = NULL;
int spell_present = FALSE; /* spell password mode flag */
unsigned int delimiter_flag_present = FALSE;
#ifdef APG_USE_CRYPT
@ -482,7 +481,7 @@ main (int argc, char *argv[])
/***************************************
** ALGORITHM = 1 RESTRICTIONS = PRESENT
****************************************/
if ( (restrictions_present == TRUE))
if (restrictions_present == TRUE)
{
/* Filter check */
if (filter_restrict_present == TRUE)
@ -613,7 +612,7 @@ get_user_seq (void)
char * seq;
UINT32 prom[2] = { 0L, 0L };
UINT32 sdres = 0L;
printf ("\nPlease enter some random data (only first %d are significant)\n", sizeof(prom));
printf ("\nPlease enter some random data (only first %lu are significant)\n", sizeof(prom));
seq = (char *)getpass("(eg. your old password):>");
if (strlen(seq) < sizeof(prom))
(void)memcpy((void *)&prom[0], (void *)seq, (int)strlen(seq));
@ -805,3 +804,10 @@ int construct_mode(char *s_mode, struct pass_m * mde)
return (0);
}
char str[50];
char *getpass(const char *prompt)
{
printf("%s", prompt);
return fgets(str,50,stdin);
}

View File

@ -55,13 +55,13 @@ main (int argc, char *argv[])
{
int option = 0;
char *dictfile; /* dictionary filename */
char *dictfile = NULL; /* dictionary filename */
FILE *f_dictfile; /* dictionary file descriptor */
char *filter; /* filter file name */
char *filter = NULL; /* filter file name */
FILE *f_filter; /* filter file descriptor */
char *word; /* word to add or check */
char *word = NULL; /* word to add or check */
char *tmp; /* just tmp char pointer */
h_val wc = 0L; /* amount of words to build dictionaty */
h_val filter_size =0L; /* filter size in bits */

View File

@ -1,29 +0,0 @@
##################################################################
# You can modify CC variable if you have compiler other than GCC
# But the code was designed and tested with GCC
CC = gcc
##################################################################
# Compilation flags
# You should comment the line below for AIX+native cc
FLAGS = -Wall
ECHO = echo
PROGNAME = bfconvert
SOURCES = bfconvert.c
all:
${CC} ${FLAGS} -o ${PROGNAME} ${SOURCES}
strip:
strip ${PROGNAME}
install:
@${ECHO} "**********************************************"
@${ECHO} "* This program shold be used to convert your *"
@${ECHO} "* filters once. So if you want to install *"
@${ECHO} "* this program you have to do it manualy :-) *"
@${ECHO} "**********************************************"
clean:
rm -f ${PROGNAME} *.o *core

View File

@ -1,24 +0,0 @@
NAME
bfconvert
DESCRIPTION
Convert APG Bloom-filter version 1.0.1 to
version 1.1.0
BUILD
Just type `make' and hit [Enter] at the
command prompt.
USAGE
bfconvert old_bf_file_name new_bf_file_name
RETURN
0 - success
-1 - something wrong
NOTE
Converted filter will be case sensitive.
Conversion to the case insensitive filter
is impossible because of the bloom-filter
nature.

View File

@ -1,168 +0,0 @@
/*
** Copyright (c) 2003
** Adel I. Mirzazhanov. 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.The name of the author may not be used to endorse or
** promote products derived from this software without
** specific prior written permission.
**
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
*/
/*
***************************************************************
** NAME : BFCONVERT **
** DESCRIPTION : convert APG Bloom-filter version 1.0.1 to **
** version 1.1.0 **
** USAGE : bfconvert old_bf_file_name new_bf_file_name **
** RETURN : 0 - success **
** -1 - something wrong **
***************************************************************
*/
#include <stdio.h>
#define OLD_APGBF_HEADER_LEN 12
#define OLD_APGBF_HEADER_ID "APGBF101"
#define NEW_APGBF_HEADER_LEN 13
#define NEW_APGBF_HEADER_ID "APGBF"
#define NEW_APGBF_HEADER_VER "110"
#define NEW_APGBF_HEADER_MODE 0x00
int main (int argc, char *argv[]);
int
main(int argc, char *argv[])
{
typedef unsigned char f_mode;
struct new_apg_bf_hdr {
char id[5]; /* filter ID */
char version[3]; /* filter version */
unsigned long int fs; /* filter size */
f_mode mode; /* filter flags */
};
struct old_apg_bf_hdr {
char id[8]; /* ID */
unsigned long int fs; /* filter size */
};
struct new_apg_bf_hdr new_bf_hdr;
struct old_apg_bf_hdr old_bf_hdr;
char old_etalon_bf_id[] = OLD_APGBF_HEADER_ID;
char new_etalon_bf_id[] = NEW_APGBF_HEADER_ID;
char new_etalon_bf_ver[] = NEW_APGBF_HEADER_VER;
FILE *old_f; /* old filter file descriptor */
FILE *new_f; /* new filter file descriptor */
unsigned char tmp_buf; /* Temporary buffer */
/* Checking arguments */
if (argc != 3)
{
printf ("Usage: bfconvert old_bf_file_name new_bf_file_name\n");
return(-1);
}
/* Opening input and output files */
if ((old_f = fopen (argv[1], "r")) == NULL)
{
perror("open the old bloom-filter file");
return(-1);
}
if ((new_f = fopen (argv[2], "w")) == NULL)
{
perror("open the new bloom-filter file");
return(-1);
}
if (fread ( (void *)&old_bf_hdr, OLD_APGBF_HEADER_LEN, 1, old_f) != 1)
if (ferror (old_f) != 0)
{
perror("read from the old bloom-filter file");
return(-1);
}
/* Checking input file */
if ((old_bf_hdr.id[0] != old_etalon_bf_id[0]) || (old_bf_hdr.id[1] != old_etalon_bf_id[1]) ||
(old_bf_hdr.id[2] != old_etalon_bf_id[2]) || (old_bf_hdr.id[3] != old_etalon_bf_id[3]) ||
(old_bf_hdr.id[4] != old_etalon_bf_id[4]) || (old_bf_hdr.id[5] != old_etalon_bf_id[5]) ||
(old_bf_hdr.id[6] != old_etalon_bf_id[6]) || (old_bf_hdr.id[7] != old_etalon_bf_id[7]) )
{
fprintf(stderr,"Input file is not APG bloom filter file v1.0.1\n");
fflush (stderr);
return (-1);
}
/* Constructing output BF file header */
new_bf_hdr.id[0] = new_etalon_bf_id[0];
new_bf_hdr.id[1] = new_etalon_bf_id[1];
new_bf_hdr.id[2] = new_etalon_bf_id[2];
new_bf_hdr.id[3] = new_etalon_bf_id[3];
new_bf_hdr.id[4] = new_etalon_bf_id[4];
new_bf_hdr.version[0] = new_etalon_bf_ver[0];
new_bf_hdr.version[1] = new_etalon_bf_ver[1];
new_bf_hdr.version[2] = new_etalon_bf_ver[2];
new_bf_hdr.fs = old_bf_hdr.fs;
new_bf_hdr.mode = NEW_APGBF_HEADER_MODE;
/* Writing new filter header to output file */
if (fwrite ( (void *)&new_bf_hdr, NEW_APGBF_HEADER_LEN, 1, new_f) != 1)
{
perror("write to the new bloom-filter file");
return(-1);
}
/* Reading filter content from the old BF file and writing it to the new BF file */
while (fread ( (void *)&tmp_buf, 1, 1, old_f) == 1)
{
if(fwrite( (void *)&tmp_buf, 1, 1, new_f) != 1)
{
perror("write to the new bloom-filter file");
return(-1);
}
}
if (ferror (old_f) != 0)
{
perror("read from the old bloom-filter file");
return(-1);
}
/* Close input and output files */
if (fclose(old_f) == EOF)
{
perror("close old bloom-filter file");
return(-1);
}
if (fclose(new_f) == EOF)
{
perror("close new bloom-filter file");
return(-1);
}
printf("\nInput file has been successfuly converted\n");
return(0);
}

View File

@ -1,119 +0,0 @@
============================================================
= TIPS FOR APG =
============================================================
= This file contains some tips for APG. =
= =
= 1. If You wish to submit a tip please send an email to =
= <a-del@iname.com> and if i find it useful i'll put =
= Your tip in the APG_TIPS file of the next release. =
= I will also put Your tip on the APG website as soon =
= as it posible. =
= 2. If you wish to remove or update Your tip please send =
= en email to <a-del@iname.com>. I will remove/update =
= Your tip in the APG_TIPS file of the next release. =
= I'll remove/update Your tip on the APG website as =
= soon as it posible. =
= =
= Adel I Mirzazhanov =
= a-del@iname.com =
============================================================
######################################################
# 1. Elimination of certain characters from the output
# by Barton Hodges <barton@gcmcomputers.com>
######################################################
I don't like to use "o"'s or "l"'s in my passwords
because they looke like zeros and ones instead of O's
and L's.
I hacked together a little shell script to accomplish
the elimination of certain characters from the output.
----------[cut here]
#!/bin/sh
genpw () {
PW=$(/usr/local/bin/apg -L -m 10 -x 10 -n 1 | egrep -v [owl])
if [ "$PW" != "" ]; then
echo $PW
return 0;
else
return 1;
fi
}
until genpw; do : ; done
----------[cut here]
Note:
Since apg-2.1.0b0 you can use [-e char_string] option
to do the same thing.
#######################################################
# 2. APG and xinetd
# by Tomaz Zupan <tomaz.zupan@orpo.si>
#######################################################
I use xinetd instead of inetd as per your documentation,
so I hope you (or anyone using apgd) might find usefull
this xinetd.conf entry. Arguments are tailored according
to my needs, but that shouldn't be a problem for anyone
that read man pages ...
--------> [cut here]
# default: on
# description: APGD is a deamon that returns randomly generated password
service pwdgen
{
port = 129
socket_type = stream
wait = no
only_from = localhost
user = pismonosa
server = /usr/local/sbin/apgd
server_args = -M ln -n 1 -m 6 -x 8 -a 1
instances = 1
log_on_failure += USERID
disable = no
}
--------> [cut here]
######################################################
# 3. APG and PHP script
# from http://www.forth.com/rick/
######################################################
After building and installing APG, you must make it
easily available. The simplest is as a web-page
reference. The simplest way to do this is by a php
script located in the root of the web server's data
tree:
--------> [cut here]
<html>
<body>
<pre>
<?
$foo = `/usr/local/bin/apg -n 20`;
echo $foo
?>
</pre>
</body>
</html>
--------> [cut here]
######################################################
# 4. APG v2.1.0b0 and [R,r] letters in mode string
# by Adel I. Mirzazhanov <a-del@iname.com>
######################################################
Since version 2.1.0b0 You can not use symbols R,r to ask
APG not to generate symbols (' ` | \ ? $ ") when You
plan to use special symbol set for password generation.
But You stil can get the same resault with new option
[-e char_string] (see apg(1)). Just run APG like this:
apg -a1 -M s -e \'\`\|\?\$\"\\
This method will work for random password generation
only.

View File

@ -1,283 +0,0 @@
.\" Man page for apg.
.\" Licensed under BSD-like License.
.\" Created by Adel I. Mirzazhanov
.\"
.TH APG 1 "2003 Aug 04" "Automated Password Generator" "User Manual"
.SH NAME
apg
\- generates several random passwords
.SH SYNOPSIS
.B apg
[\fB-a algorithm\fP] [\fB-M mode\fP] [\fB-E char_string\fP]
[\fB-n num_of_pass\fP] [\fB-m min_pass_len\fP] [\fB-x max_pass_len\fP]
[\fB-r\fP \fIdictfile\fP] [\fB-b\fP \fIfilter_file\fP] [\fB-p min_substr_len\fP]
[\fB-s\fP] [\fB-c cl_seed\fP] [\fB-d\fP] [\fB-y\fP] [\fB-l\fP] [\fB-t\fP]
[\fB-k\fP] [\fB-q\fP] [\fB-h\fP] [\fB-v\fP]
.PP
.SH DESCRIPTION
.B apg
generates several random passwords. It uses several password generation
algorithms (currently two) and a built-in pseudo random number generator.
.PP
Default algorithm is pronounceable password generation algorithm
designed by
.B Morrie Gasser
and described in
.B "A Random Word Generator For Pronounceable Passwords"
.I National Technical Information Service (NTIS)
.B AD-A-017676.
The original paper is very old and had never been put online,
so I have to use
.I NIST
implementation described in
.B FIPS-181.
.PP
Another algorithm is simple random character generation algorithm, but it
uses four user-defined symbol sets to produce random password. It means that
user can choose type of symbols that should appear in password. Symbol sets
are: numeric symbol set
.I (0,...,9)
, capital letters symbol set
.I (A,...,Z)
, small letters symbol set
.I (a,...,z)
and special symbols symbol set
.I (#,@,!,...).
.PP
Built-in pseudo random number generator is an implementation of algorithm
described in
.B Appendix C of ANSI X9.17
or
.B RFC1750
with exception that it uses
.I CAST
or
.I SHA-1
instead of
.I Triple DES.
It uses local time with precision of microseconds (see
\fBgettimeofday\fP(2)) and \fI/dev/random\fP (if available) to produce
initial random seed.
.PP
.B apg
also have the ability to check generated password quality using
dictionary. You can use this ability if you specify command-line options
.B -r
.I dictfile
or
.B -b
.I filtername
where \fIdictfile\fP is the dictionary file name and \fIfiltername\fP is the
name of Bloom filter file. In that dictionary you may place words
(one per line) that should not appear as generated passwords. For example: user names,
common words, etc. You even can use one of the dictionaries that come with
.I dictionary password crackers.
Bloom filter file should be created with \fBapgbfm\fP(1) utility included
in apg distribution. In future releases I plan to implement some other
techniques to check passwords (like pattern check) just to make life easier.
.sp
.SH "OPTIONS"
.SS "Password generation modes options"
.TP
.B -a algorithm
use
.B algorithm
for password generation.
.RS
.B 0
- (default) pronounceable password generation
.br
.B 1
- random character password generation
.RE
.TP
.B -n num_of_pass
generate
.B num_of_pass
number of passwords. Default is 6.
.TP
.B -m min_pass_len
generate password with minimum length
.B min_pass_len.
If \fBmin_pass_len > max_pass_len\fP then \fBmax_pass_len = min_pass_len\fP.
Default minimum password length is 8.
.TP
.B -x max_pass_len
generate password with maximum length
.B max_pass_len.
If \fBmin_pass_len > max_pass_len\fP then \fBmax_pass_len = min_pass_len\fP.
Default maximum password length is 10.
.TP
.B -M mode
Use symbolsets specified with \fBmode\fP for password generation.
\fBmode\fP is a text string consisting of characters \fBS\fP, \fBs\fP, \fBN\fP, \fBn\fP,
\fBC\fP, \fBc\fP, \fBL\fP, \fBl\fP. Where:
.RS
.TP
.B S
generator \fBmust\fP use special symbol set for every generated password.
.TP
.B s
generator \fBshould\fP use special symbol set for password generation.
.TP
.B N
generator \fBmust\fP use numeral symbol set for every generated password.
.TP
.B n
generator \fBshould\fP use numeral symbol set for password generation.
.TP
.B C
generator \fBmust\fP use capital symbol set for every generated password.
.TP
.B c
generator \fBshould\fP use capital symbol set for password generation.
.TP
.B L
generator \fBmust\fP use small letters symbol set for every generated password
(always present if pronounceable password
generation algorithm is used).
.TP
.B l
generator \fBshould\fP use small letters symbol set for password generation.
.TP
.B R,r
not supported any more. Use \fB-E char_string\fP option instead.
.RE
.RS
.br
\fBmode\fP can not be more than 4 characters in
length.
.PP
.B Note:
.br
Usage of L, M, N, C will slow down password generation process.
.PP
.B Examples:
.br
\fB-M sncl\fP or \fB-M SNCL\fP or \fB-M Cn\fP
.RE
.TP
.B -E char_string
exclude characters in \fBchar_string\fP from password generation process (in pronounceable
password generation mode you can not exclude small letters). To include special symbols that
can be recognized by shell (apostrophe, quotes, dollar sign, etc.) in \fBchar_string\fP use
the backslashed versions.
.RS
.PP
.B Examples:
.PP
Command \fBapg -a 1 -M n -n 3 -m 8 -E 23456789\fP will generate a set of passwords that
will look like this
.br
\fB10100110\fP
.br
\fB01111000\fP
.br
\fB11011101\fP
.br
.PP
Command \fBapg -a 1 -M nc -n 3 -m 26 -E GHIJKLMNOPQRSTUVWXYZ\fP will generate a set of passwords
that will look like this
.br
\fB16A1653CD4DE5E7BD9584A3476\fP
.br
\fBC8F78E06944AFD57FB9CB882BC\fP
.br
\fB8C8DF37CD792D36D056BBD5002\fP
.br
.RE
.SS "Password quality control options"
.TP
.B -k
check every generated password using \fBcracklib\fP. To use this ability you must
enable cracklib support during programm building.
.TP
.B -r \fIdictfile\fP
check generated passwords for their appearance in
.I dictfile
.TP
.B -b \fIfilter_file\fP
check generated passwords for their appearance in
\fIfilter_file\fP. \fIfilter_file\fP should be created with \fBapgbfm\fP(1)
utility.
.TP
.B -p min_substr_len
this option tells \fBapg\fP(1) to check every substring of the generated
password for appearance in \fIfilter_file\fP. If any of such substrings would
be found in the \fIfilter_file\fP then generated password would be rejected
and apg(1) will generate another one.
\fBmin_substr_len\fP specifies minimum substring length to check.
This option is active only if \fB-b\fP option is defined.
.SS "Pseudo random number generator options"
.TP
.B -s
ask user for random sequence for password generation
.TP
.B -c cl_seed
use
.B cl_seed
as a random seed for password generation. I use it when i have to generate
passwords in a shell script.
.SS "Password output options"
.br
.TP
.B -d
do NOT use any delimiters between generated passwords. I use it when i have to generate
passwords in a shell script.
.TP
.B -y
print generated passwords and crypted passwords (see man \fBcrypt\fP(3))
.TP
.B -q
quiet mode (do not print warnings)
.TP
.B -l
spell genetated passwords. Useful when you want to read generated password by telephone.
.RS
.B WARNING:
Think twice before read your password by phone.
.RE
.TP
.B -t
print pronunciation for generated pronounceable password
.TP
.B -h
print help information and exit
.TP
.B -v
print version information and exit
.SH "DEFAULT OPTIONS"
\fBapg -a 0 -M sncl -n 6 -x 10 -m 8\fP (new style)
.PP
If you want to generate really secure passwords,
you should use option \fB-s\fP. To simplify
.B apg
usage, you can write a small shell script. For example:
.br
\fB[begin]----> pwgen.sh\fP
.br
\fB#!/bin/sh\fP
.br
\fB/usr/local/bin/apg -m 8 -x 12 -s\fP
.br
\fB[ end ]----> pwgen.sh\fP
.SH "EXIT CODE"
On successful completion of its task,
.B apg
will complete with exit code 0. An exit code of -1 indicates an error
occurred. Textual errors are written to the standard error stream.
.SH "DIAGNOSTICS"
If \fI/dev/random\fP is not available, \fBapg\fP will display a
message about it.
.SH "FILES"
.B None.
.SH "BUGS"
.B None.
If you've found one, please send bug description to the author.
.SH "SEE ALSO"
\fBapgd\fP(8), \fBapgbfm\fP(1)
.SH "AUTHOR"
Adel I. Mirzazhanov, <a-del@iname.com>
.br
Project home page: http://www.adel.nursat.kz/apg/

View File

@ -1,132 +0,0 @@
.\" Man page for apgbfm.
.\" Licensed under BSD-like License.
.\" Created by Adel I. Mirzazhanov
.\"
.TH APGBFM 1 "2003 Jun 19" "Automated Password Generator" "User Manual"
.SH NAME
apgbfm
\- APG Bloom filter management program
.SH SYNOPSIS
.B apgbfm
\fB-f\fP \fIfilter\fP \fB-n\fP \fBnumofwords\fP [\fB-q\fP] [\fB-s\fP]
.br
.B apgbfm
\fB-f\fP \fIfilter\fP \fB-d\fP \fIdictfile\fP [\fB-q\fP] [\fB-s\fP]
.br
.B apgbfm
\fB-f\fP \fIfilter\fP \fB-a\fP \fBword\fP [\fB-q\fP]
.br
.B apgbfm
\fB-f\fP \fIfilter\fP \fB-A\fP \fIdictfile\fP [\fB-q\fP]
.br
.B apgbfm
\fB-f\fP \fIfilter\fP \fB-c\fP \fBword\fP [\fB-q\fP]
.br
.B apgbfm
\fB-f\fP \fIfilter\fP \fB-C\fP \fIdictfile\fP [\fB-q\fP]
.br
.B apgbfm
\fB-i\fP \fIfilter\fP
.br
.B apgbfm
[\fB-v\fP] [\fB-h\fP]
.PP
.SH DESCRIPTION
.B apgbfm
is used to manage Bloom filter that is used to restrict password generation
in \fBAPG\fP pasword generation software. Usage of the Bloom filter allows to speed
up password check for large dictionaries and has some other benefits.
.PP
The idea to use Bloom filter for that purpose is came from the description of
the \fBOPUS\fP project \fBOPUS: Preventing Weak Password Choices\fP
\fIPurdue Technical Report CSD-TR 92-028\fP writen by \fIEugene H. Spafford\fP.
.PP
You can obtain this article from:
.br
\fIhttp://www.cerias.purdue.edu/homes/spaf/tech-reps/9128.ps\fP
.br
It has very nice description of Bloom filter and it's advantages for password
checking systems.
.PP
In simple words, \fBapgbfm\fP generates \fIn\fP hash values for every word and
sets corresponding bits in filter file to 1. To check the word \fBapgbfm\fP
generates the same hash functions for that word and if all \fIn\fP corresponding
bits in filter file are set to 1 then it suppose that word exists in dicionary.
\fBapgbfm\fP uses \fBSHA-1\fP as a hash function.
.PP
\fBapgbfm\fP can be used as standalone utility, not only with \fBapg\fP, or
\fBapgd\fP.
.PP
.TP
.B WARNING !!!
Filter file format can be changed
in the future. I'll try to make file formats compatible but i can not guaranty this.
.TP
.B WARNING !!!
\fBapgbfm\fP may slow down your computer during filter creation.
.SH "OPTIONS"
.TP
.B -f \fIfilter\fP
use \fIfilter\fP as the name for Bloom filter filename.
.TP
.B -i \fIfilter\fP
print information about \fIfilter\fP.
.TP
.B -n numofwords
create new empty filter for \fBnumofwords\fP number of words. Useful when you
want to fill filter dynamicaly.
.TP
.B -d \fIdictfile\fP
create new filter from \fIdictfile\fP. It may take a lot of time to
generate filter from a big dictionary. In that dictionary you may place
words (one per line) that should not appear as generated passwords.
For example: user names common words, etc. You even can use one of the
dictionaries that come with \fIdictionary password crackers\fP.
This check is case sensitive. For example, if you want to reject word 'root',
you should insert in \fIdictfile\fP words: root, Root, RoOt, ... , ROOT.
To indicate that program is working \fBapgbfm\fP prints dot for every 100
words added in dictionary.
.TP
.B -a word
add \fBword\fP to the filter.
.TP
.B -A \fIdictfile\fP
add all words from \fIdictfile\fP to the filter. To indicate that program is working
\fBapgbfm\fP prints dot for every 100 words added in dictionary.
.TP
.B -c word
check \fBword\fP for appearance in the filter.
.TP
.B -C \fIdictfile\fP
check every word from \fIdictfile\fP for appearance in the filter.
.TP
.B -q
quiet mode.
.TP
.B -s
create new filter in case-insensitive mode.
.TP
.B -v
print version information.
.TP
.B -h
print help information.
.SH "EXIT CODE"
On successful completion of its task,
.B apgbfm
will complete with exit code 0. An exit code of -1 indicates an error
occurred. Textual errors are written to the standard error stream.
.SH "FILES"
.B None.
.SH "BUGS"
.B None.
If you've found one, please send bug description to the author.
.PP
This man page is Alpha too.
.SH "SEE ALSO"
\fBapgd\fP(8), \fBapg\fP(1)
.SH "AUTHOR"
Adel I. Mirzazhanov, <a-del@iname.com>
.br
Project home page: http://www.adel.nursat.kz/apg/

View File

@ -1,281 +0,0 @@
.\" Man page for apgd.
.\" Licensed under BSD-like License.
.\" Created by Adel I. Mirzazhanov
.\"
.TH APGD 8 "2003 Aug 4" "Automated Password Generator" "User Manual"
.SH NAME
apgd
\- server that generates several random passwords
.SH SYNOPSIS
.B apgd
[\fB-a algorithm\fP] [\fB-M mode\fP] [\fB-E char_string\fP]
[\fB-n num_of_pass\fP] [\fB-m min_pass_len\fP] [\fB-x max_pass_len\fP]
[\fB-r\fP \fIdictfile\fP] [\fB-b\fP \fIfilter_file\fP] [\fB-p min_substr_len\fP] [\fB-k\fP]
[\fB-t\fP] [\fB-l\fP]
.PP
.SH DESCRIPTION
.B apgd
program is a server that supports
.B "Password Generation Protocol"
described in
.B RFC972.
It uses several password generation algorithms (currently two) and a built-in
pseudo random number generator.
.PP
.B apgd
is normally invoked by the Internet superserver (see
.B inetd
(8)) for requests to connect to the pwdgen port (pwdgen port is 129 according to
.B RFC1700
) as indicated by the
.I /etc/services
file (see
.B services
(5)).
.PP
Default algorithm is pronounceable password generation algorithm
designed by
.B Morrie Gasser
and described in
.B """A Random Word Generator For Pronounceable Passwords"""
.I National Technical Information Service (NTIS)
.B AD-A-017676.
The original paper is very old and had never been put online,
so I have to use
.I NIST
implementation described in
.B FIPS-181.
.PP
Another algorithm is simple random character generation algorithm, but it
uses four user-defined symbol sets to produce random password. It means that
user can choose type of symbols that should appear in password. Symbol sets
are: numeric symbol set
.I (0,...,9)
, capital letters symbol set
.I (A,...,Z)
, small letters symbol set
.I (a,...,z)
and special symbols symbol set
.I (#,@,!,...).
.PP
Built-in pseudo random number generator is an implementation of algorithm
described in
.B Appendix C of ANSI X9.17
or
.B RFC1750
with exception that it uses
.I CAST
or
.I SHA-1
instead of
.I Triple DES.
It uses local time with precision of microseconds (see
\fBgettimeofday\fP(2)) and \fI/dev/random\fP (if available) to produce
initial random seed.
.PP
.B apgd
also have the ability to check generated password quality using
dictionary. You can use this ability if you specify command-line option
.B -r
.I dictfile
or
.B -b
.I filtername
where \fIdictfile\fP is dictionary file name and \fIfiltername\fP is the
name of Bloom filter file. In that dictionary you may place words
(one per line) that should not appear as generated passwords. For example: user names
common words, etc. You even can use one of the dictionaries that come with
.I dictionary password crackers.
Bloom filter file should be created with \fBapgbfm\fP(1) utility included
in apg distribution. In future releases I plan to implement some
other techniques to check passwords just to make life easier.
.PP
.B apgd
has the ability log user password generation activity and internal debug information. It does this
using
.br
.I facility
=
.I daemon
.RS
.br
.I priority
=
.I info
for user password generation activity logging
.br
.I priority
=
.I debug
for internal debug information
.br
.RE
See the \fBsyslogd\fP(8) and \fBsyslog.conf\fP(5) man pages for information on how to configure your syslog daemon.
.sp
.SH "OPTIONS"
.SS "Password generation modes options"
.TP
.B -a algorithm
use
.B algorithm
for password generation.
.RS
.B 0
- (default) pronounceable password generation
.br
.B 1
- random character password generation
.RE
.TP
.B -n num_of_pass
generate
.B num_of_pass
number of passwords. Default is 6.
.TP
.B -m min_pass_len
generate password with minimum length
.B min_pass_len.
If \fBmin_pass_len > max_pass_len\fP then \fBmax_pass_len = min_pass_len\fP.
Default minimum password length is 8.
.TP
.B -x max_pass_len
generate password with maximum length
.B max_pass_len
If \fBmin_pass_len > max_pass_len\fP then \fBmax_pass_len = min_pass_len\fP.
Default maximum password length is 10.
.TP
.B -M mode
Use symbolsets specified with \fBmode\fP for password generation.
\fBmode\fP is a text string consisting of characters \fBS\fP, \fBs\fP, \fBN\fP, \fBn\fP,
\fBC\fP, \fBc\fP, \fBL\fP, \fBl\fP. Where:
.RS
.TP
.B S
generator \fBmust\fP use special symbol set for every generated password.
.TP
.B s
generator \fBshould\fP use special symbol set for password generation.
.TP
.B N
generator \fBmust\fP use numeral symbol set for every generated password.
.TP
.B n
generator \fBshould\fP use numeral symbol set for password generation.
.TP
.B C
generator \fBmust\fP use capital symbol set for every generated password.
.TP
.B c
generator \fBshould\fP use capital symbol set for password generation.
.TP
.B L
generator \fBmust\fP use small letters symbol set for every generated password
(always present if pronounceable password
generation algorithm is used).
.TP
.B l
generator \fBshould\fP use small letters symbol set for password generation.
.TP
.B R,r
not supported any more. Use \fB-E char_string\fP option instead.
.RE
.RS
.br
\fBmode\fP can not be more than 4 characters in
length.
.PP
.B Note:
.br
Usage of L, M, N, C will slow down password generation process.
.PP
.B Examples:
.br
\fB-M sncl\fP or \fB-M SNCL\fP or \fB-M Cn\fP
.RE
.TP
.B -E char_string
exclude characters in \fBchar_string\fP from password generation process (in pronounceable
password generation mode you can not exclude small letters). To include special symbols
that can be recognized by shell (apostrophe, quotes, dollar sign, etc.) in \fBchar_string\fP
use the backslashed versions.
.RS
.PP
.B Examples:
.PP
Command \fBapgd -a 1 -M n -n 3 -m 8 -e 23456789\fP will generate a set of passwords that
will look like this
.br
\fB10100110\fP
.br
\fB01111000\fP
.br
\fB11011101\fP
.br
.PP
Command \fBapgd -a 1 -M nc -n 3 -m 26 -e GHIJKLMNOPQRSTUVWXYZ\fP will generate a set of passwords
that will look like this
.br
\fB16A1653CD4DE5E7BD9584A3476\fP
.br
\fBC8F78E06944AFD57FB9CB882BC\fP
.br
\fB8C8DF37CD792D36D056BBD5002\fP
.br
.RE
.SS "Password quality control options"
.TP
.B -k
check every generated password using \fBcracklib\fP. To use this ability you must
enable cracklib support during programm building.
.TP
.B -r \fIdictfile\fP
check generated passwords for their appearance in
.B dictfile
.TP
.B -b \fIfilter_file\fP
check generated passwords for their appearance in
\fIfilter_file\fP. \fIfilter_file\fP should be created with \fBapgbfm\fP(1)
utility.
.TP
.B -p min_substr_len
this option tells \fBapg\fP(1) to check every substring of the generated
password for appearance in \fIfilter_file\fP. If any of such substrings would
be found in the \fIfilter_file\fP then generated password would be rejected
and apg(1) will generate another one.
\fBmin_substr_len\fP is specifies minimum substring length to check.
This option is active only if \fB-b\fP option is defined.
.SS "Password output options"
.TP
.B -l
spell genetated passwords. Useful when you want to read generated password by telephone.
.RS
.B WARNING:
Think twice before read your password by phone.
.RE
.TP
.B -t
print pronunciation for generated pronounceable password
.SH "DEFAULT OPTIONS"
\fBapgd -a 0 -M sncl -n 6 -x 10 -m 8\fP (new style)
.SH "EXIT CODE"
On successful completion of its task,
.B apgd
will complete with exit code 0. An exit code of -1 indicates an error
occurred. Textual errors are written to the
.B syslogd
(8).
.SH "DIAGNOSTICS"
All textual info is written to the
\fBsyslogd\fP(8).
.SH "FILES"
.B None.
.SH "BUGS"
.B None.
If you've found one, please send bug description to the author.
.SH "SEE ALSO"
\fBapg\fP(1), \fBapgbfm\fP(1)
.SH "AUTHOR"
Adel I. Mirzazhanov, <a-del@iname.com>
.br
Project home page: http://www.adel.nursat.kz/apg/

View File

@ -1,196 +0,0 @@
WAPG User Manual WAPG
NAME
apg - generates several random passwords
SYNOPSIS
apg [-a algorithm] [-M mode] [-E char_string] [-n num_of_pass] [-m
min_pass_len] [-x max_pass_len] [-r dictfile] [-b filter_file] [-p
min_substr_len] [-c cl_seed] [-d] [-l] [-t] [-q] [-h] [-v]
DESCRIPTION
apg generates several random passwords. It uses several password gener-
ation algorithms (currently two) and a built-in pseudo random number
generator.
Default algorithm is pronounceable password generation algorithm
designed by Morrie Gasser and described in A Random Word Generator For
Pronounceable Passwords National Technical Information Service (NTIS)
AD-A-017676. The original paper is very old and had never been put
online, so I have to use NIST implementation described in FIPS-181.
Another algorithm is simple random character generation algorithm, but
it uses four user-defined symbol sets to produce random password. It
means that user can choose type of symbols that should appear in pass-
word. Symbol sets are: numeric symbol set (0,...,9) , capital letters
symbol set (A,...,Z) , small letters symbol set (a,...,z) and special
symbols symbol set (#,@,!,...).
Built-in pseudo random number generator is an implementation of algo-
rithm described in Appendix C of ANSI X9.17 or RFC1750 with exception
that it uses CAST or SHA-1 instead of Triple DES. It uses local time
with precision of microseconds (see gettimeofday(2)) and /dev/random
(if available) to produce initial random seed.
apg also have the ability to check generated password quality using
dictionary. You can use this ability if you specify command-line
options -r dictfile or -b filtername where dictfile is the dictionary
file name and filtername is the name of Bloom filter file. In that dic-
tionary you may place words (one per line) that should not appear as
generated passwords. For example: user names, common words, etc. You
even can use one of the dictionaries that come with dictionary password
crackers. Bloom filter file should be created with apgbfm(1) utility
included in apg distribution. In future releases I plan to implement
some other techniques to check passwords (like pattern check) just to
make life easier.
OPTIONS
Password generation modes options
-a algorithm
use algorithm for password generation.
0 - (default) pronounceable password generation
1 - random character password generation
-n num_of_pass
generate num_of_pass number of passwords. Default is 6.
-m min_pass_len
generate password with minimum length min_pass_len. If
min_pass_len > max_pass_len then max_pass_len = min_pass_len.
Default minimum password length is 8.
-x max_pass_len
generate password with maximum length max_pass_len. If
min_pass_len > max_pass_len then max_pass_len = min_pass_len.
Default maximum password length is 10.
-M mode
Use symbolsets specified with mode for password generation.
mode is a text string consisting of characters S, s, N, n, C, c,
L, l. Where:
S generator must use special symbol set for every generated
password.
s generator should use special symbol set for password gen-
eration.
N generator must use numeral symbol set for every generated
password.
n generator should use numeral symbol set for password gen-
eration.
C generator must use capital symbol set for every generated
password.
c generator should use capital symbol set for password gen-
eration.
L generator must use small letters symbol set for every
generated password (always present if pronounceable pass-
word generation algorithm is used).
l generator should use small letters symbol set for pass-
word generation.
R,r not supported any more. Use -E char_string option
instead.
mode can not be more than 4 characters in length.
Note:
Usage of L, M, N, C will slow down password generation process.
Examples:
-M sncl or -M SNCL or -M Cn
-E char_string
exclude characters in char_string from password generation pro-
cess (in pronounceable password generation mode you can not
exclude small letters). To include special symbols that can be
recognized by shell (apostrophe, quotes, dollar sign, etc.) in
char_string use the backslashed versions.
Examples:
Command apg -a 1 -M n -n 3 -m 8 -E 23456789 will generate a set
of passwords that will look like this
10100110
01111000
11011101
Command apg -a 1 -M nc -n 3 -m 26 -E GHIJKLMNOPQRSTUVWXYZ will
generate a set of passwords that will look like this
16A1653CD4DE5E7BD9584A3476
C8F78E06944AFD57FB9CB882BC
8C8DF37CD792D36D056BBD5002
Password quality control options
-r dictfile
check generated passwords for their appearance in dictfile
-b filter_file
check generated passwords for their appearance in filter_file.
filter_file should be created with apgbfm(1) utility.
-p min_substr_len
this option tells apg(1) to check every substring of the gener-
ated password for appearance in filter_file. If any of such sub-
strings would be found in the filter_file then generated pass-
word would be rejected and apg(1) will generate another one.
min_substr_len specifies minimum substring length to check.
This option is active only if -b option is defined.
Pseudo random number generator options
-c cl_seed
use cl_seed as a random seed for password generation. I use it
when i have to generate passwords in a shell script.
Password output options
-d do NOT use any delimiters between generated passwords. I use it
when i have to generate passwords in a shell script.
-q quiet mode (do not print warnings)
-l spell genetated passwords. Useful when you want to read gener-
ated password by telephone.
WARNING: Think twice before read your password by phone.
-t print pronunciation for generated pronounceable password
-h print help information and exit
-v print version information and exit
DEFAULT OPTIONS
apg -a 0 -M sncl -n 6 -x 10 -m 8 (new style)
If you want to generate really secure passwords, you should use option
-s.
EXIT CODE
On successful completion of its task, apg will complete with exit code
0. An exit code of -1 indicates an error occurred. Textual errors are
written to the standard error stream.
FILES
None.
BUGS
None. If you've found one, please send bug description to the author.
SEE ALSO
wapgbfm.txt
AUTHOR
Adel I. Mirzazhanov, <a-del@iname.com>
Project home page: http://www.adel.nursat.kz/apg/
Automated Password Generator 2003 Aug 04 WAPG

View File

@ -1,118 +0,0 @@
APGBFM(1) User Manual APGBFM(1)
NAME
apgbfm - APG Bloom filter management program
SYNOPSIS
apgbfm -f filter -n numofwords [-q] [-s]
apgbfm -f filter -d dictfile [-q] [-s]
apgbfm -f filter -a word [-q]
apgbfm -f filter -A dictfile [-q]
apgbfm -f filter -c word [-q]
apgbfm -f filter -C dictfile [-q]
apgbfm -i filter
apgbfm [-v] [-h]
DESCRIPTION
apgbfm is used to manage Bloom filter that is used to restrict password
generation in APG pasword generation software. Usage of the Bloom fil-
ter allows to speed up password check for large dictionaries and has
some other benefits.
The idea to use Bloom filter for that purpose is came from the descrip-
tion of the OPUS project OPUS: Preventing Weak Password Choices Purdue
Technical Report CSD-TR 92-028 writen by Eugene H. Spafford.
You can obtain this article from:
http://www.cerias.purdue.edu/homes/spaf/tech-reps/9128.ps
It has very nice description of Bloom filter and it's advantages for
password checking systems.
In simple words, apgbfm generates n hash values for every word and sets
corresponding bits in filter file to 1. To check the word apgbfm gener-
ates the same hash functions for that word and if all n corresponding
bits in filter file are set to 1 then it suppose that word exists in
dicionary. apgbfm uses SHA-1 as a hash function.
apgbfm can be used as standalone utility, not only with apg, or apgd.
WARNING !!!
Filter file format can be changed in the future. I'll try to
make file formats compatible but i can not guaranty this.
WARNING !!!
apgbfm may slow down your computer during filter creation.
OPTIONS
-f filter
use filter as the name for Bloom filter filename.
-i filter
print information about filter.
-n numofwords
create new empty filter for numofwords number of words. Useful
when you want to fill filter dynamicaly.
-d dictfile
create new filter from dictfile. It may take a lot of time to
generate filter from a big dictionary. In that dictionary you
may place words (one per line) that should not appear as gener-
ated passwords. For example: user names common words, etc. You
even can use one of the dictionaries that come with dictionary
password crackers. This check is case sensitive. For example,
if you want to reject word 'root', you should insert in dictfile
words: root, Root, RoOt, ... , ROOT. To indicate that program
is working apgbfm prints dot for every 100 words added in dic-
tionary.
-a word
add word to the filter.
-A dictfile
add all words from dictfile to the filter. To indicate that pro-
gram is working apgbfm prints dot for every 100 words added in
dictionary.
-c word
check word for appearance in the filter.
-C dictfile
check every word from dictfile for appearance in the filter.
-q quiet mode.
-s create new filter in case-insensitive mode.
-v print version information.
-h print help information.
EXIT CODE
On successful completion of its task, apgbfm will complete with exit
code 0. An exit code of -1 indicates an error occurred. Textual
errors are written to the standard error stream.
FILES
None.
BUGS
None. If you've found one, please send bug description to the author.
This man page is Alpha too.
SEE ALSO
apgd(8), apg(1)
AUTHOR
Adel I. Mirzazhanov, <a-del@iname.com>
Project home page: http://www.adel.nursat.kz/apg/
Automated Password Generator 2003 Jun 19 APGBFM(1)

View File

@ -1,235 +0,0 @@
pronunciation guide for unix
29 Apr 97
How do I pronounce "vi" , or "!", or "/*", or ...?
You can start a very long and pointless discussion by wondering
about this topic on the net. Some people say "vye", some say
"vee-eye" (the vi manual suggests this) and some Roman numerologists
say "six". How you pronounce "vi" has nothing to do with whether
or not you are a true Unix wizard.
Similarly, you'll find that some people pronounce "char" as "care",
and that there are lots of ways to say "#" or "/*" or "!" or
"tty" or "/etc". No one pronunciation is correct - enjoy the regional
dialects and accents.
Since this topic keeps coming up on the net, here is a comprehensive
pronunciation list that has made the rounds.
The Pronunciation Guide
-----------------------
version 2.5
Names derived from UNIX are marked with *, names derived from C are marked
with +, names derived from (Net)Hack are marked with & and names deserving
further explanation are marked with a #. The explanations will be given at
the very end.
------------------------------------------------------------------------------
-- SINGLE CHARACTERS --
SPACE, blank, ghost&
! EXCLAMATION POINT, exclamation (mark), (ex)clam, excl, wow, hey, boing,
bang#, shout, yell, shriek, pling, factorial, ball-bat, smash, cuss,
store#, potion&, not*+, dammit*#
" QUOTATION MARK, (double) quote, dirk, literal mark, rabbit ears,
double ping, double glitch, amulet&, web&, inverted commas
# CROSSHATCH, pound, pound sign, number, number sign, sharp, octothorpe#,
hash, (garden) fence, crunch, mesh, hex, flash, grid, pig-pen,
tictactoe, scratch (mark), (garden) gate, hak, oof, rake, sink&,
corridor&, unequal#, punch mark
$ DOLLAR SIGN, dollar, cash, currency symbol, buck, string#, escape#,
ding, big-money, gold&, Sonne#
% PERCENT SIGN, percent, mod+, shift-5, double-oh-seven, grapes, food&
& AMPERSAND, and, amper, address+, shift-7, andpersand, snowman,
bitand+, donald duck#, daemon&, background*, pretzel
' APOSTROPHE, (single) quote, tick, prime, irk, pop, spark, glitch,
lurker above&
* ASTERISK, star, splat, spider, aster, times, wildcard*, gear, dingle,
(Nathan) Hale#, bug, gem&, twinkle, funny button#, pine cone, glob*
() PARENTHESES, parens, round brackets, bananas, ears, bowlegs
( LEFT PARENTHESIS, (open) paren, so, wane, parenthesee, open, sad,
tool&
) RIGHT PARENTHESIS, already, wax, unparenthesee, close (paren), happy,
thesis, weapon&
+ PLUS SIGN, plus, add, cross, and, intersection, door&, spellbook&
, COMMA, tail, trapper&
- HYPHEN, minus (sign), dash, dak, option, flag, negative (sign), worm,
bithorpe#
. PERIOD, dot, decimal (point), (radix) point, spot, full stop,
put#, floor&
/ SLASH, stroke, virgule, solidus, slant, diagonal, over, slat, slak,
across#, compress#, reduce#, replicate#, spare, divided-by, wand&,
forward slash, shilling#
: COLON, two-spot, double dot, dots, chameleon&
; SEMICOLON, semi, hybrid, giant eel&, go-on#
<> ANGLE BRACKETS, angles, funnels, brokets, pointy brackets, widgets
< LESS THAN, less, read from*, from*, in*, comesfrom*, crunch,
sucks, left chevron#, open pointy (brack[et]), bra#, upstairs&, west,
(left|open) widget
> GREATER THAN, more, write to*, into/toward*, out*, gazinta*, zap,
blows, right chevron#, closing pointy (brack[et]), ket#, downstairs&,
east, (right|close) widget
= EQUAL SIGN, equal(s), gets, becomes, quadrathorpe#, half-mesh, ring&
? QUESTION MARK, question, query, whatmark, what, wildchar*, huh, ques,
kwes, quiz, quark, hook, scroll&, interrogation point
@ AT SIGN, at, each, vortex, whirl, whirlpool, cyclone, snail, ape (tail),
cat, snable-a#, trunk-a#, rose, cabbage, Mercantile symbol, strudel#,
fetch#, shopkeeper&, human&, commercial-at, monkey (tail)
[] BRACKETS, square brackets, U-turns, edged parentheses
[ LEFT BRACKET, bracket, bra, (left) square (brack[et]), opensquare,
armor&
] RIGHT BRACKET, unbracket, ket, right square (brack[et]), unsquare, close,
mimic&
\ BACKSLASH, reversed virgule, bash, (back)slant, backwhack, backslat,
escape*, backslak, bak, scan#, expand#, opulent throne&, slosh, slope,
blash
^ CIRCUMFLEX, caret, carrot, (top)hat, cap, uphat, party hat, housetop,
up arrow, control, boink, chevron, hiccup, power, to-the(-power), fang,
sharkfin, and#, xor+, wok, trap&, pointer#, pipe*, upper-than#
_ UNDERSCORE, underline, underbar, under, score, backarrow, flatworm, blank,
chain&, gets#, dash#, sneak
` GRAVE, (grave/acute) accent, backquote, left/open quote, backprime,
unapostrophe, backspark, birk, blugle, backtick, push, backglitch,
backping, execute#, boulder&, rock&, blip
{} BRACES, curly braces, squiggly braces, curly brackets, squiggle brackets,
Tuborgs#, ponds, curly chevrons#, squirrly braces, hitchcocks#,
chippendale brackets#
{ LEFT BRACE, brace, curly, leftit, embrace, openbrace, begin+,
fountain&
} RIGHT BRACE, unbrace, uncurly, rytit, bracelet, close, end+, a pool&
| VERTICAL BAR, pipe*, pipe to*, vertical line, broken line#, bar, or+,
bitor+, vert, v-bar, spike, to*, gazinta*, thru*, pipesinta*, tube,
mark, whack, gutter, wall&
~ TILDE, twiddle, tilda, tildee, wave, squiggle, swung dash, approx,
wiggle, enyay#, home*, worm, not+
-- MULTIPLE CHARACTER STRINGS --
!? interrobang (one overlapped character)
*/ asterslash+, times-div#
/* slashterix+, slashaster
:= becomes#
<- gets
<< left-shift+, double smaller
<> unequal#
>> appends*, cat-astrophe, right-shift+, double greater
-> arrow+, pointer to+, hiccup+
#! sh'bang, wallop
\!* bash-bang-splat
() nil#
&& and+, and-and+, amper-amper, succeeds-then*
|| or+, or-or+, fails-then*
-- NOTES --
! bang comes from old card punch phenom where punching ! code made a
loud noise; however, this pronunciation is used in the (non-
computerized) publishing and typesetting industry in the U.S.
too, so ...
Alternatively it could have come from comic books, where the
words each character utters are shown in a "balloon" near that
character's head. When one character shoots another, it is
common to see a balloon pointing at the barrel of the gun to
denote that the gun had been fired, not merely aimed.
That balloon contained the word "!" -- hence, "!" == "Bang!"
! store from FORTH
! dammit as in "quit, dammit!" while exiting vi and hoping one hasn't
clobbered a file too badly
# octothorpe from Bell System (orig. octalthorpe)
# unequal e.g. Modula-2
$ string from BASIC
$ escape from TOPS-10
$ Sonne In the "socialist" countries they used and are using all kinds
of IBM clones (hardware + sw). It was a common practice just
to rename everything (IBM 360 --> ESER 1040 etc.).
Of course the "dollar" sign had to be renamed - it became the
"international currency symbol" which looks like a circle with
4 rays spreading from it:
____
\/ \/
/ \
\ /
/\____/\
Because it looks like a (small) shining sun, in the German
Democratic Republic it was usually called "Sonne" (sun).
& donald duck from the Danish "Anders And", which means "Donald Duck"
* splat from DEC "spider" glyph
* Nathan Hale "I have but one asterisk for my country."
* funny button at Pacific Bell, * was referred to by employees as the "funny
button", which did not please management at all when it became
part of the corporate logo of Pacific Telesis, the holding
company ...
*/ times-div from FORTH
= quadrathorpe half an octothorpe
- bithorpe half a quadrathorpe (So what's a monothorpe?)
. put Victor Borge's Phonetic Punctuation which dates back to the
middle 1950's
/ across APL
/ compress APL
/ reduce APL
/ replicate APL
/ shilling from the British currency symbol
:= becomes e.g. Pascal
; go-on Algol68
< left chevron from the military: worn vertically on the sleeve to signify
rating
< bra from quantum mechanics
<> unequal e.g. Pascal
> right chevron see "< left chevron"
> ket from quantum mechanics
@ snable-a from Danish; may translate as "trunk-a"
@ trunk-a "trunk" = "elephant nose"
@ strudel as in Austrian apple cake
@ fetch from FORTH
\ scan APL
\ expand APL
^ and from formal logic
^ pointer from PASCAL
^ upper-than cf. > and <
_ gets some alternative representation of underscore resembles a
backarrow
_ dash as distinct from '-' == minus
` execute from shell command substitution
{} Tuborgs from advertizing for well-known Danish beverage
{} curly chevr. see "< left chevron"
{} hitchcocks from the old Alfred Hitchcock show, with the stylized profile
of the man
{} chipp. br. after Chippendale chairs
| broken line EBCDIC has two vertical bars, one solid and one broken.
~ enyay from the Spanish n-tilde
() nil LISP

View File

@ -1,114 +0,0 @@
Network Working Group F. Wancho
Request for Comments: 972 WSMR
January 1986
Password Generator Protocol
STATUS OF THIS MEMO
This RFC specifies a standard for the ARPA Internet community. Hosts
on the ARPA Internet that choose to implement a Password Generator
Protocol (PWDGEN) are expected to adopt and implement this standard.
Distribution of this memo is unlimited.
BACKGROUND
Many security-conscious host administrators are becoming increasingly
aware that user-selected login passwords are too easy to guess for
even casual penetration attempts. Some sites have implemented
dictionary lookup techniques in their password programs to prevent
ordinary words from being used. Others have implemented some variant
of a randomly generated password with mixed success. The problem
arises from the fact that such passwords are difficult to remember
because they cannot be pronounced or are based on a relatively short
cycle pseudo-random number generator.
A version of the PWDGEN algorithm briefly described below has been in
use for several years at a small number of sites in the Internet.
Interest has recently been expressed at porting this algorithm to
other sites. However, the relatively short cycle and the resulting
randomness of the pseudo-random number generator available on these
sites tends to interfere with the intended result of minimizing the
potential duplication of passwords both within a site and across
sites when a user has access to more than one site.
The PWDGEN Service described herein provides a means for sites to
offer a list of possible passwords for the user to choose one from
the first set, or optionally select from another set. With more than
one site offering this service, it is then possible to randomly
select which site to use and have multiple fallback sites should that
site be unavailable.
Description
The PWDGEN Service provides a set of six randomly generated
eight-character CRLF-delimited "words" with a reasonable level of
pronounceability, using a multi-level algorithm. An
implementation of the algorithm is available in FORTRAN-77 for
examination and possible implementation by system administrators
only.
Wancho [Page 1]
RFC 972 January 1986
Password Generator Protocol
The uniqueness of the generated words is highly dependent on the
randomness of the initial seed value used. The availability of a
single system-wide seed, updated after each access is highly
desireable. Seeds based on a time-of-day clock are unacceptable.
Seed values should be stored as values in excess of 32 bits for
best performance.
TCP Based PWDGEN Service
One PWDGEN service is defined as a connection based application on
TCP. A server listens for TCP connections on TCP port 129. Once
a connection is established, the six CRLF-delimited words are
generated and sent to the caller, and the connection is closed by
the server. No dialog is used or required.
UDP Based PWDGEN Service
Another possible PWDGEN service is defined as a datagram based
application on UDP. A server listens for UDP datagrams on UDP
port 129. When a datagram is received, the six CRLF-delimited
words are sent back in an answering datagram.
Wancho [Page 2]

File diff suppressed because it is too large Load Diff

View File

@ -1,251 +0,0 @@
#!/bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5 (mit/util/scripts/install.sh).
#
# Copyright 1991 by the Massachusetts Institute of Technology
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of M.I.T. not be used in advertising or
# publicity pertaining to distribution of the software without specific,
# written prior permission. M.I.T. makes no representations about the
# suitability of this software for any purpose. It is provided "as is"
# without express or implied warranty.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
while [ x"$1" != x ]; do
case $1 in
-c) instcmd="$cpprog"
shift
continue;;
-d) dir_arg=true
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-s) stripcmd="$stripprog"
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
if [ x"$src" = x ]
then
echo "install: no input file specified"
exit 1
else
true
fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d $dst ]; then
instcmd=:
chmodcmd=""
else
instcmd=mkdir
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f $src -o -d $src ]
then
true
else
echo "install: $src does not exist"
exit 1
fi
if [ x"$dst" = x ]
then
echo "install: no destination specified"
exit 1
else
true
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d $dst ]
then
dst="$dst"/`basename $src`
else
true
fi
fi
## this sed command emulates the dirname command
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
IFS="${IFS-${defaultIFS}}"
oIFS="${IFS}"
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS="${oIFS}"
pathcomp=''
while [ $# -ne 0 ] ; do
pathcomp="${pathcomp}${1}"
shift
if [ ! -d "${pathcomp}" ] ;
then
$mkdirprog "${pathcomp}"
else
true
fi
pathcomp="${pathcomp}/"
done
fi
if [ x"$dir_arg" != x ]
then
$doit $instcmd $dst &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
else
# If we're going to rename the final executable, determine the name now.
if [ x"$transformarg" = x ]
then
dstfile=`basename $dst`
else
dstfile=`basename $dst $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
if [ x"$dstfile" = x ]
then
dstfile=`basename $dst`
else
true
fi
# Make a temp file name in the proper directory.
dsttmp=$dstdir/#inst.$$#
# Move or copy the file name to the temp name
$doit $instcmd $src $dsttmp &&
trap "rm -f ${dsttmp}" 0 &&
# and set any options; do chmod last to preserve setuid bits
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
# Now rename the file to the real destination.
$doit $rmcmd -f $dstdir/$dstfile &&
$doit $mvcmd $dsttmp $dstdir/$dstfile
fi &&
exit 0

View File

@ -1,40 +0,0 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain
# $Id: mkinstalldirs,v 1.13 1999/01/05 03:18:55 bje Exp $
errstatus=0
for file
do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
pathcomp=
for d
do
pathcomp="$pathcomp$d"
case "$pathcomp" in
-* ) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
fi
fi
pathcomp="$pathcomp/"
done
done
exit $errstatus
# mkinstalldirs ends here

View File

@ -1,10 +0,0 @@
#!/usr/bin/perl -w
$host = "localhost";
use IO::Socket;
$remote = IO::Socket::INET->new(
Proto => "tcp",
PeerAddr => $host,
PeerPort => "pwdgen(129)",
)
or die "cannot connect to pwdgen port at $host";
while ( <$remote> ) { print }

View File

@ -1,39 +0,0 @@
APG Online is the PHP frontend for Automated Password Generator
It is tested with apg-2.1.0, apache-2.0.40 and php-4.2.3
INSTALL
1. Install Apache with PHP support (see Apache and PHP documentation).
2. Copy index.php to SOME_DIRECTORY inside Apache's document root
Example:
mkdir /usr/local/apache/htdocs/apgonline
cp index.php /usr/local/apache/htdocs/apgonline
3. Copy dictionary file to the SOME_DIRECTORY/lang directory.
Example:
cp lang/english.php /usr/local/apache/htdocs/apgonline/lang
4. Copy theme file to the SOME_DIRECTORY/themes directory.
Example:
cp themes/default.php /usr/local/apache/htdocs/apgonline/themes
4. Edit "Config data" section of index.php
5. Open URL http://your.server.name/apgonline/index.php with Your
favorite browser.
NOTES
a) APG Online uses cookie to save Your settings, so You should enable
cookie support in Your browser settings.
b) I'm not a designer, so themes included in APG distribution is just to
demonstrate a new feature. You can suggest your own theme to include in the
APG distribution.
c) Password quality checks are not supported in PHP frontend because,
if implemented, it can slow down your web server. But you can add
support for them at your own risk.

View File

@ -1,634 +0,0 @@
<?
################################################################
# APGOnline v2.1.0
################################################################
# Config data
################################################################
$apg_title = "Automated Password Generator Online" ;
$generator = "/usr/local/bin/apg -q" ; # APG location
#
# Default options
#
$default_sl = "y"; # Use small letters symbol set. Define "n" if not.
$default_cl = "y"; # Use capital letters symbol set. Define "n" if not.
$default_nb = "y"; # Use numeral symbol set. Define "n" if not.
$default_ss = "y"; # Use special symbol set. Define "n" if not.
$default_algo = "2"; # 1-random. 2-pronounceable.
$default_numofpass = "6"; # default number of passwords to generate. Up to 255.
$default_minpasslength = "6"; # default minimum password length. Up to 255.
$default_maxpasslength = "8"; # default maximum password length. Up to 255.
$default_clseed = ""; # default command line seed.
$print_command_line = "false" ; # true|false define it to something else to
# disable command line printing
####################################################
# Theme settings
#
include ('themes/default.php');
####################################################
# Language settings
include ('lang/english.php');
################################################################
# End of Config data
################################################################
######################################################
# Print formatted text
#
function print_text($font,$size,$color,$text)
{
print "<font ";
if ($font != "default") print "face=\"$font\" ";
if ($size != "0") print "size=\"$size\" ";
print "color=\"$color\">";
print "$text</font>";
}
#################
# Cookie analyzer
# d is delimiter
#
if (isset($apg_online_cky) && (!$_POST['save_settings'])) {
$tok = strtok ($apg_online_cky,"d");
$i = 0;
while ($tok) {
if (($tok == "2") && ($i == "0")) $default_algo = "2";
if (($tok == "1") && ($i == "0")) $default_algo = "1";
if (($tok == "l") && ($i == "1")) $default_sl = "y";
else if (($tok != "l") && ($i == "1")) $default_sl = "n";
if (($tok == "c") && ($i == "2")) $default_cl = "y";
else if (($tok != "c") && ($i == "2")) $default_cl = "n";
if (($tok == "n") && ($i == "3")) $default_nb = "y";
else if (($tok != "n") && ($i == "3")) $default_nb = "n";
if (($tok == "s") && ($i == "4")) $default_ss = "y";
else if (($tok != "n") && ($i == "4")) $default_ss = "n";
if ((is_numeric($tok)) && ($i == "5")) $default_numofpass = $tok;
if ((is_numeric($tok)) && ($i == "6")) $default_minpasslength = $tok;
if ((is_numeric($tok)) && ($i == "7")) $default_maxpasslength = $tok;
$i = $i + 1;
$tok = strtok ("d");
}
$i = 0;
}
###########
# Algorithm
#
if (!$_POST['algo']) $algo = $default_algo;
else $algo = $_POST['algo'];
switch ($algo)
{
case "1":
$generator = $generator . " -a 1";
$cookie_text = $cookie_text . "1d";
break;
case "2":
$generator = $generator . " -a 0";
$cookie_text = $cookie_text . "2d";
break;
case "":
$algo = $default_algo;
$cookie_text = $cookie_text . $algo . "d";
break;
default:
break;
}
############
# Symbolsets
#
$genmode = " -M ";
if (!$_POST['sl']) $sl = $default_sl;
else $sl = $_POST['sl'];
switch($sl)
{
case "y":
$genmode = $genmode . "l";
$cookie_text = $cookie_text . "ld";
break;
case "n":
$cookie_text = $cookie_text . "ed";
break;
case "":
$sl = $default_sl;
$cookie_text = $cookie_text . $sl . "d";
break;
default:
break;
}
if (!$_POST['cl']) $cl = $default_cl;
else $cl = $_POST['cl'];
switch($cl)
{
case "y":
$genmode = $genmode . "c";
$cookie_text = $cookie_text . "cd";
break;
case "n":
$cookie_text = $cookie_text . "ed";
break;
case "":
$cl = $default_cl;
$cookie_text = $cookie_text . $cl . "d";
break;
default:
break;
}
if (!$_POST['nb']) $nb = $default_nb;
else $nb = $_POST['nb'];
switch($nb)
{
case "y":
$genmode = $genmode . "n";
$cookie_text = $cookie_text . "nd";
break;
case "n":
$cookie_text = $cookie_text . "ed";
break;
case "":
$nb = $default_nb;
$cookie_text = $cookie_text . $nb . "d";
break;
default:
break;
}
if (!$_POST['ss']) $ss = $default_ss;
else $ss = $_POST['ss'];
switch($ss)
{
case "y":
$genmode = $genmode . "s";
$cookie_text = $cookie_text . "sd";
break;
case "n":
$cookie_text = $cookie_text . "ed";
break;
case "":
$ss = $default_ss;
$cookie_text = $cookie_text . $ss . "d";
break;
default:
break;
}
if ($genmode != " -M ")
$generator = $generator . $genmode;
###############################
# Number of passwords parameter
#
if (!$_POST['numofpass']) {
$numofpass = $default_numofpass;
$generator= $generator . " -n " . $numofpass;
$cookie_text = $cookie_text . $numofpass . "d";
}
else if (is_numeric($_POST['numofpass'])) {
$numofpass = $_POST['numofpass'];
if ($numofpass >= "255") {
$numofpass = "255";
$generator= $generator . " -n " . $numofpass;
$cookie_text = $cookie_text . $numofpass . "d";
}
else {
$generator= $generator . " -n " . $numofpass;
$cookie_text = $cookie_text . $numofpass . "d";
}
}
else {
$numofpass = $default_numofpass;
$generator= $generator . " -n " . $numofpass;
$cookie_text = $cookie_text . $numofpass . "d";
}
###################################
# Minimum password length parameter
#
if (!$_POST['minpasslength']) {
$minpasslength = $default_minpasslength;
$generator= $generator . " -m " . $minpasslength;
$cookie_text = $cookie_text . $minpasslength . "d";
}
else if (is_numeric($_POST['minpasslength'])) {
$minpasslength = $_POST['minpasslength'];
if ($minpasslength >= "255") {
$minpasslength = "255";
$generator= $generator . " -m " . $minpasslength;
$cookie_text = $cookie_text . $minpasslength . "d";
}
else {
$generator= $generator . " -m " . $minpasslength;
$cookie_text = $cookie_text . $minpasslength . "d";
}
}
else {
$minpasslength = $default_minpasslength;
$generator= $generator . " -m " . $minpasslength;
$cookie_text = $cookie_text . $minpasslength . "d";
}
###################################
# Maximum password length parameter
#
if (!$_POST['maxpasslength']) {
$maxpasslength = $default_maxpasslength;
$generator= $generator . " -x " . $maxpasslength;
$cookie_text = $cookie_text . $maxpasslength . "d";
}
else if (is_numeric($_POST['maxpasslength'])) {
$maxpasslength = $_POST['maxpasslength'];
if ($maxpasslength >= "255") {
$maxpasslength = "255";
$generator= $generator . " -x " . $maxpasslength;
$cookie_text = $cookie_text . $maxpasslength . "d";
}
else {
$generator= $generator . " -x " . $maxpasslength;
$cookie_text = $cookie_text . $maxpasslength . "d";
}
}
else {
$maxpasslength = $default_maxpasslength;
$generator= $generator . " -x " . $maxpasslength;
$cookie_text = $cookie_text . $maxpasslength . "d";
}
#############
# Random seed
#
if (!$_POST['clseed']) {
$clseed = $default_clseed;
}
else {
$clseed = $_POST['clseed'];
#
# base64_encode() is used for security reasons
#
$generator = $generator . " -c " . base64_encode($clseed);
}
###############
# Save settings
#
if ($_POST['save_settings'] == "s") {
setcookie("apg_online_cky");
setcookie("apg_online_cky", "$cookie_text");
}
else if ($_POST['save_settings'] == "r") setcookie("apg_online_cky");
###############################################################
print "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
print "<html>\n";
print "<head>\n";
print " <meta name=\"author\" content=\"Adel I. Mirzazhanov\">\n";
print " <title>APGOnline</title>\n";
print "</head>\n";
print "<body text=\"$page_text\" bgcolor=\"$page_bgcolor\" link=\"$page_link\" alink=\"$page_alink\" vlink=\"$page_vlink\">\n";
unset ($passwords, $outpasswords);
exec ($generator, $passwords);
$max_ii = count($passwords);
for ($ii = 0; $ii < $max_ii; $ii++)
{
$outpasswords[$ii] = htmlspecialchars($passwords[$ii] , ENT_QUOTES);
}
unset ($passwords);
$ii = 0;
print "<center>\n";
print "<form method=\"post\" action=\"$PHP_SELF\" name=\"main\">\n";
print "<table cellpadding=\"0\" cellspacing=\"2\" border=\"0\" width=\"$interface_width\">\n";
print " <tr>\n";
print " <td align=\"center\" colspan=\"2\" bgcolor=\"$interface_header_color\">\n";
print " <table cellpadding=\"$p_border_width\" cellspacing=\"0\" border=\"$p_3d_border_width\" bgcolor=\"$p_border_color\" width=\"100%\">\n";
print " <tr>\n";
print " <td>\n";
print " <table cellpadding=\"1\" cellspacing=\"0\" border=\"0\" bgcolor=\"$p_header_bgcolor\" width=\"100%\">\n";
print " <tr>\n";
print " <th>";
print_text($p_header_font_face,"0",$p_header_font_color,$apg_title);
print "</th>\n";
print " </tr>\n";
print " </table>\n";
print " </td>\n";
print " </tr>\n";
print " </table>\n";
print " </td>\n";
print " </tr>\n";
print " <tr>\n";
print " <td valign=\"top\" align=\"left\">\n";
print " <!-- ###ALGORITHM PANNEL BEGIN -->\n";
print " <table cellpadding=\"$p_border_width\" cellspacing=\"0\" border=\"$p_3d_border_width\" bgcolor=\"$p_border_color\" width=\"$p_width\">\n";
print " <tr>\n";
print " <td>\n";
print " <table cellpadding=\"1\" cellspacing=\"0\" border=\"0\" bgcolor=\"$p_header_bgcolor\" width=\"100%\">\n";
print " <tr>\n";
print " <th align=\"left\" bgcolor=\"$p_header_bgcolor\">";
print_text($p_header_font_face, $p_header_font_size, $p_header_font_color,$message_algorithm);
print "</th>\n";
print " <tr>\n";
print " </table>\n";
print " </td>\n";
print " </tr>\n";
print " <tr>\n";
print " <td>\n";
print " <table cellpadding=\"1\" cellspacing=\"0\" border=\"0\" bgcolor=\"$p_body_bgcolor\" width=\"100%\">\n";
print " <tr>\n";
print " <td>";
print_text($p_body_font_face,$p_body_font_size,$p_body_font_color,$submessage_pronounceable);
print"</td>\n";
print " <td><input type=\"radio\" name=\"algo\" value=\"2\"";
if ($algo == "2") print " checked"; print"></td>\n";
print " </tr>\n";
print " <tr>\n";
print " <td>";
print_text($p_body_font_face,$p_body_font_size,$p_body_font_color,$submessage_random);
print "</td>\n";
print " <td><input type=\"radio\" name=\"algo\" value=\"1\"";
if ($algo == "1") print " checked"; print"></td>\n";
print " </tr>\n";
print " </table>\n";
print " </td>\n";
print " </tr>\n";
print " </table>\n";
print " <!-- ###ALGORITHM PANNEL END -->\n";
print " </td>\n";
print " <td valign=\"top\" align=\"right\">\n";
print " <!-- ###SYMBOLSETS PANNEL BEGIN -->\n";
print " <table cellpadding=\"$p_border_width\" cellspacing=\"0\" border=\"$p_3d_border_width\" bgcolor=\"$p_border_color\" width=\"$p_width\">\n";
print " <tr>\n";
print " <td>\n";
print " <table cellpadding=\"1\" cellspacing=\"0\" border=\"0\" bgcolor=\"$p_header_bgcolor\" width=\"100%\">\n";
print " <tr>\n";
print " <th align=\"left\" bgcolor=\"$p_header_bgcolor\">\n";
print_text($p_header_font_face, $p_header_font_size, $p_header_font_color,$message_symbol_sets);
print "</th>\n";
print " <tr>\n";
print " </table>\n";
print " </td>\n";
print " </tr>\n";
print " <tr>\n";
print " <td>\n";
print " <table cellpadding=\"1\" cellspacing=\"0\" border=\"0\" bgcolor=\"$p_body_bgcolor\" width=\"100%\">\n";
print " <tr>\n";
print " <td>";
print_text($p_body_font_face,$p_body_font_size,$p_body_font_color,$submessage_small_lerrers);
print "</td>\n";
print " <td>";
print_text($p_body_font_face,$p_body_font_size,$p_body_font_color,$message_yes);
print" </td>\n";
print " <td><input type=\"radio\" name=\"sl\" value=\"y\"";
if ($sl=="y") print " checked"; print "></td>\n";
print " <td><input type=\"radio\" name=\"sl\" value=\"n\"";
if ($sl=="n") print " checked"; print "></td>\n";
print " <td>";
print_text($p_body_font_face,$p_body_font_size,$p_body_font_color,$message_no);
print" </td>\n";
print " </tr>\n";
print " <tr>\n";
print " <td>";
print_text($p_body_font_face,$p_body_font_size,$p_body_font_color,$submessage_cap_letters);
print "</td>\n";
print " <td>";
print_text($p_body_font_face,$p_body_font_size,$p_body_font_color,$message_yes);
print" </td>\n";
print " <td><input type=\"radio\" name=\"cl\" value=\"y\"";
if ($cl=="y") print " checked"; print "></td>\n";
print " <td><input type=\"radio\" name=\"cl\" value=\"n\"";
if ($cl=="n") print " checked"; print "></td>\n";
print " <td>";
print_text($p_body_font_face,$p_body_font_size,$p_body_font_color,$message_no);
print" </td>\n";
print " </tr>\n";
print " <tr>\n";
print " <td>";
print_text($p_body_font_face,$p_body_font_size,$p_body_font_color,$submessage_numbers);
print "</td>\n";
print " <td>";
print_text($p_body_font_face,$p_body_font_size,$p_body_font_color,$message_yes);
print" </td>\n";
print " <td><input type=\"radio\" name=\"nb\" value=\"y\"";
if ($nb=="y") print " checked"; print "></td>\n";
print " <td><input type=\"radio\" name=\"nb\" value=\"n\"";
if ($nb=="n") print " checked"; print "></td>\n";
print " <td>";
print_text($p_body_font_face,$p_body_font_size,$p_body_font_color,$message_no);
print" </td>\n";
print " </tr>\n";
print " <tr>\n";
print " <td>";
print_text($p_body_font_face,$p_body_font_size,$p_body_font_color,$submessage_spec_symbols);
print "</td>\n";
print " <td>";
print_text($p_body_font_face,$p_body_font_size,$p_body_font_color,$message_yes);
print" </td>\n";
print " <td><input type=\"radio\" name=\"ss\" value=\"y\"";
if ($ss=="y") print " checked"; print "></td>\n";
print " <td><input type=\"radio\" name=\"ss\" value=\"n\"";
if ($ss=="n") print " checked"; print "></td>\n";
print " <td>";
print_text($p_body_font_face,$p_body_font_size,$p_body_font_color,$message_no);
print" </td>\n";
print " </tr>\n";
print " </table>\n";
print " </td>\n";
print " </tr>\n";
print " </table>\n";
print " <!-- ###SYMBOLSETS PANNEL END -->\n";
print " </td>\n";
print " </tr>\n";
print " <tr>\n";
print " <td valign=\"bottom\" align=\"left\">\n";
print " <!-- ###AMOUNT AND SIZE PANNEL BEGIN -->\n";
print " <table cellpadding=\"$p_border_width\" cellspacing=\"0\" border=\"$p_3d_border_width\" bgcolor=\"$p_border_color\" width=\"$p_width\">\n";
print " <tr>\n";
print " <td>\n";
print " <table cellpadding=\"1\" cellspacing=\"0\" border=\"0\" bgcolor=\"$p_header_bgcolor\" width=\"100%\">\n";
print " <tr>\n";
print " <th align=\"left\" bgcolor=\"$p_header_bgcolor\">";
print_text($p_header_font_face, $p_header_font_size, $p_header_font_color,$message_amount_length);
print "</th>\n";
print " <tr>\n";
print " </table>\n";
print " </td>\n";
print " </tr>\n";
print " <tr>\n";
print " <td>\n";
print " <table cellpadding=\"1\" cellspacing=\"0\" border=\"0\" bgcolor=\"$p_body_bgcolor\" width=\"100%\">\n";
print " <tr>\n";
print " <td>";
print_text($p_body_font_face,$p_body_font_size,$p_body_font_color,$submessage_num_of_pass);
print "</td>\n";
print " <td><input type=\"text\" value=\"$numofpass\" name=\"numofpass\" size=\"3\" maxlength=\"3\"></td>\n";
print " <td>";
print_text($p_body_font_face,$p_body_font_size,$p_body_font_color,$submessage_up_to);
print "</td>\n";
print " </tr>\n";
print " <tr>\n";
print " <td>";
print_text($p_body_font_face,$p_body_font_size,$p_body_font_color,$submessage_min_pass_len);
print "</td>\n";
print " <td><input type=\"text\" value=\"$minpasslength\" name=\"minpasslength\" size=\"3\" maxlength=\"3\"></td>\n";
print " <td>";
print_text($p_body_font_face,$p_body_font_size,$p_body_font_color,$submessage_up_to);
print "</td>\n";
print " </tr>\n";
print " <tr>\n";
print " <td>";
print_text($p_body_font_face,$p_body_font_size,$p_body_font_color,$submessage_max_pass_len);
print "</td>\n";
print " <td><input type=\"text\" value=\"$maxpasslength\" name=\"maxpasslength\" size=\"3\" maxlength=\"3\"></td>\n";
print " <td>";
print_text($p_body_font_face,$p_body_font_size,$p_body_font_color,$submessage_up_to);
print "</td>\n";
print " </tr>\n";
print " </table>\n";
print " </td>\n";
print " </tr>\n";
print " </table>\n";
print " <!-- ###AMOUNT AND SIZE PANNEL END -->\n";
print " </td>\n";
print " <td valign=\"bottom\" align=\"right\">\n";
print " <!-- ###CL_SEED PANNEL BEGIN -->\n";
print " <table cellpadding=\"$p_border_width\" cellspacing=\"0\" border=\"$p_3d_border_width\" bgcolor=\"$p_border_color\" width=\"$p_width\">\n";
print " <tr>\n";
print " <td>\n";
print " <table cellpadding=\"1\" cellspacing=\"0\" border=\"0\" bgcolor=\"$p_header_bgcolor\" width=\"100%\">\n";
print " <tr>\n";
print " <th align=\"left\" bgcolor=\"$p_header_bgcolor\">";
print_text($p_header_font_face, $p_header_font_size, $p_header_font_color,$message_user_random_seed);
print "</th>\n";
print " <tr>\n";
print " </table>\n";
print " </td>\n";
print " </tr>\n";
print " <tr>\n";
print " <td>\n";
print " <table cellpadding=\"1\" cellspacing=\"0\" border=\"0\" bgcolor=\"$p_body_bgcolor\" width=\"100%\">\n";
print " <tr>\n";
print " <td>";
print_text($p_body_font_face,$p_body_font_size,$p_body_font_color,$submessage_seed);
print "</td>\n";
print " <td align=\"right\"><input type=\"text\" name=\"clseed\" value=\"$clseed\" size=\"8\" maxlength=\"8\"></td>\n";
print " </tr>\n";
print " </table>\n";
print " </td>\n";
print " </tr>\n";
print " </table>\n";
print " <!-- ###CL_SEED PANNEL END -->\n";
print " </td>\n";
print " </tr>\n";
print " <tr>\n";
print " <td valign=\"top\" align=\"left\">\n";
print " <!-- ###CLEAR_SETTINGS PANNEL BEGIN -->\n";
print " <table cellpadding=\"$p_border_width\" cellspacing=\"0\" border=\"$p_3d_border_width\" bgcolor=\"$p_border_color\" width=\"$p_width\">\n";
print " <tr>\n";
print " <td>\n";
print " <table cellpadding=\"1\" cellspacing=\"0\" border=\"0\" bgcolor=\"$p_body_bgcolor\" width=\"100%\">\n";
print " <tr>\n";
print " <td>";
print_text($p_body_font_face,$p_body_font_size,$p_body_font_color,$message_remove_saved);
print "</td>\n";
print " <td><input type=\"radio\" name=\"save_settings\" value=\"r\"></td>\n";
print " </tr>\n";
print " </table>\n";
print " </td>\n";
print " </tr>\n";
print " </table>\n";
print " <!-- ###CLEAR_SETTINGS PANNEL END -->\n";
print " </td>\n";
print " <td valign=\"top\" align=\"right\">\n";
print " <!-- ###SAVE_SETTINGS PANNEL BEGIN -->\n";
print " <table cellpadding=\"$p_border_width\" cellspacing=\"0\" border=\"$p_3d_border_width\" bgcolor=\"$p_border_color\" width=\"$p_width\">\n";
print " <tr>\n";
print " <td>\n";
print " <table cellpadding=\"1\" cellspacing=\"0\" border=\"0\" bgcolor=\"$p_body_bgcolor\" width=\"100%\">\n";
print " <tr>\n";
print " <td>";
print_text($p_body_font_face,$p_body_font_size,$p_body_font_color,$message_save_settings);
print "</td>\n";
print " <td><input type=\"radio\" name=\"save_settings\" value=\"s\"</td>\n";
print " </tr>\n";
print " </table>\n";
print " </td>\n";
print " </tr>\n";
print " </table>\n";
print " <!-- ###SAVE_SETTINGS PANNEL END -->\n";
print " </td>\n";
print " </tr>\n";
print " <tr>\n";
print " <td align=\"center\" colspan=\"2\"><input type=\"submit\" value=\"$submit_button_text\"></td>\n";
print " </tr>\n";
print " </table>\n";
print "</form>\n";
print "<!-- ###GENERATED PASSWORDS PANNEL BEGIN -->\n";
print "<table cellpadding=\"$p_border_width\" cellspacing=\"0\" border=\"$p_3d_border_width\" bgcolor=\"$p_border_color\" width=\"$interface_width\">\n";
print " <tr>\n";
print " <td>\n";
print " <table cellpadding=\"1\" cellspacing=\"0\" border=\"0\" bgcolor=\"$p_header_bgcolor\" width=\"100%\">\n";
print " <tr>\n";
print " <th align=\"left\" bgcolor=\"$p_header_bgcolor\">";
print_text($p_header_font_face, $p_header_font_size, $p_header_font_color,$message_generated_pass);
print "</th>\n";
print " <tr>\n";
print " </table>\n";
print " </td>\n";
print " </tr>\n";
print " <tr>\n";
print " <td>\n";
print " <table cellpadding=\"1\" cellspacing=\"0\" border=\"0\" bgcolor=\"$p_body_bgcolor\" width=\"100%\">\n";
$max_i = count ($outpasswords);
for ($i = 0; $i < $max_i; $i++)
{
print " <tr>\n";
if ($i % 2 == 0)
print " <td><tt>$outpasswords[$i]</tt></td>\n";
else
print " <td bgcolor=\"$pass_hilight_color\"><tt>$outpasswords[$i]</tt></td>\n";
print " </tr>\n";
}
$i = 0;
unset($outpasswords);
print " </table>\n";
print " </td>\n";
print " </tr>\n";
print "</table>\n";
print "<br>\n";
print "<!-- ###GENERATED PASSWORDS PANNEL END -->\n";
if ($print_command_line == "true")
{
print "<!-- ###COMMAND LINE PANNEL BEGIN -->\n";
print "<table cellpadding=\"$p_border_width\" cellspacing=\"0\" border=\"$p_3d_border_width\" bgcolor=\"$p_border_color\" width=\"$interface_width\">\n";
print " <tr>\n";
print " <td>\n";
print " <table cellpadding=\"1\" cellspacing=\"0\" border=\"0\" bgcolor=\"$p_header_bgcolor\" width=\"100%\">\n";
print " <tr>\n";
print " <th align=\"left\" bgcolor=\"$p_header_bgcolor\">";
print_text($p_header_font_face, $p_header_font_size, $p_header_font_color,$message_command_line);
print "</th>\n";
print " <tr>\n";
print " </table>\n";
print " </td>\n";
print " </tr>\n";
print " <tr>\n";
print " <td>\n";
print " <table cellpadding=\"1\" cellspacing=\"0\" border=\"0\" bgcolor=\"$p_body_bgcolor\" width=\"100%\">\n";
print " <tr>\n";
print " <td>";
print_text($p_body_font_face,$p_body_font_size,$p_body_font_color,$generator);
print "</td>\n";
print " </tr>\n";
print " </table>\n";
print " </td>\n";
print " </tr>\n";
print "</table>\n";
print " <!-- ###COMMAND LINE PANNEL END -->\n";
}
print "</center>\n";
####################################
# Copyright dada
#
print "<font size=\"-3\" color=\"$copyright_color\">Copyright (c) 2001 Adel I. Mirzazhanov<br>\n";
print "<a href=\"http://www.adel.nursat.kz/apg\">APG Homepage</a></font>\n";
print "</body>\n";
print "</html>\n";
?>

View File

@ -1,25 +0,0 @@
<?
$submit_button_text = "Generate";
$message_algorithm = "Algorithm";
$message_amount_length = "Amount and Length";
$message_symbol_sets = "Symbol sets";
$message_user_random_seed = "User's Random Seed";
$message_save_settings = "Save settings in the cookie";
$message_remove_saved = "Remove saved settings";
$message_command_line = "Command line";
$message_generated_pass = "Generated passwords";
$message_yes = "Yes";
$message_no = "No";
$submessage_pronounceable = "Pronounceable:";
$submessage_random = "Random:";
$submessage_num_of_pass = "Number of passwords to generate:";
$submessage_min_pass_len = "Min. password length:";
$submessage_max_pass_len = "Max. password length:";
$submessage_small_lerrers = "Small letters:";
$submessage_cap_letters = "Capital letters:";
$submessage_numbers = "Numbers";
$submessage_spec_symbols = "Special symbols:";
$submessage_seed = "Seed:";
$submessage_up_to = "up to 255";
header ("Pragma: no-cache");
?>

View File

@ -1,26 +0,0 @@
<?
// Translated by Bernhard Wesely (mail@weselyb.net)
$submit_button_text = "Generieren";
$message_algorithm = "Algorithmus";
$message_amount_length = "Anzahl und Stellen";
$message_symbol_sets = "Zeichensatz";
$message_user_random_seed = "Eigener Random Seed";
$message_save_settings = "Einstellungen in einem cookie speichern";
$message_remove_saved = "Gespeicherte Einstellungen l&ouml;schen";
$message_command_line = "Shell-Befehl";
$message_generated_pass = "Generierte Passw&ouml;rter";
$message_yes = "Ja";
$message_no = "Nein";
$submessage_pronounceable = "Aussprechbar:";
$submessage_random = "Zuf&auml;llig:";
$submessage_num_of_pass = "Anzahl der zu generierenden Passw&ouml;rter:";
$submessage_min_pass_len = "Min. Passwort L&auml;nge:";
$submessage_max_pass_len = "Max. Passwort L&auml;nge:";
$submessage_small_lerrers = "Kleinbuchstaben:";
$submessage_cap_letters = "Grossbuchstaben:";
$submessage_numbers = "Nummern";
$submessage_spec_symbols = "Symbole:";
$submessage_seed = "Seed:";
$submessage_up_to = "bis&nbsp;zu&nbsp;255";
header ("Pragma: no-cache");
?>

View File

@ -1,26 +0,0 @@
<?
$submit_button_text = "Wygeneruj";
$message_algorithm = "Algorytm";
$message_amount_length = "Ilo<EFBFBD><EFBFBD> i d<>ugo<67><6F>";
$message_symbol_sets = "Zestawy znak<61>w";
$message_user_random_seed = "Ziarno u<>ytkownika";
$message_save_settings = "Zapisz ustawienia w \"cookie\"";
$message_remove_saved = "Usu<EFBFBD> zapisane ustawienia";
$message_command_line = "Linia polecenia";
$message_generated_pass = "Wygenerowane has<61>a";
$message_yes = "Tak";
$message_no = "Nie";
$submessage_pronounceable = "Wymawialne:";
$submessage_random = "Losowe:";
$submessage_num_of_pass = "Ilo<EFBFBD><EFBFBD> hase<73> do wygenerowania:";
$submessage_min_pass_len = "Minimalna d<>ugo<67><6F> has<61>a:";
$submessage_max_pass_len = "Maksymalna d<>ugo<67><6F> has<61>a:";
$submessage_small_lerrers = "Ma<EFBFBD>e litery:";
$submessage_cap_letters = "Du<EFBFBD>e litery:";
$submessage_numbers = "Liczby";
$submessage_spec_symbols = "Znaki specjalne:";
$submessage_seed = "Ziarno:";
$submessage_up_to = "do 255";
header( "Content-type: text/html; charset=iso-8859-2" );
header ("Pragma: no-cache");
?>

View File

@ -1,26 +0,0 @@
<?
$submit_button_text = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
$message_algorithm = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
$message_amount_length = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD>";
$message_symbol_sets = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
$message_user_random_seed = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
$message_save_settings = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> cookie";
$message_remove_saved = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
$message_command_line = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
$message_generated_pass = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
$message_yes = "<EFBFBD><EFBFBD>";
$message_no = "<EFBFBD><EFBFBD><EFBFBD>";
$submessage_pronounceable = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:";
$submessage_random = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:";
$submessage_num_of_pass = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:";
$submessage_min_pass_len = "<EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:";
$submessage_max_pass_len = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:";
$submessage_small_lerrers = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>:";
$submessage_cap_letters = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>:";
$submessage_numbers = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:";
$submessage_spec_symbols = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:";
$submessage_seed = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:";
$submessage_up_to = "<EFBFBD><EFBFBD> 255";
header( "Content-type: text/html; charset=windows-1251" );
header ("Pragma: no-cache");
?>

View File

@ -1,26 +0,0 @@
<?
$submit_button_text = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
$message_algorithm = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
$message_amount_length = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD>";
$message_symbol_sets = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
$message_user_random_seed = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
$message_save_settings = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> cookie";
$message_remove_saved = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
$message_command_line = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
$message_generated_pass = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
$message_yes = "<EFBFBD><EFBFBD>";
$message_no = "<EFBFBD><EFBFBD><EFBFBD>";
$submessage_pronounceable = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:";
$submessage_random = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:";
$submessage_num_of_pass = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:";
$submessage_min_pass_len = "<EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:";
$submessage_max_pass_len = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:";
$submessage_small_lerrers = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>:";
$submessage_cap_letters = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>:";
$submessage_numbers = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:";
$submessage_spec_symbols = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:";
$submessage_seed = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:";
$submessage_up_to = "<EFBFBD><EFBFBD> 255";
header( "Content-type: text/html; charset=koi8-r" );
header ("Pragma: no-cache");
?>

View File

@ -1,35 +0,0 @@
<?
###################################
# Standard HTML Page colors
#
$page_bgcolor = "#000000" ;
$page_text = "#ffffff" ;
$page_link = "#33ff33" ;
$page_vlink = "#33ff33" ;
$page_alink = "#ff0000" ;
###################################
# Interface settings
$interface_width = "760";
$copyright_color = "#333333";
###################################
# Pannel properis
#
$p_width = "370";
$p_border_width = "1";
$p_3d_border_width = "0";
$p_border_color = "#009900";
$p_header_bgcolor = "#006600";
$p_header_font_color = "#ffffff";
$p_header_font_size = "0";
$p_header_font_face = "Helvetica,Arial,sans-serif";
$p_body_bgcolor = "#000000";
$p_body_font_color = "#ffffff";
$p_body_font_size = "0";
$p_body_font_face = "Helvetica,Arial,sans-serif";
$pass_hilight_color = "#666666";
?>

View File

@ -1,35 +0,0 @@
<?
###################################
# Standard HTML Page colors
#
$page_bgcolor = "#000000" ;
$page_text = "#ffffff" ;
$page_link = "#33ff33" ;
$page_vlink = "#33ff33" ;
$page_alink = "#ff0000" ;
###################################
# Interface settings
$interface_width = "760";
$copyright_color = "#333333";
###################################
# Pannel properis
#
$p_width = "370";
$p_border_width = "1";
$p_3d_border_width = "0";
$p_border_color = "#cc6600";
$p_header_bgcolor = "#990000";
$p_header_font_color = "#ffffff";
$p_header_font_size = "0";
$p_header_font_face = "Helvetica,Arial,sans-serif";
$p_body_bgcolor = "#000000";
$p_body_font_color = "#ffffff";
$p_body_font_size = "0";
$p_body_font_face = "Helvetica,Arial,sans-serif";
$pass_hilight_color = "#666666";
?>

View File

@ -1,35 +0,0 @@
<?
###################################
# Standard HTML Page colors
#
$page_bgcolor = "#ffffff" ;
$page_text = "#000000" ;
$page_link = "#0000ff" ;
$page_vlink = "#000080" ;
$page_alink = "#ff0000" ;
###################################
# Interface settings
$interface_width = "760";
$copyright_color = "#eeeeee";
###################################
# Pannel properis
#
$p_width = "370";
$p_border_width = "1";
$p_3d_border_width = "0";
$p_border_color = "#6633ff";
$p_header_bgcolor = "#6633ff";
$p_header_font_color = "#ffffff";
$p_header_font_size = "0";
$p_header_font_face = "Helvetica,Arial,sans-serif";
$p_body_bgcolor = "#ffffff";
$p_body_font_color = "#000000";
$p_body_font_size = "-1";
$p_body_font_face = "Helvetica,Arial,sans-serif";
$pass_hilight_color = "#eeeeee";
?>

View File

@ -125,7 +125,8 @@ static int digram[][RULE_SIZE] =
/* ath */ ANY_COMBINATION,
/* awh */ ILLEGAL_PAIR,
/* aqu */ BREAK | NOT_END,
/* ack */ ANY_COMBINATION},
/* ack */ ANY_COMBINATION
},
{ /* ba */ ANY_COMBINATION,
/* bb */ NOT_BEGIN | BREAK | NOT_END,
/* bc */ NOT_BEGIN | BREAK | NOT_END,
@ -159,7 +160,8 @@ static int digram[][RULE_SIZE] =
/* bth */ NOT_BEGIN | BREAK | NOT_END,
/* bwh */ ILLEGAL_PAIR,
/* bqu */ NOT_BEGIN | BREAK | NOT_END,
/* bck */ ILLEGAL_PAIR },
/* bck */ ILLEGAL_PAIR
},
{ /* ca */ ANY_COMBINATION,
/* cb */ NOT_BEGIN | BREAK | NOT_END,
/* cc */ NOT_BEGIN | BREAK | NOT_END,
@ -193,7 +195,8 @@ static int digram[][RULE_SIZE] =
/* cth */ NOT_BEGIN | BREAK | NOT_END,
/* cwh */ ILLEGAL_PAIR,
/* cqu */ NOT_BEGIN | SUFFIX | NOT_END,
/* cck */ ILLEGAL_PAIR},
/* cck */ ILLEGAL_PAIR
},
{ /* da */ ANY_COMBINATION,
/* db */ NOT_BEGIN | BREAK | NOT_END,
/* dc */ NOT_BEGIN | BREAK | NOT_END,
@ -227,7 +230,8 @@ static int digram[][RULE_SIZE] =
/* dth */ NOT_BEGIN | PREFIX,
/* dwh */ ILLEGAL_PAIR,
/* dqu */ NOT_BEGIN | BREAK | NOT_END,
/* dck */ ILLEGAL_PAIR },
/* dck */ ILLEGAL_PAIR
},
{ /* ea */ ANY_COMBINATION,
/* eb */ ANY_COMBINATION,
/* ec */ ANY_COMBINATION,
@ -261,7 +265,8 @@ static int digram[][RULE_SIZE] =
/* eth */ ANY_COMBINATION,
/* ewh */ ILLEGAL_PAIR,
/* equ */ BREAK | NOT_END,
/* eck */ ANY_COMBINATION },
/* eck */ ANY_COMBINATION
},
{ /* fa */ ANY_COMBINATION,
/* fb */ NOT_BEGIN | BREAK | NOT_END,
/* fc */ NOT_BEGIN | BREAK | NOT_END,
@ -295,7 +300,8 @@ static int digram[][RULE_SIZE] =
/* fth */ NOT_BEGIN | BREAK | NOT_END,
/* fwh */ ILLEGAL_PAIR,
/* fqu */ NOT_BEGIN | BREAK | NOT_END,
/* fck */ ILLEGAL_PAIR },
/* fck */ ILLEGAL_PAIR
},
{ /* ga */ ANY_COMBINATION,
/* gb */ NOT_BEGIN | BREAK | NOT_END,
/* gc */ NOT_BEGIN | BREAK | NOT_END,
@ -329,7 +335,8 @@ static int digram[][RULE_SIZE] =
/* gth */ NOT_BEGIN,
/* gwh */ ILLEGAL_PAIR,
/* gqu */ NOT_BEGIN | BREAK | NOT_END,
/* gck */ ILLEGAL_PAIR },
/* gck */ ILLEGAL_PAIR
},
{ /* ha */ ANY_COMBINATION,
/* hb */ NOT_BEGIN | BREAK | NOT_END,
/* hc */ NOT_BEGIN | BREAK | NOT_END,
@ -363,7 +370,8 @@ static int digram[][RULE_SIZE] =
/* hth */ NOT_BEGIN | BREAK | NOT_END,
/* hwh */ ILLEGAL_PAIR,
/* hqu */ NOT_BEGIN | BREAK | NOT_END,
/* hck */ ILLEGAL_PAIR },
/* hck */ ILLEGAL_PAIR
},
{ /* ia */ ANY_COMBINATION,
/* ib */ ANY_COMBINATION,
/* ic */ ANY_COMBINATION,
@ -397,7 +405,8 @@ static int digram[][RULE_SIZE] =
/* ith */ ANY_COMBINATION,
/* iwh */ ILLEGAL_PAIR,
/* iqu */ BREAK | NOT_END,
/* ick */ ANY_COMBINATION },
/* ick */ ANY_COMBINATION
},
{ /* ja */ ANY_COMBINATION,
/* jb */ NOT_BEGIN | BREAK | NOT_END,
/* jc */ NOT_BEGIN | BREAK | NOT_END,
@ -431,7 +440,8 @@ static int digram[][RULE_SIZE] =
/* jth */ NOT_BEGIN | BREAK | NOT_END,
/* jwh */ ILLEGAL_PAIR,
/* jqu */ NOT_BEGIN | BREAK | NOT_END,
/* jck */ ILLEGAL_PAIR },
/* jck */ ILLEGAL_PAIR
},
{ /* ka */ ANY_COMBINATION,
/* kb */ NOT_BEGIN | BREAK | NOT_END,
/* kc */ NOT_BEGIN | BREAK | NOT_END,
@ -465,7 +475,8 @@ static int digram[][RULE_SIZE] =
/* kth */ NOT_BEGIN | BREAK | NOT_END,
/* kwh */ ILLEGAL_PAIR,
/* kqu */ NOT_BEGIN | BREAK | NOT_END,
/* kck */ ILLEGAL_PAIR },
/* kck */ ILLEGAL_PAIR
},
{ /* la */ ANY_COMBINATION,
/* lb */ NOT_BEGIN | PREFIX,
/* lc */ NOT_BEGIN | BREAK | NOT_END,
@ -499,7 +510,8 @@ static int digram[][RULE_SIZE] =
/* lth */ NOT_BEGIN | PREFIX,
/* lwh */ ILLEGAL_PAIR,
/* lqu */ NOT_BEGIN | BREAK | NOT_END,
/* lck */ ILLEGAL_PAIR },
/* lck */ ILLEGAL_PAIR
},
{ /* ma */ ANY_COMBINATION,
/* mb */ NOT_BEGIN | BREAK | NOT_END,
/* mc */ NOT_BEGIN | BREAK | NOT_END,
@ -533,7 +545,8 @@ static int digram[][RULE_SIZE] =
/* mth */ NOT_BEGIN,
/* mwh */ ILLEGAL_PAIR,
/* mqu */ NOT_BEGIN | BREAK | NOT_END,
/* mck */ ILLEGAL_PAIR },
/* mck */ ILLEGAL_PAIR
},
{ /* na */ ANY_COMBINATION,
/* nb */ NOT_BEGIN | BREAK | NOT_END,
/* nc */ NOT_BEGIN | BREAK | NOT_END,
@ -567,7 +580,8 @@ static int digram[][RULE_SIZE] =
/* nth */ NOT_BEGIN,
/* nwh */ ILLEGAL_PAIR,
/* nqu */ NOT_BEGIN | BREAK | NOT_END,
/* nck */ NOT_BEGIN | PREFIX },
/* nck */ NOT_BEGIN | PREFIX
},
{ /* oa */ ANY_COMBINATION,
/* ob */ ANY_COMBINATION,
/* oc */ ANY_COMBINATION,
@ -601,7 +615,8 @@ static int digram[][RULE_SIZE] =
/* oth */ ANY_COMBINATION,
/* owh */ ILLEGAL_PAIR,
/* oqu */ BREAK | NOT_END,
/* ock */ ANY_COMBINATION },
/* ock */ ANY_COMBINATION
},
{ /* pa */ ANY_COMBINATION,
/* pb */ NOT_BEGIN | BREAK | NOT_END,
/* pc */ NOT_BEGIN | BREAK | NOT_END,
@ -635,7 +650,8 @@ static int digram[][RULE_SIZE] =
/* pth */ NOT_BEGIN | BREAK | NOT_END,
/* pwh */ ILLEGAL_PAIR,
/* pqu */ NOT_BEGIN | BREAK | NOT_END,
/* pck */ ILLEGAL_PAIR },
/* pck */ ILLEGAL_PAIR
},
{ /* ra */ ANY_COMBINATION,
/* rb */ NOT_BEGIN | PREFIX,
/* rc */ NOT_BEGIN | PREFIX,
@ -669,7 +685,8 @@ static int digram[][RULE_SIZE] =
/* rth */ NOT_BEGIN | PREFIX,
/* rwh */ ILLEGAL_PAIR,
/* rqu */ NOT_BEGIN | PREFIX | NOT_END,
/* rck */ NOT_BEGIN | PREFIX },
/* rck */ NOT_BEGIN | PREFIX
},
{ /* sa */ ANY_COMBINATION,
/* sb */ NOT_BEGIN | BREAK | NOT_END,
/* sc */ NOT_END,
@ -703,7 +720,8 @@ static int digram[][RULE_SIZE] =
/* sth */ NOT_BEGIN | BREAK | NOT_END,
/* swh */ ILLEGAL_PAIR,
/* squ */ SUFFIX | NOT_END,
/* sck */ NOT_BEGIN },
/* sck */ NOT_BEGIN
},
{ /* ta */ ANY_COMBINATION,
/* tb */ NOT_BEGIN | BREAK | NOT_END,
/* tc */ NOT_BEGIN | BREAK | NOT_END,
@ -737,7 +755,8 @@ static int digram[][RULE_SIZE] =
/* tth */ NOT_BEGIN | BREAK | NOT_END,
/* twh */ ILLEGAL_PAIR,
/* tqu */ NOT_BEGIN | BREAK | NOT_END,
/* tck */ ILLEGAL_PAIR },
/* tck */ ILLEGAL_PAIR
},
{ /* ua */ NOT_BEGIN | BREAK | NOT_END,
/* ub */ ANY_COMBINATION,
/* uc */ ANY_COMBINATION,
@ -771,7 +790,8 @@ static int digram[][RULE_SIZE] =
/* uth */ ANY_COMBINATION,
/* uwh */ ILLEGAL_PAIR,
/* uqu */ BREAK | NOT_END,
/* uck */ ANY_COMBINATION },
/* uck */ ANY_COMBINATION
},
{ /* va */ ANY_COMBINATION,
/* vb */ NOT_BEGIN | BREAK | NOT_END,
/* vc */ NOT_BEGIN | BREAK | NOT_END,
@ -805,7 +825,8 @@ static int digram[][RULE_SIZE] =
/* vth */ NOT_BEGIN | BREAK | NOT_END,
/* vwh */ ILLEGAL_PAIR,
/* vqu */ NOT_BEGIN | BREAK | NOT_END,
/* vck */ ILLEGAL_PAIR },
/* vck */ ILLEGAL_PAIR
},
{ /* wa */ ANY_COMBINATION,
/* wb */ NOT_BEGIN | PREFIX,
/* wc */ NOT_BEGIN | BREAK | NOT_END,
@ -839,7 +860,8 @@ static int digram[][RULE_SIZE] =
/* wth */ NOT_BEGIN,
/* wwh */ ILLEGAL_PAIR,
/* wqu */ NOT_BEGIN | BREAK | NOT_END,
/* wck */ NOT_BEGIN },
/* wck */ NOT_BEGIN
},
{ /* xa */ NOT_BEGIN,
/* xb */ NOT_BEGIN | BREAK | NOT_END,
/* xc */ NOT_BEGIN | BREAK | NOT_END,
@ -873,7 +895,8 @@ static int digram[][RULE_SIZE] =
/* xth */ NOT_BEGIN | BREAK | NOT_END,
/* xwh */ ILLEGAL_PAIR,
/* xqu */ NOT_BEGIN | BREAK | NOT_END,
/* xck */ ILLEGAL_PAIR },
/* xck */ ILLEGAL_PAIR
},
{ /* ya */ ANY_COMBINATION,
/* yb */ NOT_BEGIN,
/* yc */ NOT_BEGIN | NOT_END,
@ -907,7 +930,8 @@ static int digram[][RULE_SIZE] =
/* yth */ NOT_BEGIN | BREAK | NOT_END,
/* ywh */ ILLEGAL_PAIR,
/* yqu */ NOT_BEGIN | BREAK | NOT_END,
/* yck */ ILLEGAL_PAIR },
/* yck */ ILLEGAL_PAIR
},
{ /* za */ ANY_COMBINATION,
/* zb */ NOT_BEGIN | BREAK | NOT_END,
/* zc */ NOT_BEGIN | BREAK | NOT_END,
@ -941,7 +965,8 @@ static int digram[][RULE_SIZE] =
/* zth */ NOT_BEGIN | BREAK | NOT_END,
/* zwh */ ILLEGAL_PAIR,
/* zqu */ NOT_BEGIN | BREAK | NOT_END,
/* zck */ ILLEGAL_PAIR },
/* zck */ ILLEGAL_PAIR
},
{ /* cha */ ANY_COMBINATION,
/* chb */ NOT_BEGIN | BREAK | NOT_END,
/* chc */ NOT_BEGIN | BREAK | NOT_END,
@ -975,7 +1000,8 @@ static int digram[][RULE_SIZE] =
/* chth */ NOT_BEGIN | BREAK | NOT_END,
/* chwh */ ILLEGAL_PAIR,
/* chqu */ NOT_BEGIN | BREAK | NOT_END,
/* chck */ ILLEGAL_PAIR },
/* chck */ ILLEGAL_PAIR
},
{ /* gha */ ANY_COMBINATION,
/* ghb */ NOT_BEGIN | BREAK | PREFIX | NOT_END,
/* ghc */ NOT_BEGIN | BREAK | PREFIX | NOT_END,
@ -1009,7 +1035,8 @@ static int digram[][RULE_SIZE] =
/* ghth */ NOT_BEGIN | BREAK | PREFIX | NOT_END,
/* ghwh */ ILLEGAL_PAIR,
/* ghqu */ NOT_BEGIN | BREAK | PREFIX | NOT_END,
/* ghck */ ILLEGAL_PAIR },
/* ghck */ ILLEGAL_PAIR
},
{ /* pha */ ANY_COMBINATION,
/* phb */ NOT_BEGIN | BREAK | NOT_END,
/* phc */ NOT_BEGIN | BREAK | NOT_END,
@ -1043,7 +1070,8 @@ static int digram[][RULE_SIZE] =
/* phth */ NOT_BEGIN | BREAK | NOT_END,
/* phwh */ ILLEGAL_PAIR,
/* phqu */ NOT_BEGIN | BREAK | NOT_END,
/* phck */ ILLEGAL_PAIR },
/* phck */ ILLEGAL_PAIR
},
{ /* rha */ BEGIN | NOT_END,
/* rhb */ ILLEGAL_PAIR,
/* rhc */ ILLEGAL_PAIR,
@ -1077,7 +1105,8 @@ static int digram[][RULE_SIZE] =
/* rhth */ ILLEGAL_PAIR,
/* rhwh */ ILLEGAL_PAIR,
/* rhqu */ ILLEGAL_PAIR,
/* rhck */ ILLEGAL_PAIR },
/* rhck */ ILLEGAL_PAIR
},
{ /* sha */ ANY_COMBINATION,
/* shb */ NOT_BEGIN | BREAK | NOT_END,
/* shc */ NOT_BEGIN | BREAK | NOT_END,
@ -1111,7 +1140,8 @@ static int digram[][RULE_SIZE] =
/* shth */ NOT_BEGIN | BREAK | NOT_END,
/* shwh */ ILLEGAL_PAIR,
/* shqu */ NOT_BEGIN | BREAK | NOT_END,
/* shck */ ILLEGAL_PAIR },
/* shck */ ILLEGAL_PAIR
},
{ /* tha */ ANY_COMBINATION,
/* thb */ NOT_BEGIN | BREAK | NOT_END,
/* thc */ NOT_BEGIN | BREAK | NOT_END,
@ -1145,7 +1175,8 @@ static int digram[][RULE_SIZE] =
/* thth */ ILLEGAL_PAIR,
/* thwh */ ILLEGAL_PAIR,
/* thqu */ NOT_BEGIN | BREAK | NOT_END,
/* thck */ ILLEGAL_PAIR },
/* thck */ ILLEGAL_PAIR
},
{ /* wha */ BEGIN | NOT_END,
/* whb */ ILLEGAL_PAIR,
/* whc */ ILLEGAL_PAIR,
@ -1179,7 +1210,8 @@ static int digram[][RULE_SIZE] =
/* whth */ ILLEGAL_PAIR,
/* whwh */ ILLEGAL_PAIR,
/* whqu */ ILLEGAL_PAIR,
/* whck */ ILLEGAL_PAIR },
/* whck */ ILLEGAL_PAIR
},
{ /* qua */ ANY_COMBINATION,
/* qub */ ILLEGAL_PAIR,
/* quc */ ILLEGAL_PAIR,
@ -1213,7 +1245,8 @@ static int digram[][RULE_SIZE] =
/* quth */ ILLEGAL_PAIR,
/* quwh */ ILLEGAL_PAIR,
/* ququ */ ILLEGAL_PAIR,
/* quck */ ILLEGAL_PAIR },
/* quck */ ILLEGAL_PAIR
},
{ /* cka */ NOT_BEGIN | BREAK | NOT_END,
/* ckb */ NOT_BEGIN | BREAK | NOT_END,
/* ckc */ NOT_BEGIN | BREAK | NOT_END,
@ -1247,7 +1280,8 @@ static int digram[][RULE_SIZE] =
/* ckth */ NOT_BEGIN | BREAK | NOT_END,
/* ckwh */ ILLEGAL_PAIR,
/* ckqu */ NOT_BEGIN | BREAK | NOT_END,
/* ckck */ ILLEGAL_PAIR}
/* ckck */ ILLEGAL_PAIR
}
};
/*
@ -1993,16 +2027,14 @@ gen_syllable (char *syllable, USHORT pwlen, USHORT *units_in_syllable,
saved_pair[1] = last_unit;
want_another_unit = FALSE;
}
else
if (ALLOWED (BREAK))
else if (ALLOWED (BREAK))
{
saved_unit = 1;
saved_pair[0] = unit;
want_another_unit = FALSE;
}
}
else
if (ALLOWED (SUFFIX))
else if (ALLOWED (SUFFIX))
{
want_vowel = TRUE;
}

19
rnd.c
View File

@ -95,7 +95,8 @@ x917cast_rnd (void)
* YOU CAN CHANGE IT IF YOU WANT *
**********************************************************************/
u8 ro_key[16] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f};
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f
};
/**********************************************************************
* ENCRYPTION KEY HEX : 0x000102030405060708090A0B0C0D0E0F (128-bit) *
* YOU CAN CHANGE IT IF YOU WANT *
@ -172,6 +173,7 @@ x917sha1_rnd (void)
return (Xi[0]);
}
#endif /* APG_USE_SHA */
/*
** x917_setseed (UINT32 seed) - Initializes seed
** INPUT:
@ -182,15 +184,15 @@ x917sha1_rnd (void)
** NOTES:
** none.
*/
void
x917_setseed (UINT32 seed, int quiet)
void x917_setseed (UINT32 seed, int quiet)
{
FILE * dr;
UINT32 drs[2];
//FILE * dr;
//UINT32 drs[2];
UINT32 pid = 0;
pid = (UINT32)getpid();
/*
if ( (dr = fopen(APG_DEVRANDOM, "r")) != NULL)
{
(void)fread( (void *)&drs[0], 8, 1, dr);
@ -215,9 +217,10 @@ x917_setseed (UINT32 seed, int quiet)
fprintf(stderr,"USING LOCAL TIME AND PID FOR SEED GENERATION !!!\n");
fflush(stderr);
}
#endif /* WIN32 */
#endif /* CLISERV */
#endif // WIN32
#endif // CLISERV
*/
__rnd_seed[0] = seed ^ pid;
__rnd_seed[1] = seed ^ pid;
}
//}
}

3
rnd.h
View File

@ -36,13 +36,16 @@
extern UINT32 __rnd_seed[2];
#if 0
#define RND_MX 0x7FFFFFFF
#ifdef __OpenBSD__
#define APG_DEVRANDOM "/dev/arandom"
#else
#define APG_DEVRANDOM "/dev/random"
//#define APG_DEVRANDOM "random:"
#endif /* __OpenBSD__ */
#define APG_DEVURANDOM "/dev/urandom"
#endif
extern void x917_setseed (UINT32 seed, int quiet);
extern UINT randint (int n);

177
sha/sha.c
View File

@ -130,19 +130,70 @@ static void shaTransform( apg_SHA_INFO *shaInfo )
W[ i ] = shaInfo->data[ i ];
/* Step B. Expand the 16 words into 64 temporary data words */
expand( 16 ); expand( 17 ); expand( 18 ); expand( 19 ); expand( 20 );
expand( 21 ); expand( 22 ); expand( 23 ); expand( 24 ); expand( 25 );
expand( 26 ); expand( 27 ); expand( 28 ); expand( 29 ); expand( 30 );
expand( 31 ); expand( 32 ); expand( 33 ); expand( 34 ); expand( 35 );
expand( 36 ); expand( 37 ); expand( 38 ); expand( 39 ); expand( 40 );
expand( 41 ); expand( 42 ); expand( 43 ); expand( 44 ); expand( 45 );
expand( 46 ); expand( 47 ); expand( 48 ); expand( 49 ); expand( 50 );
expand( 51 ); expand( 52 ); expand( 53 ); expand( 54 ); expand( 55 );
expand( 56 ); expand( 57 ); expand( 58 ); expand( 59 ); expand( 60 );
expand( 61 ); expand( 62 ); expand( 63 ); expand( 64 ); expand( 65 );
expand( 66 ); expand( 67 ); expand( 68 ); expand( 69 ); expand( 70 );
expand( 71 ); expand( 72 ); expand( 73 ); expand( 74 ); expand( 75 );
expand( 76 ); expand( 77 ); expand( 78 ); expand( 79 );
expand( 16 );
expand( 17 );
expand( 18 );
expand( 19 );
expand( 20 );
expand( 21 );
expand( 22 );
expand( 23 );
expand( 24 );
expand( 25 );
expand( 26 );
expand( 27 );
expand( 28 );
expand( 29 );
expand( 30 );
expand( 31 );
expand( 32 );
expand( 33 );
expand( 34 );
expand( 35 );
expand( 36 );
expand( 37 );
expand( 38 );
expand( 39 );
expand( 40 );
expand( 41 );
expand( 42 );
expand( 43 );
expand( 44 );
expand( 45 );
expand( 46 );
expand( 47 );
expand( 48 );
expand( 49 );
expand( 50 );
expand( 51 );
expand( 52 );
expand( 53 );
expand( 54 );
expand( 55 );
expand( 56 );
expand( 57 );
expand( 58 );
expand( 59 );
expand( 60 );
expand( 61 );
expand( 62 );
expand( 63 );
expand( 64 );
expand( 65 );
expand( 66 );
expand( 67 );
expand( 68 );
expand( 69 );
expand( 70 );
expand( 71 );
expand( 72 );
expand( 73 );
expand( 74 );
expand( 75 );
expand( 76 );
expand( 77 );
expand( 78 );
expand( 79 );
/* Step C. Set up first buffer */
A = shaInfo->digest[ 0 ];
@ -152,26 +203,86 @@ static void shaTransform( apg_SHA_INFO *shaInfo )
E = shaInfo->digest[ 4 ];
/* Step D. Serious mangling, divided into four sub-rounds */
subRound1( 0 ); subRound1( 1 ); subRound1( 2 ); subRound1( 3 );
subRound1( 4 ); subRound1( 5 ); subRound1( 6 ); subRound1( 7 );
subRound1( 8 ); subRound1( 9 ); subRound1( 10 ); subRound1( 11 );
subRound1( 12 ); subRound1( 13 ); subRound1( 14 ); subRound1( 15 );
subRound1( 16 ); subRound1( 17 ); subRound1( 18 ); subRound1( 19 );
subRound2( 20 ); subRound2( 21 ); subRound2( 22 ); subRound2( 23 );
subRound2( 24 ); subRound2( 25 ); subRound2( 26 ); subRound2( 27 );
subRound2( 28 ); subRound2( 29 ); subRound2( 30 ); subRound2( 31 );
subRound2( 32 ); subRound2( 33 ); subRound2( 34 ); subRound2( 35 );
subRound2( 36 ); subRound2( 37 ); subRound2( 38 ); subRound2( 39 );
subRound3( 40 ); subRound3( 41 ); subRound3( 42 ); subRound3( 43 );
subRound3( 44 ); subRound3( 45 ); subRound3( 46 ); subRound3( 47 );
subRound3( 48 ); subRound3( 49 ); subRound3( 50 ); subRound3( 51 );
subRound3( 52 ); subRound3( 53 ); subRound3( 54 ); subRound3( 55 );
subRound3( 56 ); subRound3( 57 ); subRound3( 58 ); subRound3( 59 );
subRound4( 60 ); subRound4( 61 ); subRound4( 62 ); subRound4( 63 );
subRound4( 64 ); subRound4( 65 ); subRound4( 66 ); subRound4( 67 );
subRound4( 68 ); subRound4( 69 ); subRound4( 70 ); subRound4( 71 );
subRound4( 72 ); subRound4( 73 ); subRound4( 74 ); subRound4( 75 );
subRound4( 76 ); subRound4( 77 ); subRound4( 78 ); subRound4( 79 );
subRound1( 0 );
subRound1( 1 );
subRound1( 2 );
subRound1( 3 );
subRound1( 4 );
subRound1( 5 );
subRound1( 6 );
subRound1( 7 );
subRound1( 8 );
subRound1( 9 );
subRound1( 10 );
subRound1( 11 );
subRound1( 12 );
subRound1( 13 );
subRound1( 14 );
subRound1( 15 );
subRound1( 16 );
subRound1( 17 );
subRound1( 18 );
subRound1( 19 );
subRound2( 20 );
subRound2( 21 );
subRound2( 22 );
subRound2( 23 );
subRound2( 24 );
subRound2( 25 );
subRound2( 26 );
subRound2( 27 );
subRound2( 28 );
subRound2( 29 );
subRound2( 30 );
subRound2( 31 );
subRound2( 32 );
subRound2( 33 );
subRound2( 34 );
subRound2( 35 );
subRound2( 36 );
subRound2( 37 );
subRound2( 38 );
subRound2( 39 );
subRound3( 40 );
subRound3( 41 );
subRound3( 42 );
subRound3( 43 );
subRound3( 44 );
subRound3( 45 );
subRound3( 46 );
subRound3( 47 );
subRound3( 48 );
subRound3( 49 );
subRound3( 50 );
subRound3( 51 );
subRound3( 52 );
subRound3( 53 );
subRound3( 54 );
subRound3( 55 );
subRound3( 56 );
subRound3( 57 );
subRound3( 58 );
subRound3( 59 );
subRound4( 60 );
subRound4( 61 );
subRound4( 62 );
subRound4( 63 );
subRound4( 64 );
subRound4( 65 );
subRound4( 66 );
subRound4( 67 );
subRound4( 68 );
subRound4( 69 );
subRound4( 70 );
subRound4( 71 );
subRound4( 72 );
subRound4( 73 );
subRound4( 74 );
subRound4( 75 );
subRound4( 76 );
subRound4( 77 );
subRound4( 78 );
subRound4( 79 );
/* Step E. Build message digest */
shaInfo->digest[ 0 ] += A;

View File

@ -11,7 +11,8 @@
/* Define APG_LITTLE_ENDIAN if the machine is little-endian */
#define APG_LITTLE_ENDIAN
// m68k is BIG_ENDIAN
//#define APG_LITTLE_ENDIAN
/* Useful defines/typedefs */