Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong XML structure error when using arg: -sV -T4 -O -F #86

Closed
adnanmig opened this issue Dec 8, 2017 · 1 comment
Closed

Wrong XML structure error when using arg: -sV -T4 -O -F #86

adnanmig opened this issue Dec 8, 2017 · 1 comment

Comments

@adnanmig
Copy link

adnanmig commented Dec 8, 2017

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?

@adnanmig
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants