home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Source Code 1992 March
/
Source_Code_CD-ROM_Walnut_Creek_March_1992.iso
/
usenet
/
altsrcs
/
3
/
3920
/
local-diffs
next >
Wrap
Text File
|
1991-08-28
|
9KB
|
358 lines
diff -cr crack3.2.virgin/Crack crack3.2a/Crack
*** crack3.2.virgin/Crack Tue Aug 27 11:02:38 1991
--- crack3.2a/Crack Tue Aug 27 11:04:58 1991
***************
*** 9,19 ****
# You must put DOUBLE QUOTES around this is you work relative to ~username
###
! setenv CRACK_HOME "~aem/SEC/CRACK32"
set trash="/dev/null"
set remote="FALSE"
! set default_bin="generic"
set tmpfile="/tmp/cpwfs.$$"
set net_cf="Scripts/network.conf"
--- 9,20 ----
# You must put DOUBLE QUOTES around this is you work relative to ~username
###
! setenv CRACK_HOME "/home/utils/crack3.2a"
set trash="/dev/null"
set remote="FALSE"
! set foreground=""
! set default_bin=`arch`
set tmpfile="/tmp/cpwfs.$$"
set net_cf="Scripts/network.conf"
***************
*** 48,53 ****
--- 49,55 ----
echo "Or: $0 -network [options] passwdfile [...]"
echo "With options:-"
echo " -v - to produce verbose output (if configured)"
+ echo " -f - run in foreground"
echo " -nnicevalue - to run niced"
echo " -rpointfile - to recover a crashed-out job"
echo " -Rpointfile - to recover (with verify) a crashed-out job"
***************
*** 83,88 ****
--- 85,94 ----
set argl=($argl $1)
shift
breaksw
+ case -f: # foreground
+ set foreground="-f"
+ shift
+ breaksw
case -*: # anything else
echo "Crack: unknown argument $1"
shift
***************
*** 155,166 ****
if ( "$remote" == "TRUE" ) then
cat > $tmpfile # Use stdin
else
! Scripts/joinfiles $* > $tmpfile || exit 1 # Process the passwords
endif
! echo "Backgrounding program. Output will be written to a file in this directory."
!
! $CRACK_ARCH/crack-pwc $argl -i$tmpfile Dicts/dict.* < /dev/null >& $trash &
###
# There are horrible timeraces involved in removing $tmpfile, so I dont.
--- 161,175 ----
if ( "$remote" == "TRUE" ) then
cat > $tmpfile # Use stdin
else
! Scripts/joinfiles $foreground $* > $tmpfile || exit 1 # Process the passwords
endif
! if ( "$foreground" == "-f" ) then
! $CRACK_ARCH/crack-pwc -f $argl -i$tmpfile Dicts/dict.* < /dev/null
! else
! echo "Backgrounding program. Output will be written to a file in this directory."
! $CRACK_ARCH/crack-pwc $argl -i$tmpfile Dicts/dict.* < /dev/null >&$trash &
! endif
###
# There are horrible timeraces involved in removing $tmpfile, so I dont.
diff -cr crack3.2.virgin/Crack.sh crack3.2a/Crack.sh
*** crack3.2.virgin/Crack.sh Tue Aug 27 11:02:21 1991
--- crack3.2a/Crack.sh Tue Aug 27 11:05:08 1991
***************
*** 10,21 ****
# (unless you have a really weird 'sh')
###
! CRACK_HOME="/aber/aem/SEC/CRACK32" # This is an ENVIRONMENT var.
export CRACK_HOME
trash="/dev/null"
remote="FALSE"
! default_bin="generic"
tmpfile="/tmp/cpwfs.$$"
net_cf="Scripts/network.conf"
--- 10,22 ----
# (unless you have a really weird 'sh')
###
! CRACK_HOME="/home/utils/crack3.2a" # This is an ENVIRONMENT var.
export CRACK_HOME
trash="/dev/null"
remote="FALSE"
! foreground=""
! default_bin=`arch`
tmpfile="/tmp/cpwfs.$$"
net_cf="Scripts/network.conf"
***************
*** 52,57 ****
--- 53,59 ----
echo "Or: $0 -network [options] passwdfile [...]"
echo "With options:-"
echo " -v - to produce verbose output (if configured)"
+ echo " -f - run in foreground"
echo " -nnicevalue - to run niced"
echo " -rpointfile - to recover a crashed-out job"
echo " -Rpointfile - to recover (with verify) a crashed-out job"
***************
*** 87,92 ****
--- 89,98 ----
argl="$argl $1"
shift
;;
+ -f*)
+ foreground="-f"
+ shift
+ ;;
-*)
echo "Crack: unknown argument $1"
shift
***************
*** 167,178 ****
then
cat > $tmpfile
else
! Scripts/joinfiles $* > $tmpfile || exit 1
fi
! echo "Backgrounding program. Output will be written to a file in this directory."
!
! nohup $CRACK_ARCH/crack-pwc $argl -i$tmpfile Dicts/dict.* </dev/null >$trash 2>&1 &
sleep 1
--- 173,188 ----
then
cat > $tmpfile
else
! Scripts/joinfiles $foreground $* > $tmpfile || exit 1
fi
! if [ "$foreground" = "-f" ]
! then
! $CRACK_ARCH/crack-pwc -f $argl -i$tmpfile Dicts/dict.* </dev/null
! else
! echo "Backgrounding program. Output will be written to a file in this directory."
! nohup $CRACK_ARCH/crack-pwc $argl -i$tmpfile Dicts/dict.* </dev/null >$trash 2>&1 &
! fi
sleep 1
diff -cr crack3.2.virgin/Scripts/joinfiles crack3.2a/Scripts/joinfiles
*** crack3.2.virgin/Scripts/joinfiles Tue Aug 27 11:02:29 1991
--- crack3.2a/Scripts/joinfiles Mon Aug 26 20:38:49 1991
***************
*** 5,11 ****
# as part of the 'Crack' password cracking package.
###
! warn=out.initial.$$
###
# Empty the output file...
--- 5,17 ----
# as part of the 'Crack' password cracking package.
###
! if [ "$1" = "-f" ]
! then
! warn=/dev/null
! shift
! else
! warn=out.initial.$$
! fi
###
# Empty the output file...
diff -cr crack3.2.virgin/Sources/conf.h crack3.2a/Sources/conf.h
*** crack3.2.virgin/Sources/conf.h Tue Aug 27 11:02:33 1991
--- crack3.2a/Sources/conf.h Tue Aug 27 11:10:23 1991
***************
*** 12,18 ****
* my own. It's simplest if you undefine and ignore this switch.
*/
! #define DEVELOPMENT_VERSION
/* !!!! EVERYBODY ELSE START HERE !!!! */
--- 12,18 ----
* my own. It's simplest if you undefine and ignore this switch.
*/
! #undef DEVELOPMENT_VERSION
/* !!!! EVERYBODY ELSE START HERE !!!! */
diff -cr crack3.2.virgin/Sources/crack-pwc.c crack3.2a/Sources/crack-pwc.c
*** crack3.2.virgin/Sources/crack-pwc.c Tue Aug 27 11:02:41 1991
--- crack3.2a/Sources/crack-pwc.c Mon Aug 26 20:23:10 1991
***************
*** 50,56 ****
char rhostname[STRINGSIZE]; /* hostname we are recovering on */
#endif
! int verbose_bool; /* is verbose switched on ? */
int pid; /* pid of parent process */
char opfile[STRINGSIZE]; /* name of output file */
--- 50,57 ----
char rhostname[STRINGSIZE]; /* hostname we are recovering on */
#endif
! static int verbose_bool = 0; /* is verbose switched on ? */
! static int foreground_bool = 0; /* outputting in foreground? */
int pid; /* pid of parent process */
char opfile[STRINGSIZE]; /* name of output file */
***************
*** 673,679 ****
{
uerr++;
}
! while ((i = getopt (argc, argv, "vi:r:R:n:")) != EOF)
{
switch (i)
{
--- 674,680 ----
{
uerr++;
}
! while ((i = getopt (argc, argv, "vfi:r:R:n:")) != EOF)
{
switch (i)
{
***************
*** 680,685 ****
--- 681,689 ----
case 'v':
verbose_bool = 1;
break;
+ case 'f':
+ foreground_bool = 1;
+ break;
case 'n':
nice (atoi (optarg));
break;
***************
*** 728,748 ****
sprintf (pointfile, "point.%d", pid);
#endif /* CRACK_NETWORK */
! if (!freopen (opfile, "w", stdout))
! {
! perror ("freopen(stdout)");
! exit (1);
}
- if (!freopen (opfile, "a", stderr))
- {
- perror ("freopen(stderr)");
- exit (1);
- }
- if (!(fp = fopen (diefile, "w")))
- {
- perror (diefile);
- exit (1);
- }
Log ("Crack: A Sensible Password Cracker v%s by ADE Muffett, 1991\n",
version);
--- 732,754 ----
sprintf (pointfile, "point.%d", pid);
#endif /* CRACK_NETWORK */
! if (!foreground_bool) {
! if (!freopen (opfile, "w", stdout))
! {
! perror ("freopen(stdout)");
! exit (1);
! }
! if (!freopen (opfile, "a", stderr))
! {
! perror ("freopen(stderr)");
! exit (1);
! }
! if (!(fp = fopen (diefile, "w")))
! {
! perror (diefile);
! exit (1);
! }
}
Log ("Crack: A Sensible Password Cracker v%s by ADE Muffett, 1991\n",
version);
***************
*** 760,775 ****
Log ("From Dictionary %s, User number %d.\n", rdict, rusercount);
Log ("Username must match %s\n", rusername);
}
! fprintf (fp, "#!/bin/sh\n");
#ifdef CRACK_NETWORK
! fprintf (fp, "rsh %s kill -15 %d\n", hostname, pid);
#else
! fprintf (fp, "kill -15 %d\n", pid);
#endif /* CRACK_NETWORK */
! fprintf (fp, "rm $0\n");
! fclose (fp);
! chmod (diefile, 0700);
#ifdef FCRYPT
init_des ();
--- 766,783 ----
Log ("From Dictionary %s, User number %d.\n", rdict, rusercount);
Log ("Username must match %s\n", rusername);
}
! if (!foreground_bool) {
! fprintf (fp, "#!/bin/sh\n");
#ifdef CRACK_NETWORK
! fprintf (fp, "rsh %s kill -15 %d\n", hostname, pid);
#else
! fprintf (fp, "kill -15 %d\n", pid);
#endif /* CRACK_NETWORK */
! fprintf (fp, "rm $0\n");
! fclose (fp);
! chmod (diefile, 0700);
! }
#ifdef FCRYPT
init_des ();
***************
*** 810,814 ****
--- 818,824 ----
}
Log ("Finished.\n");
+ if (!foreground_bool && unlink(diefile))
+ Log ("Failed to unlink %s\n", diefile);
return (0);
}