1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-07 21:21:31 +00:00
Commit Graph

177 Commits

Author SHA1 Message Date
dmiller
bc3f8ee141 Fix compile errors on Windows 2023-02-10 22:51:52 +00:00
dmiller
ba707b1ac6 Enable IPv6 neighbor cache lookups for Windows 2023-02-08 23:21:27 +00:00
dmiller
79cd3db24c Fix arp cache lookup for Windows: avoid MIB_IPNET_TYPE_INVALID 2023-02-08 22:01:36 +00:00
dmiller
caf1e5d299 Don't label non-Eth-like interfaces as Ethernet. See #2381 2023-01-30 21:45:55 +00:00
dmiller
2708a5b399 Avoid realloc leak 2022-08-29 17:11:27 +00:00
dmiller
10c4479b2d Fix #2416: listing interfaces on IPv6-only Linux. 2022-07-05 16:20:17 +00:00
nnposter
db39ee0518 Add missing includes to route.h test for FreeBSD. Fixes #2379 2022-04-20 17:09:55 +00:00
dmiller
2181443b63 Address a few code analysis warnings: uninitialized vars and undefined behavior 2021-08-06 16:17:46 +00:00
dmiller
1820469f5a Bump supported Windows to Win7 (drop Vista) and update a deprecated API 2021-07-29 21:09:44 +00:00
dmiller
9b36c5b2b8 libdnet: Remove call to FreeLibrary after GetModuleHandle.
Per Windows API docs: "do not pass a handle returned by GetModuleHandle
to the FreeLibrary function. Doing so can cause a DLL module to be
unmapped prematurely."
2021-07-23 16:50:12 +00:00
dmiller
95d98fe6ae Linker optimizations for all projects (Windows) 2021-07-22 17:19:53 +00:00
dmiller
5707fb14c5 Upgrade to VS 2019 2021-07-19 23:58:02 +00:00
nnposter
004c8627c1 Do not override snprintf in VS 2015 and newer
MSVC preprocessor triggers #error in <stdio.h> if redefined

From MS doc:
Beginning with the UCRT in Visual Studio 2015 and Windows 10, snprintf is
no longer identical to _snprintf. The snprintf function behavior is now C99
standard compliant.

Closes #2255
2021-04-16 02:33:39 +00:00
dmiller
a5cca6f6a3 Remove replacement strlcat (unused) from libdnet-stripped 2020-10-13 20:13:38 +00:00
dmiller
e61f145425 Make strlcpy signature match declaration in libdnet-stripped. See #2150 2020-10-13 20:13:37 +00:00
dmiller
cbe650092c Fix loopback detection on Windows with new Npcap 2020-09-03 20:14:00 +00:00
dmiller
8d59507aad Support Npcap 0.9983's new loopback behavior 2019-09-03 19:13:14 +00:00
dmiller
d8c1d935f1 Move Npcap headers and lib stuff to nmap-mswin32-aux 2018-10-18 03:28:39 +00:00
dmiller
30db709755 Optimistically revert mutex that was needed with WinPcap. Npcap likely is unaffected. 2018-10-03 16:57:54 +00:00
dmiller
626f10aca0 libdnet: Keep result of pcap_findalldevs around to avoid re-calling frequently 2018-09-18 04:21:18 +00:00
dmiller
d8bcee17bd Get LoopbackAdapter name from service reg key instead of software reg key 2018-08-21 18:21:06 +00:00
dmiller
36a6d897a5 Use correct width in sscanf. Fixes #1156 2018-03-22 16:31:32 +00:00
dmiller
571cd2d903 Move non-config definitions to the file where they are used. Closes #1013 2017-09-19 17:01:38 +00:00
dmiller
4c3450ce05 Fix route detection on FreeBSD. 2017-08-02 18:48:27 +00:00
dmiller
2f104650a8 Detect SNMP MIB2 STREAMS on Solaris even if /dev/ip is not present. 2017-02-13 19:46:23 +00:00
yang
c238ef3df4 Fix MSVC 2010's compilation warning on DLT_NULL_HEADER pointer assignment (https://github.com/nmap/nmap/issues/563) 2016-10-06 03:40:29 +00:00
dmiller
d5f7d5c45b Permit sending on DLT_NULL devices on Windows 2016-08-14 12:29:50 +00:00
dmiller
af13cef717 Upgrade to Npcap 0.08 (libpcap 1.8.0 headers for Windows) 2016-08-13 20:04:05 +00:00
dmiller
b8fb5be8a1 Sanity check on IPv6 addresses: they must be 128 bits or less 2016-07-30 03:54:01 +00:00
dmiller
85dd7e6ac1 Fix a potential buffer overrun due to sscanf using the wrong field width 2016-07-27 20:11:27 +00:00
vincent
900f015726 Silencing sizeof() warning
Here, the sizeof() function return the size of 'char *' instead of 
INTF_NAME_LEN. I replaced the use of the latter function by INTF_NAME_LEN 
(maximum size of the array intf_name). Here is the compiler warning output:

