Home page logo
/

nmap-dev logo Nmap Development mailing list archives

Fix for WinPcap 3.1
From: "Gisle Vanem" <giva () bgnett no>
Date: Sat, 21 Feb 2004 12:08:08 +0100

With the new WinPcap 3.1 beta, nmap has stopped working.
This is really the fault of the 'Italian mob' since the adapter names are now
returned as ASCII even under Win-NT+. Here's an easy patch:

--- winip.c.orig        Sun Apr 20 04:26:26 2003
+++ winip.c     Sat Feb 21 12:02:32 2004
@@ -382,22 +382,25 @@
        if(pcap_avail)
        {
                if(wo.trace) printf("***WinIP***  reading winpcap interface list\n");
-               if(ver.dwPlatformId == VER_PLATFORM_WIN32_NT)
+
+               if(ver.dwPlatformId == VER_PLATFORM_WIN32_NT && pcaplist[1] == '\0')
                {
-                       //      NT version
+                       //      NT version or WinPcap using Unicode names
                        WCHAR *a = (WCHAR*)pcaplist;
                        while(*a)
                        {
+                               if (wo.trace) printf("***WinIP***  init %S (Unicode)\n", a);
                                winip_init_pcap((char*)a);
                                a += wcslen(a) + 1;
                        }
                }
                else
                {
-                       //      9x/Me version
+                       //      9x/Me version or WinPcap 3.1 using ASCII names
                        char *a = pcaplist;
                        while(*a)
                        {
+                               if (wo.trace) printf("***WinIP***  init %s (ASCII)\n", a);
                                winip_init_pcap(a);
                                a += strlen(a) + 1;
                        }

Gisle V.

# rm /bin/laden 
/bin/laden: Not found


---------------------------------------------------------------------
For help using this (nmap-dev) mailing list, send a blank email to 
nmap-dev-help () insecure org . List archive: http://seclists.org



  By Date           By Thread  

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