home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
c
/
cops_104.zip
/
cops_104
/
yp_pass.chk
< prev
Wrap
Text File
|
1992-03-10
|
886b
|
43 lines
:
#
# yp_pass.chk [whatever flags you want to pass to pass.chk]
#
# This shell script is a wrapper for the pass.chk password guessing
# program for systems using Yellow Pages/NIS. All this does is dump the
# yppassword file into a temp file, then runs "pass.chk" with whatever
# flags were passed to it.
#
# Obviously, it doesn't make any sense to use the "-P" flag with
# this script (which specifies an alternate password file.)
#
TEST=/bin/test
ECHO=/bin/echo
RM=/bin/rm
YPCAT=/usr/bin/ypcat
# Important files:
yp_pass=./yp.$$
# password guessing program:
pass_chk=./pass.chk
# generic test to check for yp use?
if $TEST -s $YPCAT ; then
$YPCAT passwd > $yp_pass
else
$RM -f $yp_pass
$ECHO Can\'t find anything to crack...
exit 1
fi
# crack them passwords
if $TEST -s "$yp_pass" ; then
$pass_chk $* -P $yp_pass
fi
# kill off the evidence
$RM -f $yp_pass
# end