I have a newline separated list of domains that I would like to perform an arbitrary nmap scan on (e.g. aggressive, syn) and I would like to output a boolean that indicates whether or not any ports are open. The primary function here is to deduce whether a server is up even if it is ping blocking.
Is there a common pattern to accomplish this?
I am using the following to put the results into a monolithic XML file, but stanzas are not connected.
mkdir results ; for ip in `cat servers`; do nmap -oX results/${ip}.xml -T4 -A $ip; done