savon-noir / python-libnmap

libnmap is a python library to run nmap scans, parse and diff scan results. It supports python 2.7 up to 3.8. It's wonderful.
https://libnmap.readthedocs.org
Other
487 stars 182 forks source link

parsing hostnames should return the type of the hostname detected i.e user or PTR #103

Open ameidatou opened 4 years ago

ameidatou commented 4 years ago

Parsing hostname should return a dictionary with the name and type attributes of the hostname and not just a string of hostnames names: According to DTD:

<!ELEMENT hostname EMPTY >
<!ATTLIST hostname
name CDATA #IMPLIED
type %hostname_types; #IMPLIED
>

Example of XML output:

<hostnames>
<hostname name="scanme.org" type="user"/>
<hostname name="scanme.nmap.org" type="PTR"/>
</hostnames>

Currently hostnames are just string of names

savon-noir commented 3 years ago

thanks for flagging this. i'll add this to the backlog of version 0.7.1 (next update)

savon-noir commented 3 years ago

I've got to jump to 0.7.2 without including this in the package but i've already started with the 0.7.3 work..