cjohnson496
4/4/2016 - 4:06 PM

NMap Top 1000 ports scan script

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