Closed adnanmig closed 3 years ago
Hi,
I have this function in my code:
def do_scan(targets, options): parsed = None nmproc = NmapProcess(targets, options, safe_mode=True) rc = nmproc.sudo_run() if rc != 0: print("nmap scan failed: {0}".format(nmproc.stderr)) #print(type(nmproc.stdout)) try: parsed = NmapParser.parse(nmproc.stdout) except NmapParserException as e: print("Exception raised while parsing scan: {0}".format(e.msg)) pass return parsed
when I call the function with these arguments: -sV -T4 -O -F
I get this exception:
Exception raised while parsing scan: Wrong XML structure: cannot parse data
I see the following warning while scanning:
nmap scan failed: adjust_timeouts2: packet supposedly had rtt of -69799 microseconds. Ignoring time. adjust_timeouts2: packet supposedly had rtt of -66058 microseconds. Ignoring time.
The scan works using normal nmap command with the same arguments. Any suggestions to fix this?
After more research into this issue, I found that Ubuntu's default package is old. I installed the latest version from https://nmap.org/download.html, ran the same scans and it seems to have resolved the issue.
Hi,
I have this function in my code:
when I call the function with these arguments: -sV -T4 -O -F
I get this exception:
I see the following warning while scanning:
The scan works using normal nmap command with the same arguments. Any suggestions to fix this?