home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-09-22 | 54.5 KB | 2,985 lines |
- Newsgroups: comp.sources.misc,alt.sources,alt.security
- From: aem@aber.ac.uk (Alec David Muffett)
- Subject: v23i002: crack - The Password Cracker, version 3.3c, Part02/05
- Message-ID: <1991Sep22.050702.13601@sparky.imd.sterling.com>
- X-Md4-Signature: d494175c7c3bc2ad16f7b9e94c15044a
- Date: Sun, 22 Sep 1991 05:07:02 GMT
- Approved: kent@sparky.imd.sterling.com
-
- Submitted-by: aem@aber.ac.uk (Alec David Muffett)
- Posting-number: Volume 23, Issue 2
- Archive-name: crack/part02
- Environment: UNIX
- Supersedes: crack: Volume 22, Issue 49-52
-
- #! /bin/sh
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 2 (of 5)."
- # Contents: BUGS Crack DictSrc/bad_pws.dat Scripts/Crack.network
- # Scripts/RCrack Scripts/network.conf Sources/conf.h
- # Sources/crack-lib.c Sources/crack-pp.c Sources/goodpass.c
- # Wrapped by aem@aberda on Fri Sep 20 12:26:53 1991
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'BUGS' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'BUGS'\"
- else
- echo shar: Extracting \"'BUGS'\" \(3288 characters\)
- sed "s/^X//" >'BUGS' <<'END_OF_FILE'
- X---------------------------------------------------------------------------
- XKnown bugs as of Sept 18th, 1991.
- X---------------------------------------------------------------------------
- X* At least one version of Crack has gotten away from me with the
- X DEVELOPMENT_VERSION symbol #defined. This is OK if you are on a DEC
- X Risc-Ultrix box, but probably not otherwise. Doublecheck this.
- X
- X STATUS - check this one out during installation.
- X---------------------------------------------------------------------------
- X* AWK : Someone at Nottingham complained that "RCrack" fell over when he
- X ran it, because he was using version 2 of "awk". I'm not sure
- X he meant "nawk" by this, but he said that it was fixed by editing
- X "RCrack" and invoking "/bin/awk" literally. This MAY also affect
- X "joinfiles" and "Crack.network".
- X
- X STATUS - SHOULD BE FIXED in v3.2b and upwards. Some versions of AWK need
- X a newline between statements
- X---------------------------------------------------------------------------
- X* There was a major bug in the pre-release of v3.2a crack-pwc.c which
- X I have fixed. Around line 633 of Sources/crack-pwc.c, there is a line
- X which read:-
- X
- X if (!TryManyUsers (head, scratch))
- X
- X and this was changed to :-
- X
- X if (!TryManyUsers (head, scratch->word))
- X
- X for Crack to function properly. If you are reading this, it is fixed
- X in this distribution.
- X
- X STATUS - FIXED in v3.2a RELEASE and upwards.
- X---------------------------------------------------------------------------
- X* "Scripts/do_dicts" - some people complain that the 'sort' command in
- X this script fills the "/tmp" filestore whilst compacting the
- X dictionaries. There is little I can do about this, unless you have
- X the option to specify the directory where "sort" keeps its temp files
- X (usually this is the "-T" option) - check your man pages.
- X
- X If you edit line 67 to read:-
- X
- X sort -r -T /big/filestore/area $i | uniq > Dicts/$i
- X
- X the problem should clear up. If your current partition is large
- X enough, use "." in place of /big/filestore/area
- X
- X STATUS - FIX is NON PORTABLE but simple, and problem sporadic, and so
- X is left to user to implement.
- X---------------------------------------------------------------------------
- X* "Scripts/crack.mf" - contains the name of one dictionary which is
- X assumed to exist on every machine : /usr/dict/words. On other
- X architectures, this may become /usr/lib/dist/words, or something
- X completely other. Amend this if necessary.
- X
- X STATUS - what the hell, I'm not a perfectionist really
- X---------------------------------------------------------------------------
- X* "Scripts/RCrack" - when running in non-NFS mode on NFS filestore, if
- X you use the same filing tree your die files can recurse over the
- X network. Server calls client which calls client which calls client...
- X
- X STATUS - Don't do it. If you have NFS, use it.
- X---------------------------------------------------------------------------
- X* "Scripts/RCrack" - when running in non-NFS mode, specifying an
- X alternative username for 'rsh' to work under can cause problems if
- X "rsh" insists on reading a password from your /dev/tty (bad .rhost setup)
- X
- X STATUS - Don't do it. Bugger all I can do about it anyway.
- X---------------------------------------------------------------------------
- END_OF_FILE
- if test 3288 -ne `wc -c <'BUGS'`; then
- echo shar: \"'BUGS'\" unpacked with wrong size!
- fi
- # end of 'BUGS'
- fi
- if test -f 'Crack' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Crack'\"
- else
- echo shar: Extracting \"'Crack'\" \(5763 characters\)
- sed "s/^X//" >'Crack' <<'END_OF_FILE'
- X#!/bin/sh
- X
- X###
- X# This program written by ADE Muffett (aem@aber.ac.uk), August 1991,
- X# as part of the 'Crack' password cracking package.
- X###
- X
- X###
- X# CRACK_HOME: You must put DOUBLE QUOTES around this and have /bin/csh if
- X# you work relative to ~username - this is the Crack installation directory.
- X###
- X
- XCRACK_HOME="~aem/EXTRA2/crack33"
- X
- X###
- X# CRACK_OUT: This is the directory into which all the password guesser
- X# output files are to be stored. This affects only the "out.*" files, and
- X# not "die.*" or "point.*", due to restraints on the support scripts.
- X###
- X
- XCRACK_OUT="$CRACK_HOME"
- X
- X###
- X# Umask for security's sake - stops files being world readable (if you
- X# don't have it in your .login)
- X###
- X
- Xumask 077
- X
- X###
- X# DEFAULT_BIN : For non-network cracks, you can leave this as 'generic'.
- X#
- X# For Network Cracks, DEFAULT_BIN is slightly more important because it
- X# specifies the binary type of the local machine upon which dictionaries
- X# are made - however, yo don't REALLY have to change it from 'generic',
- X# unless you intend to have the binary type 'generic' named in your
- X# "network.conf".
- X#
- X# Setting this to `arch` is non-portable.
- X###
- X
- XDEFAULT_BIN="generic"
- X
- X############### FROM HERE ON IN IT'S ALL MY FAULT ###############
- X
- Xversion="3.3c --- RELEASE ---"
- Xremote=""
- Xforeground=""
- Xfeedback=""
- Xtrash="/dev/null"
- Xtmpfile="/tmp/pw.$$" # This variable name is referenced in PWC for deletion
- Xnet_cf="Scripts/network.conf"
- X
- XCRACK_HOME_UNRES="$CRACK_HOME"
- X
- Xif [ -f "/bin/csh" ] # -x bombs on Ultrix, why ? I dunno...
- Xthen
- X # Note that csh must be invoked with -f as some versions
- X # of csh echo the user prompt without it. bct@hull.cs
- X
- X CRACK_HOME=` /bin/csh -fc "echo $CRACK_HOME" `
- X CRACK_OUT=` /bin/csh -fc "echo $CRACK_OUT" `
- Xfi
- X
- Xif [ ! -d "$CRACK_OUT" ]
- Xthen
- X CRACK_OUT="."
- Xfi
- X
- Xexport CRACK_HOME
- Xexport CRACK_OUT
- Xexport DEFAULT_BIN
- Xexport CRACK_HOME_UNRES # so that ~user still works...
- X
- X###
- X# Check existance of a home directory
- X###
- X
- Xif [ "$CRACK_HOME" != "" -a -d "$CRACK_HOME" ]
- Xthen
- X
- X cd $CRACK_HOME || exit 1
- Xelse
- X echo "Error: The directory $CRACK_HOME does not exist."
- X echo ""
- X echo "Please set the value of CRACK_HOME in the Crack script to the CRACK31"
- X echo "installation directory."
- X echo ""
- X echo "The current working directory is" `pwd`
- X exit 1
- Xfi
- X
- X###
- X# Announce ourselves.
- X###
- X
- Xecho "Crack $version Password Cracker by ADE Muffett, 1991"
- X
- X###
- X# Check that we have arguments
- X###
- X
- Xif [ $# = 0 ]
- Xthen
- X
- X echo "Usage: $0 [options] [bindir] passwdfile [...]"
- X echo "Or: $0 -network [options] passwdfile [...]"
- X echo "With options:-"
- X echo " -f - to run in foreground (output to stdout)"
- X echo " -v - to produce verbose output (if configured)"
- X echo " -F - to create/use feedback files"
- X echo " -nnicevalue - to run niced to 'nicevalue'"
- X echo " -rpointfile - to recover a crashed-out job"
- X echo " -Rpointfile - to recover (with verify) a crashed-out job"
- X exit 1
- Xfi
- X
- X###
- X# Parse command line
- X###
- X
- Xecho "Invoked as: $0 $*"
- X
- Xif [ "x$1" = "x-network" ] # Push onto the remote machines
- Xthen
- X shift
- X Scripts/Crack.network $*
- X exit 0
- Xfi
- X
- Xargl=""
- X
- Xwhile :
- Xdo
- X case $1 in
- X -network)
- X echo "Error: -network (if specified) must be first argument"
- X exit 0
- X ;; # Redundant
- X
- X -remote) # This is being called remotely
- X remote="-N"
- X shift
- X ;;
- X
- X -f*) # Foreground
- X foreground="-f"
- X shift
- X ;;
- X
- X -F*) # Feedback
- X feedback="-F"
- X shift
- X ;;
- X
- X -v*|-n*|-r*|-R|-U*) # Valid options
- X argl="$argl $1"
- X shift
- X ;;
- X
- X -*)
- X echo "Crack: unknown argument $1"
- X shift
- X ;;
- X
- X *)
- X break
- X ;; # Redundant
- X esac
- Xdone
- X
- X###
- X# Test first non-switch argument for existance
- X###
- X
- Xif [ -f "$1" ]
- Xthen
- X
- X crack_arch="$CRACK_HOME/$DEFAULT_BIN"
- Xelse
- X crack_arch="$CRACK_HOME/$1"
- X shift
- Xfi
- X
- X###
- X# Now to tidy up the source directory up a bit
- X###
- X
- Xmake -f Scripts/crack.mf cleanprogs > /dev/null 2>&1
- X
- X###
- X# State our intentions - calls to do_install made by do_pwc & do_dicts
- X###
- X
- Xecho "Using Binaries in directory: $crack_arch"
- X
- X###
- X# Do the dictionaries
- X###
- X# The problem is that the crack_arch variable has got to go through the
- X# Makefile invisibly and portably, otherwise I wouldn't be using
- X# environment variables.
- X###
- X
- XCRACK_ARCH=$crack_arch ; export CRACK_ARCH
- X
- Xmake -f Scripts/crack.mf dictstamp || exit 1
- X
- X###
- X# Make the password cracker
- X###
- X
- XScripts/do_pwc $crack_arch || exit 1
- X
- X###
- X# Check how we have been invoked : ergo how we get our data.
- X###
- X
- Xif [ "x$remote" = "x-N" ]
- Xthen
- X cat > $tmpfile # Use stdin
- Xelse
- X warn=$CRACK_OUT/out.init.$$
- X
- X Scripts/do_join $feedback $warn $* > $tmpfile || exit 1
- X
- X if [ "x$foreground" = "x-f" ]
- X then
- X cat $warn || exit 1
- X rm $warn
- X fi
- Xfi
- X
- X
- X###
- X# Check the runtime scratch file directory for pwc
- X###
- X
- Xif [ ! -d Runtime ]
- Xthen
- X echo "Creating Runtime Directory."
- X mkdir Runtime || exit 1
- Xfi
- X
- X###
- X# Kick it off into the background ?
- X###
- X# This is the message which has drawn the most complaints... However, I
- X# have no way of knowing the name in advance, and I can't have crack-pwc
- X# print it on stdout due to hanging file descriptors which bollox a
- X# network crack. Hence I HAVE to be vague...
- X###
- X
- Xif [ "x$foreground" = "x-f" ]
- Xthen
- X echo "Running program..."
- X
- X $CRACK_ARCH/crack-pwc $argl -f -i$tmpfile $remote $feedback \
- X Dicts/dict.* < /dev/null
- Xelse
- X echo "Backgrounding program..."
- X
- X nohup $CRACK_ARCH/crack-pwc $argl -i$tmpfile $remote $feedback \
- X Dicts/dict.* </dev/null >$trash 2>&1 &
- X
- X echo "Output will be written to a file in directory $CRACK_OUT"
- X echo "named 'out.<something>'"
- X
- X sleep 3 # FOR MY PEACE OF MIND
- Xfi
- X
- Xsleep 1
- X
- Xtest -f nohup.out && rm nohup.out
- X
- X###
- X# There are horrible timeraces involved in removing $tmpfile, so I dont.
- X# Crack-pwc does.
- X###
- END_OF_FILE
- if test 5763 -ne `wc -c <'Crack'`; then
- echo shar: \"'Crack'\" unpacked with wrong size!
- fi
- chmod +x 'Crack'
- # end of 'Crack'
- fi
- if test -f 'DictSrc/bad_pws.dat' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'DictSrc/bad_pws.dat'\"
- else
- echo shar: Extracting \"'DictSrc/bad_pws.dat'\" \(6485 characters\)
- sed "s/^X//" >'DictSrc/bad_pws.dat' <<'END_OF_FILE'
- X0
- X1
- X123456
- X12345678
- X2
- X3
- X4
- X5
- X6
- X7
- X8
- X9
- XA
- XAdrian
- XAdrianna
- XAlasdair
- XAlbert
- XAlex
- XAlexander
- XAlice
- XAlicia
- XAlisa
- XAlison
- XAlistair
- XAlister
- XAllison
- XAmanda
- XAmber
- XAmy
- XAndrea
- XAnduin
- XAngela
- XAngie
- XAnita
- XAnn
- XAnna
- XAnne
- XAnnette
- XApril
- XArlene
- XArthur
- XAthena
- XB
- XBBROYGBVGW
- XBailey
- XBarbara
- XBart
- XBartman
- XBecky
- XBeryl
- XBeth
- XBetsie
- XBetty
- XBeverly
- XBishop
- XBob
- XBrandi
- XBrandy
- XBrenda
- XBridget
- XC
- XCalvin
- XCamille
- XCandi
- XCandy
- XCaren
- XCarla
- XCarmen
- XCarol
- XCarole
- XCarolina
- XCaroline
- XCarrie
- XCatherine
- XCathy
- XCecily
- XCharity
- XCharles
- XChristina
- XChristine
- XChristy
- XCindy
- XClaudia
- XCollins
- XConnie
- XCornelius
- XCristina
- XCrystal
- XCynthia
- XD
- XDaisy
- XDana
- XDaniel
- XDanielle
- XDawn
- XDeb
- XDebbie
- XDeborah
- XDenise
- XDesiree
- XDiana
- XDiane
- XDoobrie
- XDulce
- XDuncan
- XE
- XEdwina
- XEileen
- XEinstein
- XElaine
- XElanor
- XElizabeth
- XEllen
- XEmily
- XEmmanuel
- XErica
- XErika
- XErin
- XEvelyn
- XF
- XFelicia
- XG
- XGabriel
- XGeorge
- XGertrude
- XGilly
- XGina
- XGinger
- XH
- XHarvey
- XHeather
- XHeidi
- XHiawatha
- XHobbes
- XHolly
- XI
- XIngrid
- XIrene
- XJ
- XJackie
- XJane
- XJanet
- XJanice
- XJanie
- XJasmin
- XJean
- XJeanne
- XJen
- XJenni
- XJennifer
- XJenny
- XJessica
- XJill
- XJoanne
- XJody
- XJohnny
- XJoseph
- XJoshua
- XJoy
- XJoyce
- XJudith
- XJudy
- XJulia
- XJulie
- XJune
- XK
- XKaren
- XKarie
- XKarina
- XKate
- XKathleen
- XKathrine
- XKathy
- XKatina
- XKatrina
- XKelly
- XKeri
- XKerri
- XKerrie
- XKerry
- XKim
- XKimberly
- XKitten
- XKrista
- XKristen
- XKristi
- XKristie
- XKristin
- XKristine
- XKristy
- XL
- XLana
- XLara
- XLaura
- XLeah
- XLeslie
- XLinda
- XLisa
- XLiz
- XLois
- XLori
- XLorin
- XLorraine
- XLouis
- XLouise
- XLucy
- XLynn
- XLynne
- XM
- XMVEMJSUNP
- XMalcolm
- XMara
- XMarci
- XMarcy
- XMaria
- XMarietta
- XMarni
- XMary
- XMaurice
- XMeagan
- XMegan
- XMelissa
- XMichael
- XMichele
- XMichelle
- XMickey
- XMonica
- XMortis
- XN
- XNancy
- XNicole
- XNita
- XNoreen
- XO
- XOlivia
- XP
- XPam
- XPamela
- XPat
- XPatricia
- XPatty
- XPaula
- XPenelope
- XPierre
- XPolly
- XQ
- XR
- XRachel
- XRachelle
- XRebecca
- XRenee
- XRobin
- XRobyn
- XRochelle
- XRonald
- XRonnie
- XRose
- XRosemary
- XS
- XSamantha
- XSandra
- XSandy
- XSara
- XSarah
- XShannon
- XSharon
- XSherri
- XShirley
- XSnarfel
- XSondra
- XSonia
- XSonya
- XStacey
- XStaci
- XStacie
- XStacy
- XSteph
- XStephanie
- XSusan
- XSusanne
- XSusie
- XSuzanne
- XSuzie
- XSybil
- XT
- XTamara
- XTami
- XTamie
- XTammy
- XTara
- XTheresa
- XTiffany
- XTina
- XTraci
- XTracie
- XTracy
- XTrisha
- XU
- XUrsula
- XV
- XValerie
- XVeronica
- XVicky
- XVirginia
- XW
- XWOBAFGKMRNS
- XWarren
- XWendi
- XWendy
- XWhitney
- XWilliam
- XWillie
- XWilma
- XX
- XY
- XYolanda
- XZ
- Xa
- Xaaa
- Xabc
- Xabcd
- Xabcde
- Xabcdef
- Xabcdefg
- Xabcdefgh
- Xacademia
- Xacademic
- Xaccess
- Xada
- Xadmin
- Xaerobics
- Xairplane
- Xalbany
- Xalbatross
- Xalf
- Xalgebra
- Xalias
- Xaliases
- Xalpha
- Xalphabet
- Xama
- Xamadeus
- Xamorphous
- Xanalog
- Xanchor
- Xandromache
- Xandy
- Xanimals
- Xanswer
- Xanthropogenic
- Xanvils
- Xanything
- Xaria
- Xariadne
- Xarrow
- Xasd
- Xasdfgh
- Xasm
- Xasshole
- Xatmosphere
- Xaztecs
- Xazure
- Xb
- Xbacchus
- Xbadass
- Xbanana
- Xbananas
- Xbandit
- Xbanks
- Xbarber
- Xbaritone
- Xbasic
- Xbass
- Xbassoon
- Xbatch
- Xbatman
- Xbeach
- Xbeater
- Xbeauty
- Xbeaver
- Xbeethoven
- Xbeetledrive
- Xbeloved
- Xbenz
- Xbeowulf
- Xberkeley
- Xberlin
- Xberliner
- Xbeta
- Xbicameral
- Xbitch
- Xbizzy
- Xbradley
- Xbrian
- Xbroadway
- Xbsd
- Xbuggerall
- Xbumbling
- Xburgess
- Xbuzby
- Xc
- Xcad
- Xcampanile
- Xcantor
- Xcardinal
- Xcarmen
- Xcarolina
- Xcarson
- Xcascades
- Xcastle
- Xcat
- Xcayuga
- Xceltics
- Xcerulean
- Xchange
- Xcharles
- Xcharming
- Xcharon
- Xchat
- Xcheesecake
- Xchem
- Xchemistry
- Xchess
- Xchester
- Xchocolate
- Xcigar
- Xcinelli
- Xclass
- Xclassic
- Xcluster
- Xclusters
- Xcode
- Xcoffee
- Xcoke
- Xcollins
- Xcommrades
- Xcomputer
- Xcomrade
- Xcomrades
- Xcondo
- Xcondom
- Xconnect
- Xconsole
- Xcookie
- Xcookie
- Xcooper
- Xcornelius
- Xcouscous
- Xcreate
- Xcreation
- Xcreosote
- Xcretin
- Xcriminal
- Xcshrc
- Xd
- Xdaemon
- Xdancer
- Xdaniel
- Xdanny
- Xdapper
- Xdata
- Xdave
- Xdecember
- Xdefault
- Xdefoe
- Xdeluge
- Xdesperate
- Xdevelop
- Xdevice
- Xdial
- Xdiet
- Xdieter
- Xdigital
- Xdisc
- Xdiscbox
- Xdiscovery
- Xdisk
- Xdisney
- Xdog
- Xdos
- Xdrought
- Xe
- Xeager
- Xearth
- Xeasier
- Xeasy
- Xeatme
- Xedges
- Xedinburgh
- Xedwin
- Xegghead
- Xeiderdown
- Xelephant
- Xemail
- Xemerald
- Xenemy
- Xengine
- Xengineer
- Xenterprise
- Xenzyme
- Xersatz
- Xestablish
- Xestate
- Xeternity
- Xeuclid
- Xeugene
- Xextension
- Xf
- Xfairway
- Xfender
- Xfermat
- Xferrari
- Xfidelity
- Xfield
- Xfile
- Xfinite
- Xfishers
- Xflakes
- Xfloat
- Xflower
- Xflowers
- Xfoolproof
- Xfootball
- Xforesight
- Xformat
- Xforsythe
- Xfourier
- Xfred
- Xfriend
- Xfrighten
- Xfun
- Xfunction
- Xfungible
- Xg
- Xgabriel
- Xgames
- Xgardner
- Xgarfield
- Xgatt
- Xgauss
- Xgeorge
- Xgertrude
- Xgibson
- Xglacier
- Xgnu
- Xgolf
- Xgolfer
- Xgorgeous
- Xgorges
- Xgosling
- Xgouge
- Xgraham
- Xgrahm
- Xgrass
- Xgroup
- Xgryphon
- Xgucci
- Xguess
- Xguest
- Xguitar
- Xgumption
- Xguntis
- Xgweledigaeth
- Xh
- Xhack
- Xhacker
- Xhal
- Xhamlet
- Xhandily
- Xhappening
- Xharmony
- Xharold
- Xhawaii
- Xhebrides
- Xheinlein
- Xhello
- Xhelp
- Xherbert
- Xhibernia
- Xhidden
- Xhobbit
- Xhomework
- Xhoney
- Xhorse
- Xhorus
- Xhutchins
- Xhydrogen
- Xibm
- Xiluvben
- Ximbroglio
- Ximperial
- Xinclude
- Xingres
- Xingress
- Xinna
- Xinnocuous
- Xinternet
- Xirishman
- Xisis
- Xizzy
- Xj
- Xjapan
- Xjester
- Xjixian
- Xjohnny
- Xjuggle
- Xjupiter
- Xk
- Xkalajira
- Xkermit
- Xkernel
- Xkey
- Xkipper
- Xkirkland
- Xknight
- Xl
- Xladle
- Xlager
- Xlambda
- Xlamination
- Xlarkin
- Xlarry
- Xlazarus
- Xlebesgue
- Xlee
- Xleland
- Xleroy
- Xlewis
- Xlibrary
- Xlight
- Xlisp
- Xllareggub
- Xlock
- Xlockout
- Xlove
- Xm
- Xmacintosh
- Xmack
- Xmaggot
- Xmagic
- Xmail
- Xmaint
- Xmalcom
- Xmanager
- Xmark
- Xmarkus
- Xmars
- Xmarty
- Xmarvin
- Xmaster
- Xmath
- Xmaurice
- Xmellon
- Xmemory
- Xmercury
- Xmerlin
- Xmets
- Xmgr
- Xmichael
- Xmike
- Xminimum
- Xminsky
- Xmit
- Xmodem
- Xmogul
- Xmoguls
- Xmoose
- Xmorley
- Xmortis
- Xmouse
- Xmozart
- Xmuser
- Xmutant
- Xn
- Xnagel
- Xnapoleon
- Xnasa
- Xnepenthe
- Xneptune
- Xness
- Xnet
- Xnetwork
- Xnew
- Xnews
- Xnewton
- Xnext
- Xnobody
- Xnoxious
- Xnuclear
- Xnutrition
- Xnyquist
- Xo
- Xoceanography
- Xocelot
- Xoerhrdle
- Xoffice
- Xolivetti
- Xolivia
- Xopen
- Xoperator
- Xoracle
- Xorca
- Xorchid
- Xorwell
- Xosiris
- Xoutlaw
- Xoxford
- Xp
- Xpacific
- Xpad
- Xpainless
- Xpakistan
- Xpaper
- Xpapers
- Xpass
- Xpassword
- Xpencil
- Xpenguin
- Xpenis
- Xpeoria
- Xpercolate
- Xpersimmon
- Xpersona
- Xpete
- Xpeter
- Xphilip
- Xphoenix
- Xphone
- Xpierre
- Xpizza
- Xplane
- Xplayboy
- Xplover
- Xpluto
- Xplymouth
- Xpolynomial
- Xpondering
- Xpork
- Xporsche
- Xposter
- Xpower
- Xpraise
- Xprecious
- Xprelude
- Xpresto
- Xprince
- Xprinceton
- Xpriv
- Xprivate
- Xprivs
- Xprofessor
- Xprofile
- Xprogram
- Xprotect
- Xprotozoa
- Xpub
- Xpublic
- Xpumpkin
- Xpuneet
- Xpuppet
- Xq
- Xqwerty
- Xqwertyui
- Xr
- Xrabbit
- Xrachmaninoff
- Xrainbow
- Xraindrop
- Xraleigh
- Xrandom
- Xrascal
- Xreagan
- Xreally
- Xregional
- Xremote
- Xrick
- Xripple
- Xrisc
- Xrje
- Xrobot
- Xrobotics
- Xrochester
- Xrodent
- Xrolex
- Xromano
- Xronald
- Xroot
- Xrosebud
- Xroses
- Xruben
- Xrules
- Xruth
- Xs
- Xsal
- Xsaturn
- Xsaxon
- Xscamper
- Xscheme
- Xschool
- Xscott
- Xscotty
- Xsecret
- Xsecurity
- Xsensor
- Xserenity
- Xservice
- Xsesame
- Xsex
- Xsharc
- Xsharks
- Xsharon
- Xsheffield
- Xsheldon
- Xshell
- Xshit
- Xshitforbrains
- Xshiva
- Xshivers
- Xshuttle
- Xsignature
- Xsilverlake
- Xsimon
- Xsimple
- Xsimpsons
- Xsinger
- Xsingle
- Xsmile
- Xsmiles
- Xsmooch
- Xsmother
- Xsnatch
- Xsnoopy
- Xsoap
- Xsocrates
- Xsomebody
- Xsossina
- Xsparrows
- Xspit
- Xsplatter
- Xsplodge
- Xspring
- Xspringer
- Xsquires
- Xstrangle
- Xstratford
- Xstudent
- Xstuttgart
- Xsubway
- Xsuccess
- Xsucker
- Xsummer
- Xsun
- Xsuper
- Xsuperstage
- Xsuperuser
- Xsupport
- Xsupported
- Xsurfer
- Xswearer
- Xsymmetry
- Xsys
- Xsysadmin
- Xsystem
- Xt
- Xtangerine
- Xtape
- Xtarget
- Xtarragon
- Xtaylor
- Xteabag
- Xtech
- Xtelephone
- Xtemptation
- Xtennis
- Xterminal
- Xtest
- Xthailand
- Xthanatos
- Xtiger
- Xtoggle
- Xtomato
- Xtopography
- Xtortoise
- Xtoxic
- Xtoyota
- Xtrails
- Xtransfer
- Xtrivial
- Xtrombone
- Xtty
- Xtubas
- Xtuttle
- Xu
- Xumesh
- Xunhappy
- Xunicorn
- Xunix
- Xunknown
- Xuranus
- Xurchin
- Xutil
- Xutility
- Xuucp
- Xv
- Xvasant
- Xvenus
- Xvertigo
- Xvillage
- Xvirgin
- Xvisitor
- Xvortex
- Xw
- Xwargames
- Xwarren
- Xwater
- Xweenie
- Xwhatever
- Xwhatnot
- Xwhiting
- Xwhitney
- Xwholesale
- Xwill
- Xwilliam
- Xwilliamsburg
- Xwillie
- Xwinston
- Xwisconsin
- Xwizard
- Xwizzy
- Xwombat
- Xwoodwind
- Xword
- Xwork
- Xwormwood
- Xwyoming
- Xx
- Xxerox
- Xxfer
- Xxmodem
- Xxyz
- Xy
- Xyaco
- Xyang
- Xyellowstone
- Xyosemite
- Xz
- Xzap
- Xzerox
- Xzimmerman
- Xzmodem
- Xzxcvbn
- END_OF_FILE
- if test 6485 -ne `wc -c <'DictSrc/bad_pws.dat'`; then
- echo shar: \"'DictSrc/bad_pws.dat'\" unpacked with wrong size!
- fi
- # end of 'DictSrc/bad_pws.dat'
- fi
- if test -f 'Scripts/Crack.network' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Scripts/Crack.network'\"
- else
- echo shar: Extracting \"'Scripts/Crack.network'\" \(4084 characters\)
- sed "s/^X//" >'Scripts/Crack.network' <<'END_OF_FILE'
- X#!/bin/sh
- X
- X###
- X# This program written by ADE Muffett (aem@aber.ac.uk), August 1991,
- X# as part of the 'Crack' password cracking package.
- X###
- X
- X###
- X# This program reads the network.conf and breaks up the sorted password
- X# file and kicks "Crack" up on all the machines and feeds the file to it.
- X###
- X
- X###
- X# Okay, if you don't like this bit of code, YOU think of a totally
- X# portable way to do this - in shell scripts without using PERL - Alec.
- X###
- X
- Xcf=Scripts/network.conf
- Xtf=/tmp/mcp.$$
- X
- X###
- X# Check that the config file is in place
- X###
- X
- Xif [ ! -f $cf -o ! -s $cf ]
- Xthen
- X echo "Crack.network: empty or missing config file: $cf"
- X exit 1
- Xfi
- X
- X###
- X# Parse arguments
- X###
- X
- Xargs=""
- Xfiles=""
- Xlocalfeedback=""
- X
- Xfor i in $*
- Xdo
- X if [ -f "$i" ]
- X then
- X files="$files $i"
- X else
- X case $i in
- X -f*)
- X echo "Crack: -f option on COMMAND LINE incompatible with networking - Ignored"
- X ;;
- X -F*)
- X localfeedback="-F"
- X args="$args $i"
- X ;;
- X *)
- X args="$args $i"
- X ;;
- X esac
- X fi
- Xdone
- X
- X###
- X# Do the dictionaries locally !
- X###
- X# We don't know what the architecture of the local host is, nor am I
- X# compelled to try looking it up in the network.conf, so, lets cheat and
- X# say it's DEFAULT_BIN, imported from "Crack".
- X#
- X# Very few ppl are going to put the word 'generic' into a network.conf, so
- X# that should be safe, and anyway, we are only going to be compiling
- X# crack-pp, so, barring an extra directory, there is no wastage.
- X###
- X
- Xecho "Making dictionaries locally, assuming local architecture $DEFAULT_BIN"
- X
- XCRACK_ARCH=$CRACK_HOME/$DEFAULT_BIN ; export CRACK_ARCH
- X
- Xmake -f Scripts/crack.mf dictstamp || exit 1
- X
- XCRACK_ARCH=""
- X
- Xecho "Dictionaries done ok."
- X
- X###
- X# Get on with your proper job
- X###
- X
- Xecho "Merging input data."
- X
- Xif [ "$CRACK_OUT" != "" ]
- Xthen
- X warn=$CRACK_OUT/out.init.$$
- Xelse
- X warn=out.init.$$
- Xfi
- X
- XScripts/do_join $localfeedback $warn $files > $tf
- X
- X###
- X# Statistics gathering
- X###
- X
- Xlines=`wc -l < $tf`
- Xsaltlines=`Scripts/saltcount < $tf`
- X
- X# Must not quote $lines/$saltlines here for comparison to work
- X
- Xif [ $lines = 0 -o $saltlines = 0 ]
- Xthen
- X echo "Crack: no uncracked input to distribute."
- X exit 1
- Xfi
- X
- Xecho "Starting analysis for Network-Crack."
- X
- Xcat $cf |
- Xgrep -v '^#' |
- Xsort -t: +2 -n |
- Xawk -F: '
- XBEGIN {
- X hostcount = 0;
- X totalweight = 0;
- X linecount = '"$lines"';
- X saltlinecount = '"$saltlines"';
- X iargs = "'"$args"'";
- X file = "'"$tf"'";
- X}
- X
- X/^[a-zA-Z0-9]/ {
- X hostname[hostcount] = $1;
- X
- X bintype[hostcount] = $2;
- X
- X relpow[hostcount] = $3;
- X
- X powtot += $3;
- X
- X if (index($6, "-f") == 0)
- X {
- X asynch[hostcount] = "";
- X } else
- X {
- X asynch[hostcount] = "-asynch";
- X }
- X
- X crackf[hostcount] = $6 " " iargs; # useropts go second get priority
- X
- X if ($4 == "")
- X {
- X rshuser[hostcount] = "";
- X } else
- X {
- X rshuser[hostcount] = "-l " $4;
- X crackf[hostcount] = crackf[hostcount] " -U" $4;
- X }
- X
- X if ($5 == "")
- X {
- X crackp[hostcount] = "$CRACK_HOME_UNRES/Crack";
- X } else
- X {
- X crackp[hostcount] = $5;
- X }
- X crackf[hostcount] = iargs " " $6;
- X hostcount++;
- X}
- X
- XEND {
- X # Improvements to load balancing algorithm by chris stassen@com.alc
- X done = 1;
- X slice = 0.0;
- X remainder = 0.0;
- X todo = saltlinecount;
- X print "echo Users:", linecount;
- X print "echo Salts:", saltlinecount;
- X print "echo Remote Hosts:", hostcount;
- X print "echo Total power:", powtot;
- X
- X for (i = 0; i < hostcount; i++)
- X {
- X if (i < hostcount - 1)
- X {
- X slice = relpow[i] / powtot; # fraction
- X slice *= saltlinecount; # percentage
- X slice = slice + remainder; # add excess
- X remainder = slice - int(slice); # remove excess
- X slice = int(slice); # round down
- X todo -= slice; # remainder
- X } else
- X {
- X slice = todo; # fastest machine gets the rest.
- X todo = 0;
- X }
- X if (slice > 0)
- X {
- X print "echo Calling", hostname[i], "for", slice, "different salts";
- X
- X line = sprintf( \
- X "Scripts/RCrack %s %d %d %s %s \"%s\" -remote %s %s < %s", \
- X asynch[i], \
- X done, \
- X done + slice - 1, \
- X hostname[i], \
- X rshuser[i], \
- X crackp[i], \
- X crackf[i], \
- X bintype[i], \
- X file);
- X# print "echo", line;
- X print line;
- X }
- X done += slice;
- X }
- X}'| sh # I'll bet you didn't expect this...
- X
- Xrm $tf
- X
- Xexit 0
- END_OF_FILE
- if test 4084 -ne `wc -c <'Scripts/Crack.network'`; then
- echo shar: \"'Scripts/Crack.network'\" unpacked with wrong size!
- fi
- chmod +x 'Scripts/Crack.network'
- # end of 'Scripts/Crack.network'
- fi
- if test -f 'Scripts/RCrack' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Scripts/RCrack'\"
- else
- echo shar: Extracting \"'Scripts/RCrack'\" \(3312 characters\)
- sed "s/^X//" >'Scripts/RCrack' <<'END_OF_FILE'
- X#!/bin/sh
- X
- X###
- X# This program written by ADE Muffett (aem@aber.ac.uk), August 1991,
- X# as part of the 'Crack' password cracking package.
- X###
- X
- X###
- X# Amendments (especially of the rsh variety) suggested by bct@hull.cs
- X###
- X# For those ignorant of 'rsh', what I am trying to build is a line of
- X# the form
- X# rsh hostname [-n] [-l remoteuser] command [args ...]
- X#
- X###
- Xmachine=`(uname) 2>&1` # What architecture are we on ?
- X
- X###
- X# Map architecture to rsh-equivalent...
- X###
- X
- Xcase $machine in
- X "HP_UX") # Hewlett Packard boxen
- X remote_shell="remsh"
- X ;;
- X# "XENIX"|"Xenix") # Just a suggestion...
- X# remote_shell="rcmd"
- X# ;;
- X *) # default
- X remote_shell="rsh"
- X ;;
- Xesac
- X
- X###
- X# Are we going to kick rsh into the background, or are we going to
- X# background the thing on the remote end ?
- X###
- X
- Xasynch_mode=""
- X
- Xif [ "x$1" = "x-asynch" ]
- Xthen
- X echo "(asynchronous $remote_shell mode)"
- X asynch_mode="$1"
- X shift
- Xelse
- X echo "(remotely backgrounded mode)"
- Xfi
- X
- X###
- X# Segments of input data to read.
- X###
- X
- Xstartline=$1
- Xshift
- Xstopline=$1
- Xshift
- X
- X###
- X# Let the user know what we are doing.
- X###
- X
- Xdataf=/tmp/rcrk.$1.$$ # temporary data file
- X
- X###
- X# Awk reads from stdin... Create an input file for rsh...
- X###
- X
- Xawk -F: '
- XBEGIN {
- X usercount = 0;
- X saltcount = 0;
- X startsalt = '"$startline"';
- X stopsalt = '"$stopline"';
- X}
- X
- X{
- X if (substr($3, 1, 2) != last)
- X {
- X saltcount++;
- X last = substr($3, 1, 2);
- X }
- X
- X if (saltcount >= startsalt && saltcount <= stopsalt)
- X {
- X usercount++;
- X print $0;
- X }
- X}' > $dataf
- X
- X###
- X# Test that we should actually bother to do anything.
- X###
- X
- Xnumlines=`wc -l < $dataf`
- X
- X# Must not quote $numlines here for comparison to work
- X
- Xif [ $numlines = 0 ]
- Xthen
- X echo "RCrack: Nothing left to dispatch to remote host."
- X rm -f $dataf
- X exit 0
- Xelse
- X echo Salted Segment comprises $numlines users # Don't quote this...
- Xfi
- X
- X###
- X# Now for the important bits.
- X###
- X
- Xif [ "x$asynch_mode" = "x-asynch" ]
- Xthen
- X # variable setup
- X
- X dief=Runtime/die.$1.$$
- X outfile=$CRACK_OUT/out.$1.$$
- X
- X # We know where we're going, but we don't know who we are...
- X
- X remhost=$1
- X remuser=`awk -F: '$1=="'"$remhost"'"{print $4}' <Scripts/network.conf`
- X
- X if [ "$remuser" != "" ]
- X then
- X remuser="-l $remuser" # THIS IS THE FORMAT FOR THE USER FLAGS
- X fi
- X
- X # create a die file which points to the remote plaster
- X # reading from the network.conf
- X
- X awk -F: '
- XBEGIN {
- X rsh = "'"$remote_shell"'";
- X host = "'"$remhost"'";
- X}
- X
- X$1 == host {
- X if ($4 != "") # rsh user
- X {
- X rshf = "-l " $4 " -n";
- X } else
- X {
- X rshf = "-n";
- X }
- X
- X if ($5 != "") # assemble new crack home
- X {
- X nf = split($5, path, "/");
- X ch = path[1];
- X for (i = 2; i < nf; i++) # Up to last but one...
- X {
- X ch = ch "/" path[i];
- X }
- X } else
- X {
- X ch = "'"$CRACK_HOME_UNRES"'";
- X }
- X}
- X
- XEND {
- X print "#!/bin/sh";
- X print "rm $0 && " rsh, host, rshf, "\"cd " ch "; Scripts/plaster\"";
- X}' < Scripts/network.conf > $dief
- X
- X # Make diefile executable
- X chmod 700 $dief
- X
- X # Run the 'rsh' ... Shouldn't this be "nohup"ed or something ?
- X # Nope... experimentally it's fine... rsh survives the sh exiting
- X
- X echo "Invoking: $remote_shell $@ < $dataf > $outfile 2>&1 && rm -f $dataf $dief &"
- X $remote_shell "$@" < $dataf > $outfile 2>&1 && rm -f $dataf $dief &
- Xelse
- X # Perfectly ordinary network crack.
- X echo "Invoking: $remote_shell $@ < $dataf"
- X $remote_shell "$@" < $dataf
- X rm -f $dataf
- Xfi
- X
- Xexit 0
- END_OF_FILE
- if test 3312 -ne `wc -c <'Scripts/RCrack'`; then
- echo shar: \"'Scripts/RCrack'\" unpacked with wrong size!
- fi
- chmod +x 'Scripts/RCrack'
- # end of 'Scripts/RCrack'
- fi
- if test -f 'Scripts/network.conf' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Scripts/network.conf'\"
- else
- echo shar: Extracting \"'Scripts/network.conf'\" \(2027 characters\)
- sed "s/^X//" >'Scripts/network.conf' <<'END_OF_FILE'
- X###
- X# Format of this file:-
- X###
- X#
- X# host:binary type:relative power:rsh flags:crack path:crack flags:comment
- X#
- X# host = hostname to 'rsh' to
- X# binary type = type of executable to build on this sort of machine
- X# relative power = power of host relative to weakest machine
- X# rsh user = username to 'rsh -l' to, if not same as current user.
- X# crack path = full path name of Crack on host (deft: $CRACK_HOME/Crack)
- X# crack flags = additional flags to add to crack command line on that host
- X# comment = anything, really, for your reference
- X#
- X# 1) Don't bother specifying "-F" amongst "crack flags" as the
- X# one which you use on the command line will be passed across.
- X#
- X# 2) You CAN specify "-f" here, to throw the remote password cracker
- X# into foreground mode for non-NFS working, but please read the docs
- X# thoroughly first.
- X###
- X# I have specified relative power here as the number of fcrypts per second
- X# that each host is (roughly) capable of. This is a perfectly good way to
- X# define relative power, but if you are at a loss, call your weakest machine
- X# '1', and measure all others in terms of that.
- X###
- Xaberda:mipsel:550:::-n4: Mainframe Dec 5830
- Xaberdb:mipsel:550:::-n4: Mainframe Dec 5830
- Xaberdc:mipsel:565:::: Mainframe DecStation 5000/200
- Xaberdq:sun4:340:::-f: Mainframe Sun 4/330
- X###
- Xdecgca:mipsel:275:::-n4: Graphics Room DecStation 2100
- Xdecgcb:mipsel:275:::-n4: Graphics Room DecStation 2100
- Xdecgcc:mipsel:275:::-n4: Graphics Room DecStation 2100
- Xdecgcd:mipsel:275:::-n4: Graphics Room DecStation 2100
- X# decgce:mipsel:275:::-n4:Nigel's DecStation 2100 which gets switched off nites
- X###
- Xdecgma:mipsel:275:::-n4: Graphics Room DecStation 2100
- X# decgmb:mipsel:275:::-n4:DecStation 2100 cannabalised for parts
- Xdecgmc:mipsel:275:::-n4: Graphics Room DecStation 2100
- Xdecgmd:mipsel:275:::-n4: Graphics Room DecStation 2100
- Xdecgme:mipsel:275:::-n4: Graphics Room DecStation 2100
- X###
- X# sunga:sun3:60:::-n4: Graphics Room Sun 3/60
- X# sunga:sun3:60:::-n4: Graphics Room Sun 3/60
- X# sunga:sun3:60:::-n4: Graphics Room Sun 3/60
- X###
- END_OF_FILE
- if test 2027 -ne `wc -c <'Scripts/network.conf'`; then
- echo shar: \"'Scripts/network.conf'\" unpacked with wrong size!
- fi
- # end of 'Scripts/network.conf'
- fi
- if test -f 'Sources/conf.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Sources/conf.h'\"
- else
- echo shar: Extracting \"'Sources/conf.h'\" \(5941 characters\)
- sed "s/^X//" >'Sources/conf.h' <<'END_OF_FILE'
- X#include <stdio.h>
- X#include <ctype.h>
- X#include <pwd.h>
- X#include <signal.h>
- X
- X/*
- X * This switch is for my use - if defined, overrides the defaults below and
- X * sets up my own. It's simplest if you UNDEFINE AND IGNORE this switch.
- X */
- X
- X#define DEVELOPMENT_VERSION
- X
- X/*
- X * !!!! ---------- EVERYBODY ELSE START HERE ---------- !!!!
- X */
- X
- X/*
- X * define this symbol if you are on a system where you don't have the
- X * strchr() function in your standard library (usually this means you are on
- X * a BSD based system) but instead, you DO have the equivalent index()
- X * function.
- X */
- X
- X#undef INDEX_NOT_STRCHR
- X
- X/*
- X * What bytesex is your machine ? Select one of the two below, if you have
- X * some really weird machine - otherwise the program should be able to work
- X * it out itself.
- X */
- X
- X#undef BIG_ENDIAN
- X#undef LITTLE_ENDIAN
- X
- X/* If you haven't selected one of the above options... */
- X#if !defined(BIG_ENDIAN) && !defined(LITTLE_ENDIAN)
- X
- X/* Can we work out if we are little endian ? */
- X#if defined(vax) || defined(ns32000) || defined(sun386) || defined(i386) ||\
- X defined(MIPSEL) || defined(BIT_ZERO_ON_RIGHT)
- X#define LITTLE_ENDIAN /* YES */
- X#endif
- X
- X/* Can we work out if we are bigendian ? */
- X#if defined(sel) || defined(pyr) || defined(mc68000) || defined(sparc) ||\
- X defined(is68k) || defined(tahoe) || defined(ibm032) ||\
- X defined(ibm370) || defined(MIPSEB) || defined(__convex__) ||\
- X defined(hpux) || defined(apollo) || defined (BIT_ZERO_ON_LEFT) || \
- X defined(m68k) || defined(m88k)
- X#define BIG_ENDIAN /* YES */
- X#endif
- X
- X/* end of trying to guess things */
- X#endif
- X
- X/* are we schitzophrenic ? */
- X#if defined(BIG_ENDIAN) && defined(LITTLE_ENDIAN)
- XERROR_BAD_BIT_ORDER; /* YES */
- X#endif
- X
- X/* are we still ignorant ? */
- X#if !defined(BIG_ENDIAN) && !defined(LITTLE_ENDIAN)
- XERROR_NO_BIT_ORDER; /* YES */
- X#endif
- X
- X/*
- X * If defined, this will insert code for verbose options
- X */
- X
- X#define CRACK_VERBOSE
- X
- X/*
- X * Define this if you have _toupper() - check your manpages
- X */
- X
- X#undef FAST_TOCASE
- X
- X/*
- X * define this if you are on a Sys V type system with a uname() system call
- X * and have no gethostname() - it fakes up a BSD gethostname() so you can use
- X * CRACK_NETWORK; see crack-port.c
- X */
- X
- X#undef CRACK_UNAME
- X
- X/*
- X * define this if you are running multiple Cracks over a network; if you
- X * aren't using "rsh" to do this, edit "Scripts/RCrack" as well
- X */
- X
- X#undef CRACK_NETWORK
- X
- X/*
- X * Define this to search gecos entry for possible passwords - I RECOMMEND
- X * THIS VERY VERY STRONGLY
- X */
- X
- X#define CRACK_GECOS
- X
- X/*
- X * Define this to make a dictionary pass of pluralised words
- X */
- X
- X#define CRACK_PLURAL
- X
- X/*
- X * Define this to make a dictionary pass of words with TRAILING 0's and 1's.
- X * If you want to add other leading/trailing characters, edit the
- X * "trailing_chars[]" string in "crack-pp.c"
- X */
- X
- X#define CRACK_TRAILING
- X
- X/*
- X * Define this to make a dictionary pass of words with LEADING 0's and 1's.
- X * If you want to add other leading/trailing characters, edit the
- X * "trailing_chars[]" string in "crack-pp.c"
- X */
- X
- X#define CRACK_LEADING
- X
- X/*
- X * Define this to print the guessed password if you crack it. This is useful
- X * for interests sake, and you can find interesting correlations this way
- X * too.
- X */
- X
- X/*
- X * NOTE: DEFINING CRACK_PRINTOUT IS MANDATORY FOR "FEEDBACK" MODE TO WORK.
- X */
- X
- X#define CRACK_PRINTOUT
- X
- X/*
- X * Define this to print the ENCRYPTED VERSION of password if you crack it.
- X * This is useful if you will want to doublecheck that the user HAS changed
- X * his password, after you have warned him.
- X */
- X
- X#define CRACK_PRINTOUT2
- X
- X/*
- X * if defined, tries guesses < 5 chars long - this wastes time if you are
- X * unlikely to have REALLY short passwords, try it once though.
- X */
- X
- X#define CRACK_SHORT_PASSWDS
- X
- X/*
- X * if defined, do sanity checks on the DES password - this gets round expiry
- X * mechanisms appending extra characters to signify "things"
- X */
- X
- X#define CRACK_PW_VERIFY
- X
- X/*
- X * define this if you are using fcrypt() - you might not want to if fcrypt()
- X * doesn't work properly
- X */
- X
- X#define FCRYPT
- X
- X/*
- X * The following symbols pertain ONLY to fcrypt() usage
- X */
- X
- X/*
- X * if defined use builtin clearing in preference to using bzero(), for 4 or 8
- X * byte long ints
- X */
- X
- X#define BUILTIN_CLEAR
- X
- X/*
- X * define if you have a bzero and do not want to use BUILTIN_CLEAR
- X */
- X
- X#define BZERO
- X
- X/*
- X * define this if you have a 4 byte "long_int" on RISC machines and want a
- X * speedup - it should not hurt CISC machines either. Do NOT define it on a
- X * 8-byte int machine...
- X */
- X
- X#undef FDES_4BYTE
- X
- X/*
- X * define this if you are on a Cray or something with an 8-byte int, to
- X * enable Matthew Kaufman's fcrypt fix. I hope it works okay, cos I can't
- X * test it - AEM.
- X */
- X
- X#undef FDES_8BYTE
- X
- X/*
- X * undef this if your compiler knows the fact that 6*x == x<<1 + x<<2
- X */
- X
- X#undef BRAINDEAD6
- X
- X/*
- X * Personal stuff only - I recommend you ignore stuff below this line, unless
- X * you know what you're doing
- X */
- X
- X#ifdef DEVELOPMENT_VERSION
- X/*
- X * for my personal use, this is my configuration on a DS5000/200
- X */
- X#undef BRAINDEAD6
- X
- X#ifndef BUILTIN_CLEAR
- X#define BUILTIN_CLEAR
- X#endif /* BUILTIN_CLEAR */
- X
- X#undef BZERO
- X
- X#ifndef CRACK_GECOS
- X#define CRACK_GECOS
- X#endif /* CRACK_GECOS */
- X
- X#ifndef CRACK_NETWORK
- X#define CRACK_NETWORK
- X#endif /* CRACK_NETWORK */
- X
- X#ifndef CRACK_PLURAL
- X#define CRACK_PLURAL
- X#endif /* CRACK_PLURAL */
- X
- X#ifndef CRACK_PRINTOUT
- X#define CRACK_PRINTOUT
- X#endif /* CRACK_PRINTOUT */
- X
- X#ifndef CRACK_PRINTOUT2
- X#define CRACK_PRINTOUT2
- X#endif /* CRACK_PRINTOUT2 */
- X
- X#ifndef CRACK_PW_VERIFY
- X#define CRACK_PW_VERIFY
- X#endif /* CRACK_PW_VERIFY */
- X
- X#undef CRACK_SHORT_PASSWDS
- X
- X#ifndef CRACK_TRAILING
- X#define CRACK_TRAILING
- X#endif /* CRACK_TRAILING */
- X
- X#undef CRACK_UNAME
- X
- X#ifndef CRACK_VERBOSE
- X#define CRACK_VERBOSE
- X#endif /* CRACK_VERBOSE */
- X
- X#undef FAST_TOCASE
- X
- X#ifndef FCRYPT
- X#define FCRYPT
- X#endif /* FCRYPT */
- X
- X#ifndef FDES_4BYTE
- X#define FDES_4BYTE
- X#endif /* FDES_4BYTE */
- X
- X#undef FDES_8BYTE
- X
- X#endif /* DEVELOPMENT VERSION */
- END_OF_FILE
- if test 5941 -ne `wc -c <'Sources/conf.h'`; then
- echo shar: \"'Sources/conf.h'\" unpacked with wrong size!
- fi
- # end of 'Sources/conf.h'
- fi
- if test -f 'Sources/crack-lib.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Sources/crack-lib.c'\"
- else
- echo shar: Extracting \"'Sources/crack-lib.c'\" \(2352 characters\)
- sed "s/^X//" >'Sources/crack-lib.c' <<'END_OF_FILE'
- X#include "crack.h"
- X
- X/*
- X * This program is copyright (c) Alec Muffett 1991 except for certain
- X * portions of code ("crack-fcrypt.c") copyright (c) Robert Baldwin, Icarus
- X * Sparry and Alec Muffett. The author(s) disclaims all responsibility or
- X * liability with respect to it's usage or its effect upon hardware or
- X * computer systems. This software is in freely redistributable PROVIDED
- X * that this notice remains intact.
- X */
- X
- Xvoid
- XTrim (string) /* remove trailing whitespace from a string */
- X register char *string;
- X{
- X register char *ptr;
- X
- X for (ptr = string; *ptr; ptr++);
- X while ((--ptr >= string) && isspace (*ptr));
- X *(++ptr) = '\0';
- X}
- X
- Xchar *
- XReverse (str) /* return a pointer to a reversal */
- X register char *str;
- X{
- X register int i;
- X register int j;
- X register char *ptr;
- X static char area[STRINGSIZE];
- X
- X j = i = strlen (str);
- X while (*str)
- X {
- X area[--i] = *str++;
- X }
- X area[j] = '\0';
- X return (area);
- X}
- X
- Xchar *
- XUppercase (str) /* return a pointer to an uppercase */
- X register char *str;
- X{
- X register char *ptr;
- X static char area[STRINGSIZE];
- X
- X ptr = area;
- X while (*str)
- X {
- X *(ptr++) = islower (*str) ? toupper (*str) : *str;
- X str++;
- X }
- X *ptr = '\0';
- X
- X return (area);
- X}
- X
- Xchar *
- XLowercase (str) /* return a pointer to an lowercase */
- X register char *str;
- X{
- X register char *ptr;
- X static char area[STRINGSIZE];
- X
- X ptr = area;
- X while (*str)
- X {
- X *(ptr++) = isupper (*str) ? tolower (*str) : *str;
- X str++;
- X }
- X *ptr = '\0';
- X
- X return (area);
- X}
- X
- Xchar *
- XInitcap (str) /* return a pointer to an capitalised */
- X register char *str;
- X{
- X register char *ptr;
- X static char area[STRINGSIZE];
- X
- X ptr = area;
- X
- X while (*str)
- X {
- X *(ptr++) = isupper (*str) ? tolower (*str) : *str;
- X str++;
- X }
- X
- X *ptr = '\0';
- X
- X if (islower (area[0]))
- X {
- X area[0] = toupper (area[0]);
- X }
- X return (area);
- X}
- X
- Xchar *
- XClone (string)
- X char *string;
- X{
- X int len;
- X char *retval;
- X
- X retval = (char *) malloc (strlen (string) + 1);
- X strcpy (retval, string);
- X return (retval);
- X}
- X
- Xint
- XSuffix (word, suffix)
- X char *word;
- X char *suffix;
- X{
- X register int i;
- X register int j;
- X
- X i = strlen (word);
- X j = strlen (suffix);
- X
- X if (i > j)
- X {
- X return (strcmp ((word + i - j), suffix));
- X } else
- X {
- X return (-1);
- X }
- X}
- END_OF_FILE
- if test 2352 -ne `wc -c <'Sources/crack-lib.c'`; then
- echo shar: \"'Sources/crack-lib.c'\" unpacked with wrong size!
- fi
- # end of 'Sources/crack-lib.c'
- fi
- if test -f 'Sources/crack-pp.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Sources/crack-pp.c'\"
- else
- echo shar: Extracting \"'Sources/crack-pp.c'\" \(5502 characters\)
- sed "s/^X//" >'Sources/crack-pp.c' <<'END_OF_FILE'
- X#include "crack.h"
- X
- X/*
- X * This program is copyright (c) Alec Muffett 1991 except for certain
- X * portions of code ("crack-fcrypt.c") copyright (c) Robert Baldwin, Icarus
- X * Sparry and Alec Muffett. The author(s) disclaims all responsibility or
- X * liability with respect to it's usage or its effect upon hardware or
- X * computer systems. This software is in freely redistributable PROVIDED
- X * that this notice remains intact.
- X */
- X
- X/*
- X * The characters 1 and ! have the highest probability of hits of all the
- X * ascii set tried. Using zero and space have a much lower probability based
- X * on observation of several thousands of passwords. bct@hull.cs
- X */
- X
- X/*
- X * Sir! I disagree! Most of the trailing character passwords I have ever seen
- X * have been of a numeric type. However I will assent to your changes. 8-)
- X * aem@aber
- X */
- X
- X/* THIS IS THE STRING TO MODIFY TO ADD OTHER LEADING/TRAILING CHARS */
- X
- Xchar trailing_chars[] = "01!?";
- X
- X/* These used to be enums. Oh well... non-portability rules OK */
- X#define ORDER_LCF 0
- X#define ORDER_LCFP 1
- X#define ORDER_MCF 2
- X#define ORDER_LCFT 3
- X#define ORDER_LCB 4
- X#define ORDER_LCFL 5
- X#define ORDER_UCF 6
- X#define ORDER_MCB 8
- X#define ORDER_UCB 7
- X#define NUMFILES 9
- X
- Xint
- Xmain (argc, argv)
- X int argc;
- X char *argv[];
- X{
- X register int i;
- X register char *ptr;
- X int length;
- X int all_print;
- X int all_digits;
- X int all_letters;
- X int all_letters_upper;
- X int all_letters_lower;
- X char buffer[STRINGSIZE];
- X
- X FILE *fp;
- X FILE *fps[NUMFILES];
- X
- X if (argc == 1)
- X {
- X printf ("Usage:\t%s dictsrc [dictsrc ...]\n", argv[0]);
- X exit (1);
- X }
- X for (i = 0; i < NUMFILES; i++)
- X {
- X char scratch[255];
- X
- X fps[i] = (FILE *) 0;
- X
- X#ifndef CRACK_PLURAL /* if not defined, skip opening it */
- X if (i == ORDER_LCFP)
- X {
- X continue;
- X }
- X#endif /* CRACK_PLURAL */
- X
- X#ifndef CRACK_LEADING /* if not defined, skip opening it */
- X if (i == ORDER_LCFL)
- X {
- X continue;
- X }
- X#endif /* CRACK_LEADING */
- X
- X#ifndef CRACK_TRAILING /* if not defined, skip opening it */
- X if (i == ORDER_LCFT)
- X {
- X continue;
- X }
- X#endif /* CRACK_TRAILING */
- X
- X sprintf (scratch, "dict.%c", i + 'a');
- X if (!(fps[i] = fopen (scratch, "w")))
- X {
- X perror (scratch);
- X exit (3);
- X }
- X }
- X
- X for (i = 1; argv[i]; i++)
- X {
- X if (!(fp = fopen (argv[i], "r")))
- X {
- X perror (argv[i]);
- X continue;
- X }
- X printf ("dictpp: sourcing from file '%s'\n", argv[i]);
- X
- X while (fgets (buffer, STRINGSIZE, fp))
- X {
- X Trim (buffer);
- X
- X /* skip single letters and comments */
- X if (!*buffer || !buffer[1] || buffer[0] == '#')
- X {
- X continue;
- X }
- X length = strlen (buffer);
- X
- X#ifndef CRACK_SHORT_PASSWDS
- X if (length < 5)
- X {
- X continue;
- X }
- X#endif
- X all_letters_upper = 1;
- X all_letters_lower = 1;
- X all_digits = 1;
- X all_letters = 1;
- X all_print = 1;
- X
- X for (ptr = buffer; *ptr; ptr++)
- X {
- X if (!isdigit (*ptr))
- X {
- X all_digits = 0;
- X }
- X if (!isprint (*ptr))
- X {
- X all_print = 0;
- X }
- X if (!isalpha (*ptr))
- X {
- X all_letters = 0;
- X }
- X if (isupper (*ptr))
- X {
- X all_letters_lower = 0;
- X } else if (islower (*ptr))
- X {
- X all_letters_upper = 0;
- X }
- X }
- X
- X if (!all_print)
- X {
- X fprintf (fps[ORDER_LCF], "%.8s\n", buffer);
- X continue; /* inputs with funnies in it */
- X }
- X if (all_letters)
- X {
- X fprintf (fps[ORDER_MCF], "%.8s\n", Initcap (buffer));
- X fprintf (fps[ORDER_MCB], "%.8s\n", Reverse (Initcap (buffer)));
- X }
- X
- X#ifdef CRACK_PLURAL /* slightly improved pluralisation algorithm */
- X if (all_letters && length < 8)
- X {
- X /* linguistic flames to /dev/null, please */
- X char pluralbuff[STRINGSIZE];
- X
- X strcpy (pluralbuff, Lowercase (buffer));
- X
- X if (!Suffix (buffer, "ch") ||
- X !Suffix (buffer, "ex") ||
- X !Suffix (buffer, "ix") ||
- X !Suffix (buffer, "sh") ||
- X !Suffix (buffer, "ss"))
- X {
- X /* bench -> benches */
- X strcat (pluralbuff, "es");
- X } else if (length > 2 && buffer[length - 1] == 'y')
- X {
- X if (strchr ("aeiou", buffer[length - 2]))
- X {
- X /* alloy -> alloys */
- X strcat (pluralbuff, "s");
- X } else
- X {
- X /* gully -> gullies */
- X strcpy (pluralbuff + length - 1, "ies");
- X }
- X } else if (buffer[length - 1] == 's')
- X {
- X /* bias -> biases */
- X strcat (pluralbuff, "es");
- X } else
- X {
- X /* catchall */
- X strcat (pluralbuff, "s");
- X }
- X
- X fprintf (fps[ORDER_LCFP], "%.8s\n", pluralbuff);
- X }
- X#endif /* CRACK_PLURAL */
- X
- X if (!all_letters_upper)
- X {
- X fprintf (fps[ORDER_UCF], "%.8s\n", Uppercase (buffer));
- X fprintf (fps[ORDER_UCB], "%.8s\n", Uppercase (Reverse (buffer)));
- X } else
- X {
- X fprintf (fps[ORDER_UCF], "%.8s\n", buffer);
- X fprintf (fps[ORDER_UCB], "%.8s\n", Reverse (buffer));
- X }
- X
- X if (!all_letters_lower)
- X {
- X fprintf (fps[ORDER_LCF], "%.8s\n", Lowercase (buffer));
- X fprintf (fps[ORDER_LCB], "%.8s\n", Lowercase (Reverse (buffer)));
- X } else
- X {
- X fprintf (fps[ORDER_LCF], "%.8s\n", buffer);
- X fprintf (fps[ORDER_LCB], "%.8s\n", Reverse (buffer));
- X }
- X
- X#if defined(CRACK_LEADING) || defined(CRACK_TRAILING)
- X if (length < 8)
- X {
- X for (ptr = trailing_chars; *ptr; ptr++)
- X {
- X#ifdef CRACK_LEADING
- X fprintf (fps[ORDER_LCFL], "%c%.7s\n", *ptr, buffer);
- X#endif /* CRACK_LEADING */
- X#ifdef CRACK_TRAILING
- X fprintf (fps[ORDER_LCFT], "%.7s%c\n", buffer, *ptr);
- X#endif /* CRACK_TRAILING */
- X }
- X }
- X#endif
- X }
- X }
- X fclose (fp);
- X
- X for (i = 0; i < NUMFILES; i++)
- X {
- X if (fps[i])
- X {
- X fclose (fps[i]);
- X }
- X }
- X
- X exit (0);
- X}
- END_OF_FILE
- if test 5502 -ne `wc -c <'Sources/crack-pp.c'`; then
- echo shar: \"'Sources/crack-pp.c'\" unpacked with wrong size!
- fi
- # end of 'Sources/crack-pp.c'
- fi
- if test -f 'Sources/goodpass.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Sources/goodpass.c'\"
- else
- echo shar: Extracting \"'Sources/goodpass.c'\" \(8361 characters\)
- sed "s/^X//" >'Sources/goodpass.c' <<'END_OF_FILE'
- X#include <ctype.h>
- X#include <pwd.h>
- X#include <stdio.h>
- X#include <string.h>
- X#include <sys/file.h>
- X
- X/*
- X * goodpass.c : A simple yes/no password sensibility function to be wired
- X * into "passwd" & "yppasswd", etc. (c) ADE Muffett, 1991 (aem@aber.ac.uk).
- X * This module is freely redistributable for use in software so long as this
- X * copyright notice remains intact. Distributed as part of the 'Crack' suite
- X * of password testing programs.
- X */
- X
- X/* Usage:- */
- X/* char *result = GoodPass(char *password); */
- X/* where password is a text string to be tested for suitability */
- X/* GoodPass returns NULL if the password is OK */
- X/* GoodPass returns a diagnostic string if the password is NOT ok */
- X
- X#define PWLENGTH 8 /* significant length of text */
- X#define MINDIFF 5 /* minimum number of different characters */
- X#define MAXSTEP 3 /* max number of steps up/down in char set */
- X#define MINLENGTH 6 /* minimum length of a password */
- X#define STRINGSIZE 255 /* a standard buffer size */
- X#define STRIDE 4 /* word skipping length */
- X#undef DEBUG
- X
- Xstatic char *dikshunarys[] =
- X{
- X "/usr/dict/words",
- X "/usr/local/lib/bad_pws.dat",
- X NULL
- X};
- X
- Xstatic int
- XPmatch (control, string)
- X char *control;
- X char *string;
- X{
- X while (*control)
- X {
- X if (!*string)
- X {
- X return (0);
- X }
- X switch (*control)
- X {
- X case 'u':
- X if (!isupper (*string))
- X {
- X return (0);
- X }
- X break;
- X case 'l':
- X if (!islower (*string))
- X {
- X return (0);
- X }
- X break;
- X case 'd':
- X if (!isdigit (*string))
- X {
- X return (0);
- X }
- X break;
- X case 'c':
- X if (!isalpha (*string))
- X {
- X return (0);
- X }
- X break;
- X case '.':
- X default:
- X if (!isalnum (*string))
- X {
- X return (0);
- X }
- X break;
- X }
- X control++;
- X string++;
- X }
- X return (1);
- X}
- X
- Xstatic void
- XTrim (string) /* remove trailing whitespace from a string */
- X register char *string;
- X{
- X register char *ptr;
- X
- X for (ptr = string; *ptr; ptr++);
- X while ((--ptr >= string) && isspace (*ptr));
- X *(++ptr) = '\0';
- X}
- X
- Xstatic char *
- XReverse (str) /* return a pointer to a reversal */
- X register char *str;
- X{
- X register int i;
- X register int j;
- X register char *ptr;
- X static char area[STRINGSIZE];
- X
- X j = i = strlen (str);
- X while (*str)
- X {
- X area[--i] = *str++;
- X }
- X area[j] = '\0';
- X return (area);
- X}
- X/******* THE TEST FUNCTION *******/
- X
- Xstatic int
- XTry (input, guess)
- X register char *input;
- X register char *guess;
- X{
- X if (!strncasecmp (input, guess, PWLENGTH) ||
- X !strncasecmp (input, Reverse (guess), PWLENGTH))
- X {
- X return (-1);
- X }
- X return (0);
- X}
- X/******* DICTIONARY SEARCHING *******/
- X
- Xstatic int
- XGetWord (fp, buff)
- X FILE *fp;
- X char *buff;
- X{
- X register int c;
- X
- X for (;;)
- X {
- X c = getc (fp);
- X if (c == EOF)
- X {
- X return (-1);
- X }
- X if (c == '\n')
- X {
- X break;
- X }
- X *(buff++) = (char) c;
- X }
- X *buff = 0;
- X return (0);
- X}
- X
- Xstatic int
- XDictSearch (input)
- X char *input;
- X{
- X int i;
- X int loops;
- X register long top;
- X register long bot;
- X register long mid;
- X long scratch;
- X char word[STRINGSIZE];
- X FILE *fp;
- X char **dictionary;
- X
- X for (dictionary = dikshunarys; *dictionary; dictionary++)
- X {
- X if (!(fp = fopen (*dictionary, "r")))
- X {
- X perror (*dictionary);
- X continue;
- X }
- X bot = 0L; /* start of file */
- X fseek (fp, 0L, 2); /* to end of file */
- X top = ftell (fp);
- X
- X for (loops = 0; loops < 1000; loops++)
- X {
- X mid = (top + bot) / 2; /* calculate the middle */
- X scratch = mid;
- X
- X stride_loop:
- X
- X scratch -= STRIDE; /* calculate a bit beforehand */
- X if (scratch < 0) /* error fixing */
- X {
- X mid = scratch = 0L;
- X fseek (fp, 0L, 0);
- X } else
- X { /* find the start of the current word */
- X fseek (fp, scratch, 0); /* go read the scratch buffer */
- X fread (word, 1, STRIDE, fp);
- X
- X for (i = STRIDE - 1; i >= 0; i--)
- X {
- X if (word[i] == '\n') /* where 'mid' is is start of
- X * word */
- X {
- X break;
- X } else
- X { /* mid is between words */
- X mid--;
- X }
- X }
- X if (i < 0)
- X {
- X goto stride_loop;
- X }
- X }
- X
- X fseek (fp, mid, 0);
- X GetWord (fp, word);
- X
- X i = strncasecmp (input, word, PWLENGTH);
- X
- X if (i > 0)
- X {
- X bot = mid + strlen (word) + 1; /* why retest this word ever */
- X } else if (i < 0)
- X {
- X if (mid >= top)
- X {
- X break;
- X }
- X top = mid;
- X } else
- X {
- X fclose (fp);
- X return (-1); /* found it */
- X }
- X }
- X fclose (fp);
- X }
- X
- X return (0);
- X}
- X/******* THE EXTERNAL CALL *******/
- X
- Xchar *
- XGoodPass (input)
- X char *input;
- X{
- X register int i;
- X register char *ptr;
- X register char *ptr2;
- X struct passwd *pwd;
- X char junk[STRINGSIZE];
- X char password[STRINGSIZE];
- X
- X /* back it up. */
- X strcpy (password, input);
- X Trim (password);
- X
- X /* who is it ? */
- X pwd = getpwuid (getuid ());
- X if (!pwd)
- X {
- X perror ("getpwuid");
- X return ("Error - no password entry found to verify against.");
- X }
- X /* size */
- X if (strlen (password) < MINLENGTH)
- X {
- X return ("it is too short - use more characters.");
- X }
- X /* username */
- X if (Try (password, pwd -> pw_name))
- X {
- X return ("it is your username");
- X }
- X /* usernameusername */
- X strcpy (junk, pwd -> pw_name);
- X strcat (junk, pwd -> pw_name);
- X if (Try (password, junk))
- X {
- X return ("it is your username, doubled");
- X }
- X /* Gecos information field */
- X strcpy (junk, pwd -> pw_gecos);
- X ptr = junk;
- X if (*ptr == '-') /* never seen this, but... */
- X {
- X ptr++;
- X }
- X if (ptr2 = strchr (ptr, ';')) /* trim off junk */
- X {
- X *ptr2 = '\0';
- X }
- X if (ptr2 = strchr (ptr, ',')) /* trim off more junk */
- X {
- X *ptr2 = '\0';
- X }
- X for (;;)
- X {
- X if (ptr2 = strchr (ptr, ' '))
- X {
- X *(ptr2++) = '\0';
- X }
- X if (Try (password, ptr))
- X {
- X return ("it is part of your name. Use something less obvious.");
- X }
- X if (ptr2)
- X {
- X ptr = ptr2;
- X while (*ptr && isspace (*ptr))
- X {
- X ptr++;
- X }
- X } else
- X {
- X break;
- X }
- X }
- X
- X /* check for repeated characters */
- X bzero (junk, sizeof (junk));
- X for (i = 0; i < PWLENGTH && password[i]; i++)
- X {
- X if (!strchr (junk, password[i]))
- X {
- X strncat (junk, password + i, 1);
- X }
- X }
- X if (strlen (junk) < MINDIFF)
- X {
- X return ("it does not contain enough different characters.\nUse more different characters.");
- X }
- X /* check for over simplicity */
- X i = 0;
- X ptr = password;
- X while (ptr[0] && ptr[1])
- X {
- X if ((ptr[1] == (ptr[0] + 1)) ||
- X (ptr[0] == (ptr[1] + 1)))
- X {
- X i++;
- X }
- X ptr++;
- X }
- X if (i > MAXSTEP)
- X {
- X return ("it is too simplistic. Try something more random.");
- X }
- X /* lets get a little silly... */
- X if (Pmatch ("cdddccc", password))
- X {
- X return ("it looks like a new style car registration.");
- X }
- X if (Pmatch ("cccdddc", password))
- X {
- X return ("it looks like a old style car registration.");
- X }
- X if (Pmatch ("cccddd", password) || Pmatch ("dddccc", password))
- X {
- X return ("it looks like an old-style car registration.");
- X }
- X if (Pmatch ("ccddddddc", password))
- X {
- X return ("it looks like a National Insurance number.");
- X }
- X strcpy (junk, input);
- X
- X /* do a dictionary search here */
- X if (DictSearch (junk))
- X {
- X return ("it is a guessable dictionary word.");
- X }
- X if (DictSearch (Reverse (junk)))
- X {
- X return ("it is a guessable reversed dictionary word.");
- X }
- X /* strip off possible initial number and do a dictionary search here */
- X if (isdigit (junk[0]))
- X {
- X if (DictSearch (junk + 1))
- X {
- X return ("it is a digit + guessable dictionary word.");
- X }
- X if (DictSearch (Reverse (junk + 1)))
- X {
- X return ("it is a digit + guessable reversed dictionary word.");
- X }
- X }
- X i = strlen (junk) - 1;
- X if (isdigit (junk[i]))
- X {
- X junk[i] = '\0';
- X if (DictSearch (junk))
- X {
- X return ("it is a guessable dictionary word + digit.");
- X }
- X if (DictSearch (Reverse (junk)))
- X {
- X return ("it is a guessable reversed dictionary word + digit.");
- X }
- X } else if (junk[i] == 's')
- X {
- X junk[i] = '\0';
- X if (DictSearch (junk))
- X {
- X return ("it is a pluralised dictionary word.");
- X }
- X }
- X return ((char *) NULL);
- X}
- X#ifdef DEBUG
- Xmain (argc, argv)
- X int argc;
- X char *argv[];
- X{
- X int i;
- X char *p;
- X
- X for (i = 1; i < argc; i++)
- X {
- X printf ("'%s'\n", argv[i]);
- X
- X if (p = GoodPass (argv[i]))
- X {
- X printf ("\t%s\n", p);
- X } else
- X {
- X printf ("\tok\n");
- X }
- X }
- X}
- X#endif
- END_OF_FILE
- if test 8361 -ne `wc -c <'Sources/goodpass.c'`; then
- echo shar: \"'Sources/goodpass.c'\" unpacked with wrong size!
- fi
- # end of 'Sources/goodpass.c'
- fi
- echo shar: End of archive 2 \(of 5\).
- cp /dev/null ark2isdone
- MISSING=""
- for I in 1 2 3 4 5 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 5 archives.
- rm -f ark[1-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
- exit 0 # Just in case...
- --
- Kent Landfield INTERNET: kent@sparky.IMD.Sterling.COM
- Sterling Software, IMD UUCP: uunet!sparky!kent
- Phone: (402) 291-8300 FAX: (402) 291-4362
- Please send comp.sources.misc-related mail to kent@uunet.uu.net.
-