Monday, June 30, 2008

fun with nmap

I had some fun with nmap today.

Should you care to see some of the horrible pipe-fitting I did please see the commands below:
nmap -A -vv > nmapoutputwithosdetection.txt  
grep "open port" nmapoutputwithosdetection.txt | awk '/[0-9]+\.[0-9]+\.[0-9]\./ {print $6}' | \
sort -u > iplisttoscan.txt
nmap -T sneaky -iL iplisttoscan.txt
What does this do? nothing productive whatsoever really. I wanted a script to go through and determine the hosts up on my local network, then simulate someone being "sneaky" when using nmap so I could watch the scan using tcpdump (note to self: start using a better sniffer like wireshark).

No comments: