Nmap Development mailing list archives

Re: BUG: resume for Host without open ports and failed reverse DNS lookup fails


From: David Fifield <david () bamsoftware com>
Date: Fri, 26 Feb 2010 16:48:54 -0700

On Wed, Jan 13, 2010 at 01:39:13AM +0100, Till Maas wrote:
I noticed that --resume fails if the last scanned host produces a log
line like:

All 1000 scanned ports on 127.0.0.1 are filtered (501) or closed (499)

Then nmap tries to use (501) as an IP-address, which fails. The problem
is, that the resume ip algorithm assumes that the reverse DNS lookup
worked, then the line would look like:

All 1000 scanned ports on localhost (127.0.0.1) are filtered (501) or closed (499)

The buggy code is in nmap.cc:
2081     if (strncmp(q, " scanned ports on", 17) == 0)
2082       found = q;
2083       }
2084     }
2085
2086     if (found) {
2087       found = strchr(found, '(');
2088       if (!found) fatal("Unable to parse supposed log file %s.
Sorry", fname);
2089       found++;
2090       q = strchr(found, ')');

I might come up with a patch some other day, but since I am not an expert in C,
maybe you can.

Thanks. I looked at the resume code and it's kind of tricky. If you some
up with a patch we'd appreciate seeing it.

David Fifield
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


Current thread: