nmap
nmap copied to clipboard
[FR] Flag to include command-line output in XML, like Zenmap does.
It would be nice if there was a flag to include the command-line output in the XML save, like Zenmap does.
Thanks, Nighty
Version info (please complete the following information):
- OS:
Windows 10 Pro x64 - Output of
nmap --version:
Platform: i686-pc-windows-windows
Compiled with: nmap-liblua-5.3.5 openssl-1.1.1k nmap-libssh2-1.9.0 nmap-libz-1.2.11 nmap-libpcre-7.6 Npcap-1.55 nmap-libdnet-1.12 ipv6
Compiled without:
Available nsock engines: iocp poll select
Additional context
Trivial example scans showing the difference in the XML files:
Zenmap:
<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet href="file:///C:/Nmap/nmap.xsl" type="text/xsl"?>
<nmaprun start="1632200469" profile_name="" xmloutputversion="1.04" scanner="nmap"
version="7.92" startstr="Tue Sep 21 15:01:09 2021" args="nmap -sn scanme.nmap.org">
<verbose level="0"></verbose><debugging level="0"></debugging><output type="interactive">
Starting Nmap 7.92 ( https://nmap.org ) at 2021-09-21 15:01 Tasmania Standard Time
**Nmap** scan report for scanme.nmap.org (45.33.32.156)
Host is up (0.18s latency).
Other addresses for scanme.nmap.org (not scanned): 2600:3c01::f03c:91ff:fe18:bb2f
Nmap done: 1 IP address (1 host up) scanned in 1.43 seconds
</output><host comment=""><status state="up"></status><address addrtype="ipv4" vendor=""
addr="45.33.32.156"></address><hostnames><hostname type="user" name="scanme.nmap.org">
</hostname><hostname type="PTR" name="scanme.nmap.org"></hostname></hostnames><ports>
</ports><os></os><uptime lastboot="" seconds=""></uptime><tcpsequence index="" values=""
difficulty=""></tcpsequence><ipidsequence values="" class=""></ipidsequence>
<tcptssequence values="" class=""></tcptssequence></host><runstats>
<finished timestr="Tue Sep 21 15:01:10 2021" time="1632200470"></finished>
<hosts down="0" total="1" up="1"></hosts></runstats></nmaprun>
nmap:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE nmaprun>
<?xml-stylesheet href="file:///C:/Nmap/nmap.xsl" type="text/xsl"?>
<!-- Nmap 7.92 scan initiated Tue Sep 21 15:02:05 2021 as: nmap -sn -oX 2.xml
scanme.nmap.org -->
<nmaprun scanner="nmap" args="nmap -sn -oX 2.xml scanme.nmap.org" start="1632200525"
startstr="Tue Sep 21 15:02:05 2021" version="7.92" xmloutputversion="1.05">
<verbose level="0"/>
<debugging level="0"/>
<host><status state="up" reason="echo-reply" reason_ttl="46"/>
<address addr="45.33.32.156" addrtype="ipv4"/>
<hostnames>
<hostname name="scanme.nmap.org" type="user"/>
<hostname name="scanme.nmap.org" type="PTR"/>
</hostnames>
<times srtt="183000" rttvar="183000" to="915000"/>
</host>
<runstats><finished time="1632200526" timestr="Tue Sep 21 15:02:06 2021"
summary="Nmap done at Tue Sep 21 15:02:06 2021; 1 IP address (1 host up) scanned in 0.37
seconds" elapsed="0.37" exit="success"/><hosts up="1" down="0" total="1"/>
</runstats>
</nmaprun>