Ullaakut / nmap

Idiomatic nmap library for go developers
MIT License
922 stars 102 forks source link

what’s wrong? #50

Closed wuruipeng404 closed 4 years ago

wuruipeng404 commented 4 years ago

image

Ullaakut commented 4 years ago

Hi @357711589, thanks for reporting this issue, I'll look into it when I have some time :) unable to parse nmap output should not happen, so it might be due to your version of nmap, I need to check on my side if I get the same result when running the same command.

wuruipeng404 commented 4 years ago

Hi @357711589, thanks for reporting this issue, I'll look into it when I have some time :) unable to parse nmap output should not happen, so it might be due to your version of nmap, I need to check on my side if I get the same result when running the same command.

nmap version is 7.80 macOS version also the latest version

This error sometimes occurs, sometimes not。 So it makes me very confused

Ullaakut commented 4 years ago

Hi @357711589 !

Using the same nmap version you did, on MacOS, I was able to reproduce this issue:

$> /usr/local/bin/nmap baidu.com -T3 --max-retries 2 --version-intensity 7 --max-rtt-timeout 3600000ms -p 1-700 --max-parallelism 20 -oX -

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE nmaprun>
<?xml-stylesheet href="file:///usr/local/bin/../share/nmap/nmap.xsl" type="text/xsl"?>
<!-- Nmap 7.80 scan initiated Sat Sep 19 13:21:17 2020 as: /usr/local/bin/nmap -T3 -&#45;max-retries 2 -&#45;version-intensity 7 -&#45;max-rtt-timeout 3600000ms -p 1-700 -&#45;max-parallelism 20 -oX - baidu.com -->
<nmaprun scanner="nmap" args="/usr/local/bin/nmap -T3 -&#45;max-retries 2 -&#45;version-intensity 7 -&#45;max-rtt-timeout 3600000ms -p 1-700 -&#45;max-parallelism 20 -oX - baidu.com" start="1600514477" startstr="Sat Sep 19 13:21:17 2020" version="7.80" xmloutputversion="1.04">
<scaninfo type="connect" protocol="tcp" numservices="700" services="1-700"/>
<verbose level="0"/>
<debugging level="0"/>

Assertion failed: (bmin <= bmax), function box, file ./utils.h, line 163.
fish: '/usr/local/bin/nmap baidu.com -…' terminated by signal SIGABRT (Abort)

It seems like it's a bug with nmap, where it attempts to make an assertion and aborts the execution because it is not met.

In the meantime, I'm not sure what to do besides to try to tweak the parameters until you find something that does not trigger this bug. Also, don't hesitate to report it to the nmap issue tracker.

(as you can see, there have been other similar issues in the past: https://github.com/nmap/nmap/issues?q=assertion+failed)

wuruipeng404 commented 4 years ago

Hi @357711589 !

Using the same nmap version you did, on MacOS, I was able to reproduce this issue:

$> /usr/local/bin/nmap baidu.com -T3 --max-retries 2 --version-intensity 7 --max-rtt-timeout 3600000ms -p 1-700 --max-parallelism 20 -oX -

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE nmaprun>
<?xml-stylesheet href="file:///usr/local/bin/../share/nmap/nmap.xsl" type="text/xsl"?>
<!-- Nmap 7.80 scan initiated Sat Sep 19 13:21:17 2020 as: /usr/local/bin/nmap -T3 -&#45;max-retries 2 -&#45;version-intensity 7 -&#45;max-rtt-timeout 3600000ms -p 1-700 -&#45;max-parallelism 20 -oX - baidu.com -->
<nmaprun scanner="nmap" args="/usr/local/bin/nmap -T3 -&#45;max-retries 2 -&#45;version-intensity 7 -&#45;max-rtt-timeout 3600000ms -p 1-700 -&#45;max-parallelism 20 -oX - baidu.com" start="1600514477" startstr="Sat Sep 19 13:21:17 2020" version="7.80" xmloutputversion="1.04">
<scaninfo type="connect" protocol="tcp" numservices="700" services="1-700"/>
<verbose level="0"/>
<debugging level="0"/>

Assertion failed: (bmin <= bmax), function box, file ./utils.h, line 163.
fish: '/usr/local/bin/nmap baidu.com -…' terminated by signal SIGABRT (Abort)

It seems like it's a bug with nmap, where it attempts to make an assertion and aborts the execution because it is not met.

In the meantime, I'm not sure what to do besides to try to tweak the parameters until you find something that does not trigger this bug. Also, don't hesitate to report it to the nmap issue tracker.

(as you can see, there have been other similar issues in the past: https://github.com/nmap/nmap/issues?q=assertion+failed)

OK, thanks a lot.

Ullaakut commented 4 years ago

Closing this here, then