Skip to content

Instantly share code, notes, and snippets.

@BeanBagKing
Last active Sep 26, 2017
Embed
What would you like to do?
#!/bin/bash
script=$1
YEL='\033[1;33m'
NC='\033[0m' # No Color
if [ -z $script ]; then
echo "Usage: `basename $0` [KEYWORD]"
exit 1
fi
echo -e "${YEL}------- Searching List ------------${NC}"
result=`grep -i -n --color=always $script /usr/local/bin/nmap_scripts.list`
echo -e "$result"
echo -e "${YEL}------- Grepping Directory --------${NC}"
result=`ls /usr/share/nmap/scripts/ | grep -i -n --color=always $script`
# If you are using a snap, change the directory to...
# /snap/nmap/26/share/nmap/scripts/
echo -e "$result"
echo -e "${YEL}------- Useful Followups ----------${NC}"
echo -e "${YEL}Categories are: auth, broadcast, brute, default. discovery, dos, exploit, ${NC}"
echo -e "${YEL} external, fuzzer, intrusive, malware, safe, version, vuln, and all ${NC}"
echo -e "${YEL}cat /usr/share/nmap/scripts/${NC}"
echo -e "${YEL}nmap -v -script ${NC}"
echo -e "${YEL}-----------------------------------${NC}"
@BeanBagKing
Copy link
Author

BeanBagKing commented Mar 11, 2016

You also need to grab the "database" text file that it looks for on line 13, "nmap_scripts.list", and save it to the same directory. Future plans are to build this into some kind of automated --update function. - https://gist.github.com/BeanBagKing/bd6fd1415e04c7791382

@BeanBagKing
Copy link
Author

BeanBagKing commented Jun 28, 2016

The static "database" file has been replaced with a script that builds the database from the NSEDocs website. https://gist.github.com/BeanBagKing/2f9ad70daf8d793f1a8e4c2d096897ba

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment