Nmap Development mailing list archives
Re: nmap 5.10-beta1
From: Rob Nicholls <robert () robnicholls co uk>
Date: Mon, 14 Dec 2009 12:33:13 +0000
On Mon, 14 Dec 2009 10:40:38 +0200, Maxim <shamanu4 () gmail com> wrote:
Greetings. nmap 5.10-beta1 don't have a bug but a little usability lost. when using network scan to detect hosts up output become multiline, so such filtering as "grep up" is seamless now.
I can see the potential issue, but if you're just after a list of hosts that are up then omitting the -v would do the trick as Nmap will not list the hosts that are down, so you can do: nmap -sP 192.168.65.1-254 -n | grep report This should give you something like: Nmap scan report for 192.168.65.1 Nmap scan report for 192.168.65.2 Nmap scan report for 192.168.65.10 Nmap scan report for 192.168.65.15 Nmap scan report for 192.168.65.17 Nmap scan report for 192.168.65.24 Nmap scan report for 192.168.65.27 Nmap scan report for 192.168.65.28 Nmap scan report for 192.168.65.29 Is that close enough to what you're after? You do lose the latency information, but I'm guessing that's not important. If someone wants to list whether an IP is up or down from the normal output, I can see this being an annoyance as the IP address of a host that's up is always on the line above. But the greppable output (-oG) provides text that's suitable for determining this, although this would be a two step process if you're just after hosts that are up: nmap -sP 192.168.65.1-254 -n -oG greppable.gnmap cat greppable.gnmap | grep Up Host: 195.153.86.1 () Status: Up Host: 195.153.86.2 () Status: Up Host: 195.153.86.10 () Status: Up Host: 195.153.86.15 () Status: Up Host: 195.153.86.17 () Status: Up Host: 195.153.86.24 () Status: Up Host: 195.153.86.27 () Status: Up Host: 195.153.86.28 () Status: Up Host: 195.153.86.29 () Status: Up It's often best to use the XML file for any (especially complex) scripts as that's unlikely to change, unlike Nmap's normal output. Rob _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Current thread:
- nmap 5.10-beta1 Maxim (Dec 14)
- Re: nmap 5.10-beta1 Rob Nicholls (Dec 14)
- Re: nmap 5.10-beta1 David Fifield (Dec 14)