laconicwolf / Nmap-Scan-to-CSV

Converts Nmap XML output to csv file, and other useful functions
216 stars 98 forks source link

Only IP Address Visible in CSV #4

Closed stone212 closed 5 years ago

stone212 commented 5 years ago

I have an nmap XML file that contains information including IP address and MAC address but when I convert it to CSV only the IP addresses are visible. Not even information on if the host is active. These headings exist:

` Host | OS | Proto | Port | Service | Product | Service FP | NSE Script ID | NSE Script Output | Notes



There is no heading for MAC but the XML has MAC addresses.  And those fields are empty for every host except the host I am running from.

I know that filling those fields is related to the nmap options, but I think my question/Issue is: can this script parse and convert MAC addresses?
laconicwolf commented 5 years ago

That is correct. I didn't parse the MAC because when I wrote this script the MAC address wasn't something that I cared about, so I didn't want to include it and clutter up the csv. As per active hosts, the script only displays hosts that are 'up'. Once again, I didn't want to clutter the csv and didn't really care about down hosts. Similar behavior with ports; the script doesn't display ports that aren't open. I'm going to close this, but I'll look into making a script that just converts all the info that the xml contains, including the MAC, Hosts status, Start and End times, etc.

stone212 commented 5 years ago

@laconicwolf Thank you. I thought I was going crazy. From the description I assumed that the script would convert the output, not selectively, of the command. So I thought I had the wrong command, so I thought maybe nmap was upgraded to use a completely different format. You understand.

When I said "active" I think I meant the same as you mean by "up". I did not see how in your script to see if a host is up. Or maybe I did? It's been a week or more since I tried. Anyway I think the new script will be great.