So I am running nmap from an instance of Ubuntu with the Windows Subsystem for Linux (WSL) and I have followed all the directions, when I run my command:
(venv) user@my_pc:~$python3 nmap-converter.py -o name_of_the_file_to_be_created.xlsx name_of_the_nmap_scan.xml
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/libnmap/parser.py", line 101, in _parse_xml
root = ET.fromstring(nmap_data)
File "/usr/lib/python3.8/xml/etree/ElementTree.py", line 1320, in XML
parser.feed(text)
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, column 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "nmap-converter.py", line 220, in <module>
parsed = NmapParser.parse_fromfile(report)
File "/usr/local/lib/python3.8/dist-packages/libnmap/parser.py", line 213, in parse_fromfile
rval = cls.parse(fdata, data_type, incomplete)
File "/usr/local/lib/python3.8/dist-packages/libnmap/parser.py", line 47, in parse
nmapobj = cls._parse_xml(nmap_data, incomplete)
File "/usr/local/lib/python3.8/dist-packages/libnmap/parser.py", line 104, in _parse_xml
raise NmapParserException(emsg)
libnmap.parser.NmapParserException: Wrong XML structure: cannot parse data: not well-formed (invalid token): line 1, column 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/libnmap/parser.py", line 101, in _parse_xml
root = ET.fromstring(nmap_data)
File "/usr/lib/python3.8/xml/etree/ElementTree.py", line 1320, in XML
parser.feed(text)
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, column 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "nmap-converter.py", line 222, in <module>
parsed = NmapParser.parse_fromfile(report, incomplete=True)
File "/usr/local/lib/python3.8/dist-packages/libnmap/parser.py", line 213, in parse_fromfile
rval = cls.parse(fdata, data_type, incomplete)
File "/usr/local/lib/python3.8/dist-packages/libnmap/parser.py", line 47, in parse
nmapobj = cls._parse_xml(nmap_data, incomplete)
File "/usr/local/lib/python3.8/dist-packages/libnmap/parser.py", line 104, in _parse_xml
raise NmapParserException(emsg)
libnmap.parser.NmapParserException: Wrong XML structure: cannot parse data: not well-formed (invalid token): line 1, column 1
Please tell me what I did worng.