Skip to content

Instantly share code, notes, and snippets.

@t3h2mas
Created September 6, 2017 12:39
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 t3h2mas/59ebbdffe711155409a5b120663157f4 to your computer and use it in GitHub Desktop.
Save t3h2mas/59ebbdffe711155409a5b120663157f4 to your computer and use it in GitHub Desktop.
quick nmap scan of target list file; saves results to [HOSTNAME].scanq
#!/bin/bash
if [[ -z "$1" ]]; then
echo "[!] usage: $0 [HOST LIST]"
exit
fi
hosts="$1"
len=$(wc -l "$hosts")
echo "[*] starting scan of $len hosts"
for host in $(cat "$hosts"); do
echo "[*] running scan on $host"
nmap -sSV -Pn -p 1-10000 --min-parallelism 64 --min-hostgroup 96 -T4 --version-all --reason --open -oA "${host}.scanq" -T4 "$host" &
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment