Simple nmap ping sweep and host scan script

sudo -s
if [ -f /tmp/nmap.* ]; then rm /tmp/nmap.*; fi
nmap -sP -PA 192.168.0.0/24 >> /tmp/nmap.sweep
for h in $(grep Host /tmp/nmap.sweep | awk '{print$2}'); do $c -PN -A $h >> /tmp/nmap.scan; done
less /tmp/nmap.scan

Leave a comment

NOTE: Enclose quotes in <blockquote></blockquote>. Enclose code in <pre lang="LANG"></pre> (where LANG is one of these).