To gather information about conflicting machines all around.
Start using NMAP Port Scanner and use my NMAP Parser shell script to interpret results and/or import to some Database etc ...
Run
nmap -v -O -sT -oG resultgreppable1.txt -oN resultnormal1.txt -oX resultxml1.txt 10.16.2.2-254 10.16.4.2-254 10.16.6.2-254
This Command Scans 3 IP Address Ranges:
And logs results in 3 parsable formats.
We use greppable format.
Next,
Save this Shell Script as "parsenmap.sh"
to interpret results from greppable log file.
#!/bin/sh
#!parsenmap.sh
cat resultgreppable1.txt | grep -i -v "status: Down" | grep -iv "nmap" | grep -v ';' | tr '[()]' ':' | while read line
do
echo $line | awk -F':' '{print $5}' | tr ',' '\n' | while read openport
do
echo "`echo $line | awk -F':' '{print $2,$3}'` `echo $openport | awk -F'/' '{print $1,$3,$5}'` `echo $line | awk -F':' '{print $9}'`"
done
done
chmod ugo+x parsenmap.sh
Run
./parsenmap.sh
It should show you results of Machines with Open Ports.



