1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-15 12:19:02 +00:00
Commit Graph

47 Commits

Author SHA1 Message Date
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
626f10aca0 libdnet: Keep result of pcap_findalldevs around to avoid re-calling frequently 2018-09-18 04:21:18 +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
17a5e77e0a Add ARP_HRD_IEEE80211_PRISM identifier 2015-01-27 02:31:11 +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
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
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
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
djalal
e017b7c290 Fixed a bug that prevented Nmap from finding any interfaces when one
of them had the type ARPHDR_IEEE80211; this was the case for wireless
interfaces operating in access point mode. This bug was reported by
Sebastiaan Vileijn.

http://seclists.org/nmap-dev/2012/q3/986
2012-09-26 08:49:22 +00:00
david
48ff61a710 Handle ARPHRD_VOID in addr_ston.
This type is used by OpenVZ venet interfaces. We "handle" such an
address type just by blanking the MAC address field.

Lack of support for this type of interface was preventing Nmap from
working on certain systems.

http://seclists.org/nmap-dev/2012/q2/763

An earlier message about this same type of interface is

http://seclists.org/nmap-dev/2009/q3/303
2012-07-21 07:35:41 +00:00
djalal
8e7edbd008 o Fixed a bug that caused Nmap to fail to find any network interface when
at least one of them is in the monitor mode. The fix was to define the
  ARP_HRD_IEEE80211_RADIOTAP 802.11 radiotap header identifier in the
  libdnet-stripped code. Network interfaces that are in this mode are used
  by radiotap for 802.11 frame injection and reception. The bug was
  reported by Tom Eichstaedt and Henri Doreau.
  http://seclists.org/nmap-dev/2012/q2/449
  http://seclists.org/nmap-dev/2012/q2/478
  [Djalal Harouni, Henri Doreau]
2012-06-02 19:35:08 +00:00
david
31f12a071c Check for <netinet/in6_var.h>.
This contains the SIOCGIFNETMASK6 ioctl definition on AIX.
2011-09-28 06:55:47 +00:00
david
0bce585dec Use getkerninfo to get routing information on AIX. 2011-09-21 07:31:34 +00:00
david
4f454a29d2 Add the intf_entry.intf_index member.
This is the operating system's interface index, as used by
if_indextoname and sockaddr_sin6.sin6_scope_id.
2011-08-30 23:55:07 +00:00
david
12f4742f0f Add intf_get_index to libdnet-stripped.
This function gets an interface from an internal interface number, such
as a sockaddr_in6.sin6_scope_id.
2011-08-30 17:01:50 +00:00
weilin
1dcf652410 Added ND ping for local IPv6 nets, merging from /nmap-exp/weilin/nmap-nd. 2011-07-19 02:31:54 +00:00
david
5f8b19c700 Add ICMPv6 Parameter Problem defines. 2011-06-14 19:46:49 +00:00
david
4aa4a154f9 Merge from /nmap-exp/david/nmap-ipv6.
This is raw IPv6 packet support for most port and ping scans, Neighbor
Discovery, and traceroute.
2011-06-08 01:24:48 +00:00
david
33f3645ecd Don't define HAVE_SYS_SOCKET_H in dnet_winconfig.h. That it was wrongly
defined was noticed by Gisle Vanem. It makes no difference because this
macro isn't used in any source files for Windows (or any platform).
2010-11-29 20:30:52 +00:00
david
6112cb9a43 Fix bugs in ip6_pack_hdr so that the traffic class and flow label are
set correctly.

1. Shift the low-order bits of fc by 20 bits, not 28, because fl is a
   20-bit field.
2. Use a mask in host byte order to mask fl, which is also provided in
   host byte order.
3. Swap | and & in combining fc and fl.
2010-10-07 21:51:28 +00:00
david
a2b84bf74f o Changed the name of libdnet's sctp_chunkhdr to avoid a conflict with
a struct of the same name in <netinet/sctp.h>. This caused a
  compiliation error when Nmap was compiled with an OpenSSL that had
  SCTP support. [Olli Hauer, Daniel Roethlisberger]
2010-09-05 03:40:31 +00:00
david
48c6e7b820 Move the body of eth_get_pcap_devname back into intf_get_pcap_devname, leaving
eth_get_pcap_devname as a wrapper.

In addition to the hardware address check, add a check of the textual interface
descriptions in order better to distinguish interfaces. It appears to me that
the pcap description (pdev->description) is the same as what is returned by a
call to PacketRequest with an OID of OID_GEN_FRIENDLY_NAME, so that's what I'm
comparing. That differs from OID_GEN_VENDOR_NAME, which is what you get in
ifrow.bDescr from GetIfTable.