route-bsd.c:171:38: warning: sizeof on array function parameter will return 
size of 'char *' instead of 'char [16]' [-Wsizeof-array-argument] 
strlcpy(intf_name, namebuf, sizeof(intf_name));
2016-07-01 11:27:37 +00:00
dmiller
abfcd7ba71 Update Npcap's loopback adapter registry key name, changed in Npcap 0.07-r7 2016-06-15 02:21:28 +00:00
dmiller
67fd101b01 Enable Nmap, Nping to use Npcap over Winpcap if available. 2016-06-14 14:16:46 +00:00
dmiller
50054e6ed7 Update platform toolset to remove XP compatibility 2016-06-04 02:46:11 +00:00
dmiller
423c8380ef Fix network prefix length on Windows. http://seclists.org/nmap-dev/2016/q2/101 2016-05-11 02:23:21 +00:00
dmiller
312cff5ac5 Fix 'INTERFACES: NONE FOUND' for real. See also: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=821913 2016-04-25 05:20:56 +00:00
dmiller
0d44a381b1 Fix netmask handling on FreeBSD. Fixes #284 2016-01-26 04:52:28 +00:00
dmiller
37d517b32e Use XP compatibility SDK, because users are complaining 2015-11-10 16:47:35 +00:00
dmiller
54bd372ccf CHANGELOG and mod patches for mutex change 2015-09-20 19:06:12 +00:00
dmiller
3d9e348832 Use a mutex on Windows to avoid a hang when accessing WinPCAP driver
Reported by multiple users on Windows 8.1 and Windows Server 2012 R2.
Seems to hang when the WinPCAP driver is accessed via OpenServiceA by
multiple processes at once. Users report that this change, which uses a
mutex to avoid concurrent access, fixes the hang.
2015-09-20 19:06:11 +00:00
dmiller
0f602cbd38 Fix address detection on Solaris. Fixes #124 2015-05-23 13:22:29 +00:00
dmiller
ee1156eb51 Fix a NULL pointer dereference in libdnet-stripped
Reported and diagnosed by Gisle Vanem.

Fixes #70
2015-03-05 22:09:49 +00:00
dmiller
a86b679404 Fix WinPcap crash on pcap_findalldevs error
See http://seclists.org/nmap-dev/2015/q1/176

Fixes #15
2015-02-12 16:52:02 +00:00
dmiller
17a5e77e0a Add ARP_HRD_IEEE80211_PRISM identifier 2015-01-27 02:31:11 +00:00
dmiller
0952bed032 Merge final changes to support VS2013 build
Changes:

* Fix a collision of the name PS_NONE with a different constant in shlobj.h
* Update solution and project files for VS2013
* Update the NSIS installer to reference the VC 2013 redistributable
2015-01-17 04:35:01 +00:00
dmiller
c22c1119e9 Note last commit in libdnet/NMAP_MODIFICATIONS 2014-09-09 21:19:09 +00:00
dmiller
73275cc872 dnet: Fix hw address getting on AIX 2014-09-09 21:19:08 +00:00
dmiller
48dfb446d2 Only use RT_ROUNDUP on NetBSD
AIX's version breaks things: http://seclists.org/nmap-dev/2014/q3/405
2014-09-08 20:50:51 +00:00
david
02cb2931aa Fix rt_msghdr padding on NetBSD.
NetBSD uses a fixed 64-bit padding, unlike OS X (32-bit), and unlike
other platforms (sizeof(unsigned long)). There is an RT_ROUNDUP macro
that does the right alignment; use that when available.

http://ftp.netbsd.org/pub/NetBSD/NetBSD-current/src/lib/libc/net/getifaddrs.c
http://fxr.watson.org/fxr/source/net/route.h?v=NETBSD#L270

Rounding to 4 bytes was breaking with IPv6 addresses, which are 28
bytes. The pointer was being advanced by 28 instead of 32. Compare to
r29739, somewhat similar.

Reported by Fredrik Pettai.
http://seclists.org/nmap-dev/2013/q1/384
2013-06-01 16:28:44 +00:00
henri
4a261dd5f2 Updated libdnet to not SIOCIFNETMASK before SIOCIFADDR on OpenBSD. This was
reported to break on -current as of May 2013. [Giovanni Bechis]
2013-05-17 21:38:08 +00:00