Tony Guggino
Tony Guggino

Reputation: 1

nmap xml output not showing port state (open/closed)

doing some port scanning on our LAN using NMAP and outputting to XML. In cmd (using Windows) it shows "STATE" with "open" or "closed', however in the actual XML file/output it just says state="up" for everything.

NMAP command: nmap -p <port> <subnet> -oX C:\Temp\ResultXML.xml

Example line of the XML missing STATE:

<hosthint><status state="up" reason="arp-response" reason_ttl="0"/>
<address addr="xxx.xxx.xxx" addrtype="ipv4"/> <address addr="xxxxxxx"
addrtype="mac" vendor="xxxxx"/>

I'm using Python to cleanup the XML after and make a pretty text result for review. ATM I want to ignore the "closed" ports, but the XML just has everything with "up".

Upvotes: -3

Views: 23

Answers (0)

Related Questions