Skip to content

Instantly share code, notes, and snippets.

@gmelodie
Created April 1, 2022 20:46
Show Gist options
  • Save gmelodie/600c93d95ba5b1d638d958f986335ec8 to your computer and use it in GitHub Desktop.
Save gmelodie/600c93d95ba5b1d638d958f986335ec8 to your computer and use it in GitHub Desktop.
Initial nmap scans to do in a machine
#!/bin/bash
if [ $# -ne 1 ]
then
echo "usage: sudo ./$0 TARGET_IP"
exit 1
fi
mkdir nmap
nmap -p- -sU -n --max-retries 3 --max-scan-delay 1 $1 -oN nmap/all-udp.txt &
nmap -sSVC -O -Pn -p- --script=default --open --reason --osscan-guess $1 -oN nmap/all-tcp.txt &
nmap --top-ports 50 -Pn -n --open --reason $1 -oN nmap/top-tcp.txt &
nmap -Pn -n --open --reason $1 --min-rate 10000 -oN nmap/fast-tcp.txt & # fast tcp full-port scan
nmap -sU --top-ports 50 -Pn -n --open --reason $1 --max-scan-delay 1 -oN nmap/top-udp.txt &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment