Skip to content

Instantly share code, notes, and snippets.

@0xdevalias
Last active September 26, 2016 12:45
Show Gist options
  • Save 0xdevalias/5963377 to your computer and use it in GitHub Desktop.
Save 0xdevalias/5963377 to your computer and use it in GitHub Desktop.
A very simple script to make nmap scanning a little quicker to kick off.By Glenn '/dev/alias' Grant (devalias.net)
#!/bin/bash
echo "-----------------------------------------------"
echo "A very simple script to make nmap scanning a little quicker to kick off"
echo "By Glenn '/dev/alias' Grant (devalias.net)"
echo "v0.3"
echo "-----------------------------------------------"
_iphost=$1
_now=$(date +"%Y%m%d-%H%M")
_nmapopts="-A -vvv ${@:2}"
_nmapoptshidden="--webxml"
_nmapoptsfilename=$(echo $_nmapopts | tr -d ' ')
_file="nmap-$_now-$_iphost$_nmapoptsfilename"
if [ -z "$1" ]; then
echo "Usage: nmap.sh ipOrHostnameToScan [any other arguments here]"
echo "Default Options: $_nmapoptshidden $_nmapopts"
exit
fi
nmap -oA $_file $_nmapoptshidden $_nmapopts $_iphost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment