Nmap Development mailing list archives
Re: Request to add MAC Address to GREP Output
From: Fyodor <fyodor () insecure org>
Date: Sun, 31 Dec 2006 01:26:11 -0800
On Fri, Dec 29, 2006 at 06:08:23PM -0600, Peter Nichols wrote:
Could someone add the MAC address to the grepable output in the code base?
I'm afraid the grepable output format is deprecated. Your best bet is to use the XML output, which does include the MAC address. The problem with the grepable format is that it was poorly designed/documented, isn't very extensible, and also trying to fit everything on one line is a bit of a mess. So unless there is a huge groundswell of support for adding a certain item to grepable output, I'd tend to resist doing so. I'll bet you could pipe the Nmap output to some simple xml tools on the command line of your average modern Linux box and pick out just the portions you want (IP address, maybe open ports, MAC address, etc.) and print them on one line per host. Then you get the best of both words -- easily grepable output and just the fields you are concerned with. But I admit that I'm no XML expert. Does anyone here know good command-line tools for picking out fields from Nmap XML output? Have an example command-line you can show us? xslt with a custom XSL file would do the trick, but that may be overkill for the simple cases where you just want (say) the IP, open TCP port numbers, and (in this case) MAC address. Cheers, Fyodor _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://SecLists.Org
Current thread:
- Request to add MAC Address to GREP Output Peter Nichols (Dec 29)
- Re: Request to add MAC Address to GREP Output Fyodor (Dec 31)