Home page logo

nmap-dev logo Nmap Development mailing list archives

Re: Scans failing on Win32 - failures differ depending on args len(maybe)
From: jah <jah () zadkiel plus com>
Date: Tue, 11 Oct 2011 17:24:58 +0100

On 11/10/2011 02:39, David Fifield wrote:
On Fri, Oct 07, 2011 at 03:26:07PM +0100, jah wrote:
On 07/10/2011 14:52, Gisle Vanem wrote:
DEV  (SHORT) IP/MASK                     TYPE        UP   MTU  MAC
eth0 (eth0)             ethernet    up   1500 00:19:21:3D:3F:CE
eth0 (eth0)  fe80::219:21ff:fe3d:3fce/64 ethernet    up   1500 00:19:21:3D:3F:CE
You can try to add "-e eth0 --privileged" to the command-line.
See the 'o.isr00t' stuff in mswin32/winfix.cc. Or disable the
__HrLoadAllImportsForDll() sillyness therein.
These results differ based on the position of
"-e eth0 --privileged" in the args list:

nmap -F -v -v -d -n
MS-DOS - FAIL - route_dst_generic: Failed to obtain system routes:
                getsysroutes_dnet: sysroutes_dnet_find_interfaces()

nmap -F -v -v -d -n -e eth0 --privileged
MS-DOS - FAIL - pcap_open_live(eth0, 256, 0, 2) FAILED.
                Reported error: Error opening adapter:
                The system cannot find the device specified. (20).
                Will wait 5 seconds then retry.
                ... Call to pcap_open_live() failed three times...

nmap -e eth0 --privileged -F -v -v -d -n

I bet there's a really simple explanation and I'm just not seeing the
wood for the trees.
That's a good clue. This may be a long shot, but please try this patch.
It defers calling win_init until option processing is finished,
including the options that have to wait to be processed until after the
whole command line has been seen.

The delayed option processing is a new thing added by Shinnok this
summer, which would explain why we haven't seen this error before.

David Fifield

Thanks David,

After applying your patch to the original source (not modified by the patch
I submitted), all of the failing scans now complete successfully.

I'm still looking into why the addition of a single '-v' to the
arguments '-F -v -d -n' made a difference to the
number of times _refresh_tables was called before a call to
getAdapterAddresses returned ERROR_INVALID_PARAMETER.

Do you have any thoughts on what might be happening?


Sent through the nmap-dev mailing list
Archived at http://seclists.org/nmap-dev/

  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]