We've found that simply comparing hardware addresses is not enough when using
Windows "teamed" (link-aggregated) interfaces. In a simple example, two NICs
are teamed together, leading to three interfaces visible to libdnet: the two
physical NICs and the virtual teamed interface. All three of these have the
same MAC address. What was happening was the eth0 interface was being assigned
to one of the physical NICs, packets were sent over it, but the replies were
not necessarily coming back to the same physical NIC.
2010-05-13 04:06:53 +00:00
david
e8fdd394e6 Add semicolons to the socklen_t typedefs, thanks again to Michael
Pattrick.
2010-01-14 06:04:17 +00:00
david
53c3d44b9a Fix the socklen_t typedef in libdnet-stripped. It was
typedef socklen_t int;

Michael Pattrick pointed out that it should be

typedef int socket_t;
2010-01-14 03:34:11 +00:00
david
41dadaedb7 Use socklen_t as the type in arguments to getsockname and getsockopt to
avoid a "pointer targets differ in signedness" warning. Add a check for
socklen_t in configure.in; if it's not present, typedef it to int.
2009-08-07 00:11:57 +00:00
david
36c672cdd7 autoreconf with Autoconf 2.63, Automake 1.10.1, and libtool 2.2.6. 2009-08-06 22:00:34 +00:00
daniel
f2f66722d8 Making struct packing explicit for sctp.h too. 2009-07-05 21:02:43 +00:00
daniel
50830f7488 o Added initial SCTP port scanning support to Nmap. SCTP is
a layer 4 protocol used mostly for telephony related applications.
  This brings the following new features:
  o SCTP INIT chunk port scan (-sY): open ports return an INIT-ACK
    chunk, closed ones an ABORT chunk.  This is the SCTP equivalent
    of a TCP SYN stealth scan.
  o SCTP COOKIE-ECHO chunk port scan (-sZ): open ports are silent,
    closed ports return an ABORT chunk.
  o SCTP INIT chunk ping probes (-PY): host discovery using SCTP
    INIT chunk packets.
  o SCTP-specific IP protocol scan (-sO -p sctp).
  o SCTP-specific traceroute support (--traceroute).
  o The ability to use the deprecated Adler32 algorithm as specified
    in RFC 2960 instead of CRC32C from RFC 4960 (--adler32).
  o 42 well-known SCTP ports were added to the nmap-services file.
  Part of the work on SCTP support was kindly sponsored by
  Compass Security AG, Switzerland.  [Daniel Roethlisberger]
2009-06-03 23:15:45 +00:00
david
b4243e23f2 Fix all the compiler warnings when building with Visual C++ 2008. 2009-04-29 17:56:30 +00:00
kris
d23556c513 Upgrading shipped libdnet to 1.12 2008-09-19 06:12:25 +00:00
david
ba27a7308c Copy libdnet-stripped/include/dnet/os.h from libdnet 1.12. This avoids a
duplicate typedef of ssize_t.
2008-08-29 20:23:56 +00:00
david
09cc37f7f0 Rename intf_get_pcap_devname to eth_get_pcap_devname to reflect its new home. 2008-06-20 20:44:54 +00:00
kris
44f6087b94 Merging changes from my vc2008-testing branch. This moves Windows development
to VC++2008.
2008-06-13 05:58:11 +00:00
david
dfb9c157c7 Delete auxiliary scripts config.guess, config.sub, depcomp, install-sh,
ltmain.sh, and missing from subdirectories. Autoconf automatically looks
in the parent directory for these files. I had to copy the files
depcomp, ltmain.sh, and missing into the root of the source tree.
2007-11-27 06:22:46 +00:00
fyodor
3d9ccee8ff I think I'm done with pcap upgrade and doug's pcap selectable_fd patch 2006-08-17 00:23:03 +00:00
fyodor
5a9fea3b39 portability fixes, fixed UDP phantom port bug, fixed --version-intensity crash, changed mass_dns to give warning rather than error if cannot find dns servers 2006-06-10 21:23:27 +00:00
fyodor
0b33f41633 About to do Nmap 4.03 2006-04-22 23:00:09 +00:00
fyodor
87e4e19e02 bug fixing 2005-08-24 19:22:11 +00:00
fyodor
02397959b3 removed winip lib 2005-08-10 04:16:18 +00:00
fyodor
bdf2caa2a4 vcproj for nmap 2005-08-08 05:48:49 +00:00
fyodor
68aaae4a0c removed some generated files that really never should have been checked in 2005-07-27 02:47:33 +00:00
fyodor
aafb4a0a82 Arp sp00fing c0de 2005-07-26 06:26:00 +00:00
fyodor
db7794d596 Mostly seems to be working on Solaris, though I am having some problems with libpcap not timing out 2005-07-23 04:05:31 +00:00
fyodor
2b834d90d2 Have it compiling on Solaris, and soon should have it working. Bwahahahahahahaha 2005-07-22 10:08:53 +00:00
fyodor
4d2beed7c3 libdnet stripped and integrated, ARP ping scan starting to work pretty well 2005-04-30 05:12:29 +00:00