mirror of
https://github.com/nmap/nmap.git
synced 2025-12-29 02:49:01 +00:00
Don't try to get a list of devices just to confirm Packet.dll was found.
This commit is contained in:
@@ -81,7 +81,6 @@ extern NmapOps o;
|
||||
|
||||
/* internal functions */
|
||||
static void win_cleanup(void);
|
||||
static char pcaplist[4096];
|
||||
|
||||
/* The code that has no preconditions to being called, so it can be
|
||||
executed before even Nmap options parsing (so o.debugging and the
|
||||
@@ -217,7 +216,7 @@ void win_init()
|
||||
__try
|
||||
#endif
|
||||
{
|
||||
ULONG len = sizeof(pcaplist);
|
||||
char *pcap_ver = NULL;
|
||||
|
||||
o.have_pcap = true;
|
||||
if(o.debugging > 2) printf("Trying to initialize Windows pcap engine\n");
|
||||
@@ -236,7 +235,9 @@ void win_init()
|
||||
|
||||
init_npcap_dll_path();
|
||||
|
||||
PacketGetAdapterNames(pcaplist, &len);
|
||||
pcap_ver = PacketGetLibraryVersion();
|
||||
if (o.debugging)
|
||||
printf("Packet.dll present, library version %s\n", pcap_ver);
|
||||
|
||||
#ifdef _MSC_VER
|
||||
if(FAILED(__HrLoadAllImportsForDll("wpcap.dll")))
|
||||
|
||||
@@ -79,7 +79,6 @@ extern NpingOps o;
|
||||
|
||||
/* internal functions */
|
||||
static void win_cleanup(void);
|
||||
static char pcaplist[4096];
|
||||
|
||||
/* The code that has no preconditions to being called, so it can be
|
||||
executed before even Nping options parsing (so o.getDebugging() and the
|
||||
@@ -215,7 +214,7 @@ void win_init()
|
||||
__try
|
||||
#endif
|
||||
{
|
||||
ULONG len = sizeof(pcaplist);
|
||||
char *pcap_ver = NULL;
|
||||
|
||||
if(o.getDebugging() >= DBG_2) printf("Trying to initialize Windows pcap engine\n");
|
||||
|
||||
@@ -233,7 +232,9 @@ void win_init()
|
||||
|
||||
init_npcap_dll_path();
|
||||
|
||||
PacketGetAdapterNames(pcaplist, &len);
|
||||
pcap_ver = PacketGetLibraryVersion();
|
||||
if (o.getDebugging() >= DBG_1)
|
||||
printf("Packet.dll present, library version %s\n", pcap_ver);
|
||||
|
||||
#ifdef _MSC_VER
|
||||
if(FAILED(__HrLoadAllImportsForDll("wpcap.dll")))
|
||||
|
||||
Reference in New Issue
Block a user