1
mirror of https://github.com/rapid7/metasploit-framework synced 2024-10-29 18:07:27 +01:00
metasploit-framework/data/john/run.linux.x86.any/mailer
HD Moore a4ea859a4f Check in a snapshot of jtr
git-svn-id: file:///home/svn/framework3/trunk@13135 4d416f70-5f16-0410-b530-b9f4589650da
2011-07-09 02:11:54 +00:00

42 lines
785 B
Bash
Executable File

#!/bin/sh
#
# This file is part of John the Ripper password cracker,
# Copyright (c) 1996-98 by Solar Designer
#
if [ $# -ne 1 ]; then
echo "Usage: $0 PASSWORD-FILE"
exit 0
fi
# There's no need to mail users with these shells
SHELLS=-,/bin/false,/dev/null,/bin/sync
# Look for John in the same directory with this script
DIR="`echo "$0" | sed 's,/[^/]*$,,'`"
# Let's start
$DIR/john -show "$1" -shells:$SHELLS | sed -n 's/:.*//p' |
(
SENT=0
while read LOGIN; do
echo Sending mail to "$LOGIN"...
# You'll probably want to edit the message below
mail -s 'Bad password' "$LOGIN" << EOF
Hello!
Your password for account "$LOGIN" is insecure. Please change it as soon
as possible.
Yours,
Password Checking Robot.
EOF
SENT=$(($SENT+1))
done
echo $SENT messages sent
)