File: Crack

package info (click to toggle)
crack 5.0a-7
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 8,456 kB
  • ctags: 574
  • sloc: ansic: 7,444; perl: 1,316; sh: 1,053; makefile: 296
file content (36 lines) | stat: -rw-r--r-- 770 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh
# Wrapper file for Crack
# written by Javier Fernandez-Sanguino for the Debian GNU/Linux distribution
# 
# Licensed under the GNU GPL v2.
# See /usr/share/doc/common-licenses/GPL

# This is needed due to relative calls to 'dawg' and co.
PATH=/usr/lib/Crack:$PATH
export PATH

if [ "`id -u`" != "0" ]
then
  echo "Crack requires root priviledges to run."
  exit 1
fi

cd /usr/share/Crack
MERGED=`tempfile -d run`
if [ "$1" = "/etc/passwd" -a "$2" = "" ] ;
then
# User supplied one argument (hasn't read the instructions :)
# Check if there is a shadow file
	if [ -f /etc/shadow ] ; then
	>$MERGED
	# Just in case..
	chmod 600 $MERGED
 	sh scripts/shadmrg.sv >$MERGED
	./Crack $MERGED
	[ -f $MERGED ] && /bin/rm $MERGED
	else
	./Crack $*
	fi
else
	./Crack $*
fi