Skip to content

Instantly share code, notes, and snippets.

@BeanBagKing
Last active September 26, 2017 19:34
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 BeanBagKing/c2a4f9a498a086c1b7f9 to your computer and use it in GitHub Desktop.
Save BeanBagKing/c2a4f9a498a086c1b7f9 to your computer and use it in GitHub Desktop.
#!/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

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