Skip to content

Instantly share code, notes, and snippets.

@coffeegist
Last active June 21, 2024 16:04
Show Gist options
  • Save coffeegist/7c8c3dc54d5c21d588a7b1ba1b4ef66d to your computer and use it in GitHub Desktop.
Save coffeegist/7c8c3dc54d5c21d588a7b1ba1b4ef66d to your computer and use it in GitHub Desktop.
OSCP nmap scripts
if [ "$#" -ne 3 ]; then
echo "Usage: nmap-tcp-full.sh <TCP-QUICK-RESULTS.XML> <TARGET> <OUTPUT-FILENAME>"
exit 1
fi
nmap -nvv -Pn -sSV -T1 -p$(cat $1 | grep portid | grep protocol=\"tcp\" | cut -d'"' -f4 | paste -sd "," -) --version-intensity 9 -A -oA $3 $2
if [ $# -ne 2 ]; then
echo "Usage: nmap-tcp-quick.sh <TARGET> <OUTPUT-FILENAME>"
exit 1
fi
nmap -Pn -sS --stats-every 3m --max-retries 1 --max-scan-delay 20 --defeat-rst-ratelimit -T4 -p1-65535 -oA $2 $1
if [ $# -ne 2 ]; then
echo "Usage: nmap-udp-quick.sh <TARGET> <OUTPUT-FILENAME>"
exit 1
fi
nmap -Pn --top-ports 1000 -sU --stats-every 3m --max-retries 1 -T3 -oA $2 $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment