Skip to content

Instantly share code, notes, and snippets.

@binary1985
Last active November 11, 2015 16:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save binary1985/f9495a3c90f6440e4433 to your computer and use it in GitHub Desktop.
Save binary1985/f9495a3c90f6440e4433 to your computer and use it in GitHub Desktop.
#!/bin/bash
clear
MINPARAMS=2
if [ $# -lt "$MINPARAMS" ]
then
echo "This script needs at least $MINPARAMS command-line arguments! Please try $0 <address/subnet> <ports>. Example $0 192.168.1.100 21,22,23,25,80,443"
exit
fi
IFS=$'\n' && nmap $1 -p $2 -sV -oG test && clear && cat test |tr "," "\n" | grep open | cut -d / -f7 | sort -u | grep -v "^$" > banners.txt && rm test && while read ban; do open "https://www.google.com/?q=$ban exploit"; done < banners.txt && rm banners.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment