File: Reporter

package info (click to toggle)
crack 5.0a-11
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 9,012 kB
  • sloc: ansic: 7,444; perl: 1,375; sh: 1,062; makefile: 218
file content (97 lines) | stat: -rwxr-xr-x 1,792 bytes parent folder | download | duplicates (8)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#!/bin/sh
###
# This program was written by and is copyright Alec Muffett 1991,
# 1992, 1993, 1994, 1995, and 1996, and is provided as part of the
# Crack v5.0 Password Cracking package.
#
# The copyright holder disclaims all responsibility or liability with
# respect to its usage or its effect upon hardware or computer
# systems, and maintains copyright as set out in the "LICENCE"
# document which accompanies distributions of Crack v5.0 and upwards.
###

tfile=run/T$$
date=`date`

while [ "x$1" != "x" ]
do
    case $1 in
	-html)
	    html=yes
	    ;;
	-quiet)
	    quiet=yes # At the suggestion of Guido van Rooij
	    ;;
    esac

    shift
done

if [ "$html" != "" ]
then
    echo "<html><head><title>Crack 5.0 Output</title></head><body>"
    echo "<h1>Crack 5.0 Output:</h1><hr>"
    echo "<h1>Passwords Cracked as of $date:</h1><p>"
    echo "<pre>"
else
    echo "---- passwords cracked as of $date ----"
    echo ""
fi

(
    cat run/D* | egrep '^[DFG]:' > $tfile
    egrep '^[FG]:' $tfile
    egrep '^D:' $tfile
    rm $tfile
) |
awk -F: '
$1 == "F" {
    plaintext[$2] = $3
    guesstime[$2] = 0
    next
}
$1 == "G" {
    plaintext[$3] = $4
    guesstime[$3] = $2
    next
}
$1 == "D" {
    if (plaintext[$3] != "")
    {
	printf "%d:Guessed %s [%s]  %s\n", guesstime[$3], $4, plaintext[$3], $5
    }
}' |
sort -t: -n |
sed -e 's/^[0-9]\+://'

if [ "$quiet" = "" ]
then
    if [ "$html" != "" ]
    then
	echo "</pre>"
	echo "<hr>"
	echo "<h1>Errors and Warnings:</h1>"
	echo "<p>"
	echo "<pre>"
    else
	echo ""
	echo "---- errors and warnings ----"
	echo ""
    fi

    cat run/D* |
    egrep '^E:' |
    sed -e 's/^E:[0-9]\+://' |
    sort |
    uniq
fi

if [ "$html" != "" ]
then
    echo "</pre><hr></body></html>"
else
    echo ""
    echo "---- done ----"
fi

exit 0