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
dmiller
14c40b6281
Handle AppleTalk devices
...
Fixed a bug that prevented Nmap from finding any interfaces when one
of them had the type ARP_HDR_APPLETALK; this was the case for
AppleTalk interfaces. However, This support is not complete
since AppleTalk interfaces use different size hardware addresses
than Ethernet. Nmap IP level scans should work without any problem,
please refer to the '--send-ip' switch and to the following thread:
http://seclists.org/nmap-dev/2013/q1/214
This bug was reported by Steven Gregory Johnson on IRC.
2013-02-14 23:32:52 +00:00
david
ce51d8c4da
Use the default value of MultiThreadedDLL where possible.
2013-02-09 20:30:01 +00:00
david
6b095f42d2
Use MultiThreadedDebugDLL (/MDd) in place of MultiThreadedDebug (/MTd).
...
This is to match r8507, which did the analogous thing for the Release
configuration.
http://seclists.org/nmap-dev/2013/q1/120
2013-02-09 20:29:55 +00:00
david
f55171a088
Add metric to struct route_entry.
...
Actually getting a nonzero value for the metric is supported only on
Linux and Windows.
2013-02-01 05:01:56 +00:00
david
5fd515b039
Get rid of ntohs in ip6_ntop.
...
Byte-swapping is handled by the initial loop that reads into an array of
16-bit integers. That initial loop was added by me in r29708.
2013-01-30 08:47:24 +00:00
david
e7a4a8a364
Set sa.sndd_8022_ethertype to 0 in eth-ndd.c.
...
This file is used for Ethernet handles on AIX. We had a report from
Peter O'Gorman that setting this member to 0 rather than ETH_TYPE_IP was
necessary to avoid an EEXIST error on bind.
http://seclists.org/nmap-dev/2011/q4/349
http://seclists.org/nmap-dev/2011/q4/353
http://seclists.org/nmap-dev/2011/q4/att-353/aix.patch
https://code.google.com/p/libdnet/issues/detail?id=23
However Ben Lentz more recently tried the patch and said that he still
got an EEXIST on bind.
http://seclists.org/nmap-dev/2012/q4/327
http://seclists.org/nmap-dev/2012/q4/395
So who knows what the right thing to do here is. The messages from IBM
seem to say that setting ETH_TYPE_IP is definitely wrong though.
2012-12-08 11:04:23 +00:00
david
f602ead419
Check some libdnet mallocs for failure.
...
Patch based on one by Bill Parker.
http://seclists.org/nmap-dev/2012/q4/261
2012-11-22 00:50:18 +00:00
david
11b76a55e2
Route tables rework to libdnet-stripped/NMAP_MODIFICATIONS.
2012-09-30 00:01:20 +00:00
david
049208898b
Set intf_name in route-bsd.c, the parts used by OS X.
...
There are some other #ifdefs that are used on other platforms, in which
code intf_name might nto be set but will continue to be an empty string
as before.
2012-09-30 00:01:17 +00:00
david
0ed5d26bc3
Set intf_name in route-win32.c.
2012-09-30 00:01:16 +00:00
david
98aa8fbe80
Set intf_name in route-linux.c.
2012-09-30 00:01:12 +00:00
david
5bbe36af7a
Add intf_name to the route_entry struct.
...
This is set to an empty string in all functions yielding routes,
particularly route_loop. The code to get the interface pertaining to a
route is different on different platforms, so must be added one by one.
The code setting the intf_name to an empty string is only tested on
Linux.
2012-09-30 00:01:10 +00:00
david
bfea61a51e
Put the sscanf count check right after the call to sscanf.
2012-09-27 03:10:28 +00:00
david
06dcb1c138
Check ipv6 route flags and sscanf count as well.
2012-09-27 03:06:22 +00:00
david
95b634d28c
We are reading 11, not 10, fields from /proc/net/route.
2012-09-27 02:58:27 +00:00
david
645e0d213f
We can only read n - 1 bytes of interface name; sscanf doesn't include
...
the terminator.
Noticed by Djalal.
2012-09-27 02:58:26 +00:00
djalal
af495cdc49
Fixed a bug that prevented Nmap from finding any interfaces when one
...
of them had the type ARPHDR_INFINIBAND; this was the case for
IP-over-InfiniBand interfaces. However, This support is not complete
since IPoIB interfaces use 20 bytes for the hardware address, and
currently we only report and handle 6 bytes.
Nmap IP level scans should work without any problem, please refer to
the '--send-ip' switch and to the following thread:
http://seclists.org/nmap-dev/2012/q3/642
This bug was reported by starlight.2012q3.
2012-09-26 09:24:00 +00:00