Skip to content

Instantly share code, notes, and snippets.

@apolloclark
Last active January 4, 2019 00:59
Show Gist options
  • Save apolloclark/53cc378197830b8059b490940befa397 to your computer and use it in GitHub Desktop.
Save apolloclark/53cc378197830b8059b490940befa397 to your computer and use it in GitHub Desktop.
NMap Top 1000 ports scan script

[nmap_scanner.sh]

#!/bin/bash

# create the output directory
mkdir ./nmap_scan

# loop over each ending ip octet
for i in `seq 1 254`;
do
        ip="192.168.1.$i"
        echo $ip
        
        # run the scan, save the output to a unique file per IP
        nmap -vv -O -Pn -sTUV --top-ports 1000 $ip | tee "./nmap_scan/$ip.txt"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment