Reintegrate Nmap 7.99 release branch

This commit is contained in:
dmiller 2026-03-27 13:52:02 +00:00
parent b9b2016bf8
commit deb076224e
34 changed files with 2893 additions and 2447 deletions

View file

@ -1,8 +1,51 @@
#Nmap Changelog ($Id$); -*-text-*- #Nmap Changelog ($Id$); -*-text-*-
Nmap 7.99 [2026-03-24]
o Integrated many of the most-frequently-submitted IPv4 and IPv6 OS
fingerprints, as well as dozens of updated service fingerprints.
o Upgraded included libraries: OpenSSL 3.0.19, libpcap 1.10.6, libpcre2 10.47,
liblinear 2.50, zlib 1.3.2
o [Windows] Upgraded the included version of Npcap from 1.83 to 1.87, resolving
several crashes and stability-related issues. See https://npcap.com/changelog
o [Zenmap][GH#3182] Zenmap is now distributed as a universal wheel
(zenmap-7.99-py3-none-any.whl) instead of an RPM package so that it can be
installed on any system with Python 3. [Daniel Miller]
o [Ncat][Windows] Limited the number of handles inherited by subprocesses
launched with -e, preventing interference between clients when -e and
--keep-open are used. Reported by Nimish Verma.
o [Ncat] Several fixes for regressions or longstanding failure cases in
ncat-test.pl [Daniel Miller]:
+ [Windows] Fixed handling of socket EOF with --exec
+ Fixed the -i (idle timeout) option for listen mode, which was broken
when adding the -q option in Ncat 7.96
+ Fixed HTTP proxy server when SSL is used.
+ DTLS (SSL over UDP) shutdown connection on stdin EOF.
o [Windows][GH#2711] Nmap now supports scanning over various VPN virtual
adapters like OpenVPN TAP adapters. [Daniel Miller]
o [GH#3280] Fix a performance regression in reverse-DNS in Nmap 7.98. The fix o [GH#3280] Fix a performance regression in reverse-DNS in Nmap 7.98. The fix
for #3130 had caused Nmap to send requests too slowly. [Daniel Miller] for #3130 had caused Nmap to send requests too slowly. [Daniel Miller]
o [macOS][GH#3289] Fixed a configure-time failure in libdnet that resulted in
incorrect MAC addresses being reported. [Daniel Miller]
o [Zenmap][GH#3189] Fix a crash in Zenmap topology and hosts viewer:
"TypeError: format requires a mapping" [Daniel Miller]
o [GH#2955] Fix a routing issue with -e and -S related to #2206
causing error "setup_target: failed to determine route" [Daniel Miller]
o [GH#3214] Improve compatibility of build process on various platforms and add o [GH#3214] Improve compatibility of build process on various platforms and add
multiplatform autobuilds in Github workflow. [Jordan Ritter] multiplatform autobuilds in Github workflow. [Jordan Ritter]

View file

@ -2,12 +2,12 @@
.\" Title: nmap .\" Title: nmap
.\" Author: [see the "Autor" section] .\" Author: [see the "Autor" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/> .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/08/2025 .\" Date: 19/03/2026
.\" Manual: Guía de referencia de Nmap .\" Manual: Guía de referencia de Nmap
.\" Source: Nmap .\" Source: Nmap
.\" Language: Spanish .\" Language: Spanish
.\" .\"
.TH "NMAP" "1" "06/08/2025" "Nmap" "Guía de referencia de Nmap" .TH "NMAP" "1" "19/03/2026" "Nmap" "Guía de referencia de Nmap"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * Define some portability stuff .\" * Define some portability stuff
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------

View file

@ -2,12 +2,12 @@
.\" Title: nmap .\" Title: nmap
.\" Author: [see the "Auteur" section] .\" Author: [see the "Auteur" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/> .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/08/2025 .\" Date: 19/03/2026
.\" Manual: Guide de référence Nmap .\" Manual: Guide de référence Nmap
.\" Source: Nmap .\" Source: Nmap
.\" Language: French .\" Language: French
.\" .\"
.TH "NMAP" "1" "06/08/2025" "Nmap" "Guide de référence Nmap" .TH "NMAP" "1" "19/03/2026" "Nmap" "Guide de référence Nmap"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * Define some portability stuff .\" * Define some portability stuff
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------

View file

@ -2,12 +2,12 @@
.\" Title: nmap .\" Title: nmap
.\" Author: [see the "Author" section] .\" Author: [see the "Author" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/> .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 04/12/2024 .\" Date: 03/19/2026
.\" Manual: Nmap vodič .\" Manual: Nmap vodič
.\" Source: Nmap .\" Source: Nmap
.\" Language: Croatian .\" Language: Croatian
.\" .\"
.TH "NMAP" "1" "04/12/2024" "Nmap" "Nmap vodič" .TH "NMAP" "1" "03/19/2026" "Nmap" "Nmap vodič"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * Define some portability stuff .\" * Define some portability stuff
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------

View file

@ -2,12 +2,12 @@
.\" Title: nmap .\" Title: nmap
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/> .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 12/04/2024 .\" Date: 19/03/2026
.\" Manual: Nmap Referencia Útmutató .\" Manual: Nmap Referencia Útmutató
.\" Source: Nmap .\" Source: Nmap
.\" Language: Hungarian .\" Language: Hungarian
.\" .\"
.TH "NMAP" "1" "12/04/2024" "Nmap" "Nmap Referencia Útmutató" .TH "NMAP" "1" "19/03/2026" "Nmap" "Nmap Referencia Útmutató"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * Define some portability stuff .\" * Define some portability stuff
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------

View file

@ -2,12 +2,12 @@
.\" Title: nmap .\" Title: nmap
.\" Author: [see the "Autore" section] .\" Author: [see the "Autore" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/> .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 12/04/2024 .\" Date: 19/03/2026
.\" Manual: Guida di riferimento di Nmap .\" Manual: Guida di riferimento di Nmap
.\" Source: Nmap .\" Source: Nmap
.\" Language: Italian .\" Language: Italian
.\" .\"
.TH "NMAP" "1" "12/04/2024" "Nmap" "Guida di riferimento di Nmap" .TH "NMAP" "1" "19/03/2026" "Nmap" "Guida di riferimento di Nmap"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * Define some portability stuff .\" * Define some portability stuff
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------

View file

@ -2,12 +2,12 @@
.\" Title: nmap .\" Title: nmap
.\" Author: [see the "Autor" section] .\" Author: [see the "Autor" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/> .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 04/12/2024 .\" Date: 03/19/2026
.\" Manual: Opis programu Nmap .\" Manual: Opis programu Nmap
.\" Source: Nmap .\" Source: Nmap
.\" Language: Polish .\" Language: Polish
.\" .\"
.TH "NMAP" "1" "04/12/2024" "Nmap" "Opis programu Nmap" .TH "NMAP" "1" "03/19/2026" "Nmap" "Opis programu Nmap"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * Define some portability stuff .\" * Define some portability stuff
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------

View file

@ -2,12 +2,12 @@
.\" Title: nmap .\" Title: nmap
.\" Author: [see the "Autor" section] .\" Author: [see the "Autor" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/> .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/08/2025 .\" Date: 19/03/2026
.\" Manual: Guia de Referência do Nmap .\" Manual: Guia de Referência do Nmap
.\" Source: Nmap .\" Source: Nmap
.\" Language: Portuguese (Brazil) .\" Language: Portuguese (Brazil)
.\" .\"
.TH "NMAP" "1" "06/08/2025" "Nmap" "Guia de Referência do Nmap" .TH "NMAP" "1" "19/03/2026" "Nmap" "Guia de Referência do Nmap"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * Define some portability stuff .\" * Define some portability stuff
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------

View file

@ -2,12 +2,12 @@
.\" Title: nmap .\" Title: nmap
.\" Author: [see the "Autor" section] .\" Author: [see the "Autor" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/> .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/08/2025 .\" Date: 19/03/2026
.\" Manual: Guia de Referência do Nmap .\" Manual: Guia de Referência do Nmap
.\" Source: Nmap .\" Source: Nmap
.\" Language: Portuguese .\" Language: Portuguese
.\" .\"
.TH "NMAP" "1" "06/08/2025" "Nmap" "Guia de Referência do Nmap" .TH "NMAP" "1" "19/03/2026" "Nmap" "Guia de Referência do Nmap"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * Define some portability stuff .\" * Define some portability stuff
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------

View file

@ -2,12 +2,12 @@
.\" Title: nmap .\" Title: nmap
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/> .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 05/17/2023 .\" Date: 03/19/2026
.\" Manual: Ghid de referinta Nmap .\" Manual: Ghid de referinta Nmap
.\" Source: Nmap .\" Source: Nmap
.\" Language: Romanian .\" Language: Romanian
.\" .\"
.TH "NMAP" "1" "05/17/2023" "Nmap" "Ghid de referinta Nmap" .TH "NMAP" "1" "03/19/2026" "Nmap" "Ghid de referinta Nmap"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * Define some portability stuff .\" * Define some portability stuff
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------

View file

@ -2,12 +2,12 @@
.\" Title: nmap .\" Title: nmap
.\" Author: [see the "Автор" section] .\" Author: [see the "Автор" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/> .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 08/06/2025 .\" Date: 03/19/2026
.\" Manual: Справочное руководство Nmap .\" Manual: Справочное руководство Nmap
.\" Source: Nmap .\" Source: Nmap
.\" Language: Russian .\" Language: Russian
.\" .\"
.TH "nmap" "1" "08/06/2025" "Nmap" "Справочное руководство Nmap" .TH "nmap" "1" "03/19/2026" "Nmap" "Справочное руководство Nmap"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * Define some portability stuff .\" * Define some portability stuff
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------

View file

@ -2,12 +2,12 @@
.\" Title: nmap .\" Title: nmap
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/> .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 12. apríla 2024 .\" Date: 19. marca 2026
.\" Manual: Nmap - Referencna prirucka .\" Manual: Nmap - Referencna prirucka
.\" Source: Nmap .\" Source: Nmap
.\" Language: Slovak .\" Language: Slovak
.\" .\"
.TH "NMAP" "1" "12. apríla 2024" "Nmap" "Nmap \- Referencna prirucka" .TH "NMAP" "1" "19. marca 2026" "Nmap" "Nmap \- Referencna prirucka"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * Define some portability stuff .\" * Define some portability stuff
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------

View file

@ -2,12 +2,12 @@
.\" Title: nmap .\" Title: nmap
.\" Author: [see the "作者" section] .\" Author: [see the "作者" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/> .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 2023-03-31 .\" Date: 2026-03-19
.\" Manual: Nmap参考指南 .\" Manual: Nmap参考指南
.\" Source: Nmap .\" Source: Nmap
.\" Language: Chinese .\" Language: Chinese
.\" .\"
.TH "NMAP" "1" "2023-03-31" "Nmap" "Nmap参考指南" .TH "NMAP" "1" "2026-03-19" "Nmap" "Nmap参考指南"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * Define some portability stuff .\" * Define some portability stuff
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------

View file

@ -2,12 +2,12 @@
.\" Title: nmap .\" Title: nmap
.\" Author: [see the "Authors" section] .\" Author: [see the "Authors" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/> .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 08/21/2025 .\" Date: 03/19/2026
.\" Manual: Nmap Reference Guide .\" Manual: Nmap Reference Guide
.\" Source: Nmap .\" Source: Nmap
.\" Language: English .\" Language: English
.\" .\"
.TH "NMAP" "1" "08/21/2025" "Nmap" "Nmap Reference Guide" .TH "NMAP" "1" "03/19/2026" "Nmap" "Nmap Reference Guide"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * Define some portability stuff .\" * Define some portability stuff
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
@ -119,7 +119,7 @@ This options summary is printed when Nmap is run with no arguments, and the late
.RS 4 .RS 4
.\} .\}
.nf .nf
Nmap 7\&.98SVN ( https://nmap\&.org ) Nmap 7\&.99 ( https://nmap\&.org )
Usage: nmap [Scan Type(s)] [Options] {target specification} Usage: nmap [Scan Type(s)] [Options] {target specification}
TARGET SPECIFICATION: TARGET SPECIFICATION:
Can pass hostnames, IP addresses, networks, etc\&. Can pass hostnames, IP addresses, networks, etc\&.
@ -1380,10 +1380,11 @@ http\-\&.
Lets you provide arguments to NSE scripts\&. Arguments are a comma\-separated list of Lets you provide arguments to NSE scripts\&. Arguments are a comma\-separated list of
name=value name=value
pairs\&. Names and values may be strings not containing whitespace or the characters \(oq{\(cq, \(oq}\(cq, \(oq=\(cq, or \(oq,\(cq\&. To include one of these characters in a string, enclose the string in single or double quotes\&. Within a quoted string, \(oq\e\(cq escapes a quote\&. A backslash is only used to escape quotation marks in this special case; in all other cases a backslash is interpreted literally\&. Values may also be tables enclosed in pairs\&. Names and values may be strings not containing whitespace or the characters \(oq{\(cq, \(oq}\(cq, \(oq=\(cq, or \(oq,\(cq\&. To include one of these characters in a string, enclose the string in single or double quotes\&. Within a quoted string, \(oq\e\(cq escapes a quote\&. A backslash is only used to escape quotation marks in this special case; in all other cases a backslash is interpreted literally\&. Values may also be tables enclosed in
{}, just as in Lua\&. A table may contain simple string values or more name\-value pairs, including nested tables\&. Many scripts qualify their arguments with the script name, as in {}, just as in Lua\&. A table may contain simple string values or more name\-value pairs, including nested tables\&. A complex example of script arguments is
xmpp\-info\&.server_name\&. You may use that full qualified version to affect just the specified script, or you may pass the unqualified version (server_name \fB\-\-script\-args \*(Aquser=foo,pass=",{}=bar",whois={whodb=nofollow+ripe},xmpp\-info\&.server_name=localhost\*(Aq\fR\&. Many scripts qualify their arguments with the script name, as in
in this case) to affect all scripts using that argument name\&. A script will first check for its fully qualified argument name (the name specified in its documentation) before it accepts an unqualified argument name\&. A complex example of script arguments is xmpp\-info\&.server_name\&. A script will first check for its fully qualified argument name (the name specified in its documentation) before it accepts an unqualified argument name (server_name
\fB\-\-script\-args \*(Aquser=foo,pass=",{}=bar",whois={whodb=nofollow+ripe},xmpp\-info\&.server_name=localhost\*(Aq\fR\&. The online NSE Documentation Portal at in this case)\&. Some arguments are not specific to one script\&. They typically effect behavior of a library and therefore potentially all the scripts that use the library\&. (One such example is
http\&.useragent, which sets the default HTTP User\-Agent header for every web request, regardless which script sends it\&.) It is not possible for the exact same argument to be given different values for diferent scripts\&. The online NSE Documentation Portal at
\m[blue]\fB\%https://nmap.org/nsedoc/\fR\m[] \m[blue]\fB\%https://nmap.org/nsedoc/\fR\m[]
lists the arguments that each script accepts\&. lists the arguments that each script accepts\&.
.RE .RE

View file

@ -1,4 +1,4 @@
Nmap 7.98SVN ( https://nmap.org ) Nmap 7.99 ( https://nmap.org )
Usage: nmap [Scan Type(s)] [Options] {target specification} Usage: nmap [Scan Type(s)] [Options] {target specification}
TARGET SPECIFICATION: TARGET SPECIFICATION:
Can pass hostnames, IP addresses, networks, etc. Can pass hostnames, IP addresses, networks, etc.

View file

@ -2,12 +2,12 @@
.\" Title: zenmap .\" Title: zenmap
.\" Author: [see the "Authors" section] .\" Author: [see the "Authors" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/> .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 08/21/2025 .\" Date: 03/19/2026
.\" Manual: Zenmap Reference Guide .\" Manual: Zenmap Reference Guide
.\" Source: Zenmap .\" Source: Zenmap
.\" Language: English .\" Language: English
.\" .\"
.TH "ZENMAP" "1" "08/21/2025" "Zenmap" "Zenmap Reference Guide" .TH "ZENMAP" "1" "03/19/2026" "Zenmap" "Zenmap Reference Guide"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * Define some portability stuff .\" * Define some portability stuff
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------

View file

@ -28,6 +28,7 @@ struct addr {
uint16_t __data16[8]; uint16_t __data16[8];
uint32_t __data32[4]; uint32_t __data32[4];
} __addr_u; } __addr_u;
uint32_t scope_id;
}; };
#define addr_eth __addr_u.__eth #define addr_eth __addr_u.__eth
#define addr_ip __addr_u.__ip #define addr_ip __addr_u.__ip

View file

@ -60,6 +60,8 @@ addr_cmp(const struct addr *a, const struct addr *b)
/* XXX */ /* XXX */
if ((i = a->addr_type - b->addr_type) != 0) if ((i = a->addr_type - b->addr_type) != 0)
return (i); return (i);
if ((i = a->scope_id - b->scope_id) != 0)
return (i);
/* XXX - 10.0.0.1 is "smaller" than 10.0.0.0/8? */ /* XXX - 10.0.0.1 is "smaller" than 10.0.0.0/8? */
if ((i = a->addr_bits - b->addr_bits) != 0) if ((i = a->addr_bits - b->addr_bits) != 0)
@ -274,6 +276,7 @@ addr_ntos(const struct addr *a, struct sockaddr *sa)
so->sin6.sin6_len = sizeof(so->sin6); so->sin6.sin6_len = sizeof(so->sin6);
#endif #endif
so->sin6.sin6_family = AF_INET6; so->sin6.sin6_family = AF_INET6;
so->sin6.sin6_scope_id = a->scope_id;
memcpy(&so->sin6.sin6_addr, &a->addr_ip6, IP6_ADDR_LEN); memcpy(&so->sin6.sin6_addr, &a->addr_ip6, IP6_ADDR_LEN);
break; break;
#endif #endif
@ -336,6 +339,7 @@ addr_ston(const struct sockaddr *sa, struct addr *a)
case AF_INET6: case AF_INET6:
a->addr_type = ADDR_TYPE_IP6; a->addr_type = ADDR_TYPE_IP6;
a->addr_bits = IP6_ADDR_BITS; a->addr_bits = IP6_ADDR_BITS;
a->scope_id = so->sin6.sin6_scope_id;
memcpy(&a->addr_ip6, &so->sin6.sin6_addr, IP6_ADDR_LEN); memcpy(&a->addr_ip6, &so->sin6.sin6_addr, IP6_ADDR_LEN);
break; break;
#endif #endif

View file

@ -40,6 +40,34 @@
#define RTF_LLINFO 0 #define RTF_LLINFO 0
#endif #endif
#if defined(RT_ROUNDUP) && defined(__NetBSD__)
/* NetBSD defines this macro rounding to 64-bit boundaries.
http://fxr.watson.org/fxr/ident?v=NETBSD;i=RT_ROUNDUP */
#define ROUNDUP(a) RT_ROUNDUP(a)
#else
/* Unix Network Programming, 3rd edition says that sockaddr structures in
rt_msghdr should be padded so their addresses start on a multiple of
sizeof(u_long). But on 64-bit Mac OS X 10.6 at least, this is false. Apple's
netstat code uses 4-byte padding, not 8-byte. This is relevant for IPv6
addresses, for which sa_len == 28.
http://www.opensource.apple.com/source/network_cmds/network_cmds-329.2.2/netstat.tproj/route.c */
#ifdef __APPLE__
#define RT_MSGHDR_ALIGNMENT sizeof(uint32_t)
#else
#define RT_MSGHDR_ALIGNMENT sizeof(unsigned long)
#endif
#define ROUNDUP(a) \
((a) > 0 ? (1 + (((a) - 1) | (RT_MSGHDR_ALIGNMENT - 1))) : RT_MSGHDR_ALIGNMENT)
#endif
#ifdef HAVE_SOCKADDR_SA_LEN
#define SA_LEN(s) ((s)->sa_len)
#else
#define SA_LEN(s) (sizeof(*(s)))
#endif
#define NEXTSA(s) \
((struct sockaddr *)((u_char *)(s) + ROUNDUP(SA_LEN(s))))
struct arp_handle { struct arp_handle {
int fd; int fd;
int seq; int seq;
@ -47,7 +75,7 @@ struct arp_handle {
struct arpmsg { struct arpmsg {
struct rt_msghdr rtm; struct rt_msghdr rtm;
u_char addrs[256]; u_char addrs[512];
}; };
arp_t * arp_t *
@ -111,39 +139,57 @@ arp_msg(arp_t *arp, struct arpmsg *msg)
#endif #endif
} }
static int sockaddr_equal_addr(const struct sockaddr *sa, const struct addr *b)
{
if (sa->sa_family == AF_INET) {
return (b->addr_type == ADDR_TYPE_IP &&
((struct sockaddr_in *)sa)->sin_addr.s_addr == b->addr_ip);
}
else if (sa->sa_family == AF_INET6) {
return (b->addr_type == ADDR_TYPE_IP6 &&
0 == memcmp(
((struct sockaddr_in6 *)sa)->sin6_addr.s6_addr,
b->addr_ip6.data,
IP6_ADDR_LEN));
}
return 0;
}
int int
arp_add(arp_t *arp, const struct arp_entry *entry) arp_add(arp_t *arp, const struct arp_entry *entry)
{ {
struct arpmsg msg; struct arpmsg msg;
struct sockaddr_in *sin; struct sockaddr *sin;
struct sockaddr *sa; struct sockaddr *sa;
int index, type; int index, type;
if (entry->arp_pa.addr_type != ADDR_TYPE_IP || if ((entry->arp_pa.addr_type != ADDR_TYPE_IP &&
entry->arp_pa.addr_type != ADDR_TYPE_IP6) ||
entry->arp_ha.addr_type != ADDR_TYPE_ETH) { entry->arp_ha.addr_type != ADDR_TYPE_ETH) {
errno = EAFNOSUPPORT; errno = EAFNOSUPPORT;
return (-1); return (-1);
} }
sin = (struct sockaddr_in *)msg.addrs; sin = (struct sockaddr *)msg.addrs;
sa = (struct sockaddr *)(sin + 1);
if (addr_ntos(&entry->arp_pa, (struct sockaddr *)sin) < 0) if (addr_ntos(&entry->arp_pa, (struct sockaddr *)sin) < 0)
return (-1); return (-1);
sa = NEXTSA(sin);
memset(&msg.rtm, 0, sizeof(msg.rtm)); memset(&msg.rtm, 0, sizeof(msg.rtm));
msg.rtm.rtm_type = RTM_GET; msg.rtm.rtm_type = RTM_GET;
msg.rtm.rtm_addrs = RTA_DST; msg.rtm.rtm_addrs = RTA_DST;
msg.rtm.rtm_msglen = sizeof(msg.rtm) + sizeof(*sin); msg.rtm.rtm_msglen = sizeof(msg.rtm) + ROUNDUP(SA_LEN(sin));
msg.rtm.rtm_msglen = ((char *)sin - (char *)&msg) + ROUNDUP(SA_LEN(sin));
if (arp_msg(arp, &msg) < 0) if (arp_msg(arp, &msg) < 0)
return (-1); return (-1);
if (msg.rtm.rtm_msglen < (int)sizeof(msg.rtm) + if (msg.rtm.rtm_msglen < (int)sizeof(msg.rtm) +
sizeof(*sin) + sizeof(*sa)) { ROUNDUP(SA_LEN(sin)) + SA_LEN(sa)) {
errno = EADDRNOTAVAIL; errno = EADDRNOTAVAIL;
return (-1); return (-1);
} }
if (sin->sin_addr.s_addr == entry->arp_pa.addr_ip) { if (sockaddr_equal_addr(sin, &entry->arp_pa)) {
if ((RTF_LLINFO && ((msg.rtm.rtm_flags & RTF_LLINFO) == 0)) || if ((RTF_LLINFO && ((msg.rtm.rtm_flags & RTF_LLINFO) == 0)) ||
(msg.rtm.rtm_flags & RTF_GATEWAY) != 0) { (msg.rtm.rtm_flags & RTF_GATEWAY) != 0) {
errno = EADDRINUSE; errno = EADDRINUSE;
@ -169,11 +215,8 @@ arp_add(arp_t *arp, const struct arp_entry *entry)
msg.rtm.rtm_addrs = RTA_DST | RTA_GATEWAY; msg.rtm.rtm_addrs = RTA_DST | RTA_GATEWAY;
msg.rtm.rtm_inits = RTV_EXPIRE; msg.rtm.rtm_inits = RTV_EXPIRE;
msg.rtm.rtm_flags = RTF_HOST | RTF_STATIC; msg.rtm.rtm_flags = RTF_HOST | RTF_STATIC;
#ifdef HAVE_SOCKADDR_SA_LEN msg.rtm.rtm_msglen = sizeof(msg.rtm) + ROUNDUP(SA_LEN(sin)) + ROUNDUP(SA_LEN(sa));
msg.rtm.rtm_msglen = sizeof(msg.rtm) + sin->sin_len + sa->sa_len;
#else
msg.rtm.rtm_msglen = sizeof(msg.rtm) + sizeof(*sin) + sizeof(*sa);
#endif
return (arp_msg(arp, &msg)); return (arp_msg(arp, &msg));
} }
@ -181,33 +224,34 @@ int
arp_delete(arp_t *arp, const struct arp_entry *entry) arp_delete(arp_t *arp, const struct arp_entry *entry)
{ {
struct arpmsg msg; struct arpmsg msg;
struct sockaddr_in *sin; struct sockaddr *sin;
struct sockaddr *sa; struct sockaddr *sa;
if (entry->arp_pa.addr_type != ADDR_TYPE_IP) { if (entry->arp_pa.addr_type != ADDR_TYPE_IP &&
entry->arp_pa.addr_type != ADDR_TYPE_IP6) {
errno = EAFNOSUPPORT; errno = EAFNOSUPPORT;
return (-1); return (-1);
} }
sin = (struct sockaddr_in *)msg.addrs; sin = (struct sockaddr *)msg.addrs;
sa = (struct sockaddr *)(sin + 1);
if (addr_ntos(&entry->arp_pa, (struct sockaddr *)sin) < 0) if (addr_ntos(&entry->arp_pa, (struct sockaddr *)sin) < 0)
return (-1); return (-1);
sa = NEXTSA(sin);
memset(&msg.rtm, 0, sizeof(msg.rtm)); memset(&msg.rtm, 0, sizeof(msg.rtm));
msg.rtm.rtm_type = RTM_GET; msg.rtm.rtm_type = RTM_GET;
msg.rtm.rtm_addrs = RTA_DST; msg.rtm.rtm_addrs = RTA_DST;
msg.rtm.rtm_msglen = sizeof(msg.rtm) + sizeof(*sin); msg.rtm.rtm_msglen = sizeof(msg.rtm) + ROUNDUP(SA_LEN(sin));
if (arp_msg(arp, &msg) < 0) if (arp_msg(arp, &msg) < 0)
return (-1); return (-1);
if (msg.rtm.rtm_msglen < (int)sizeof(msg.rtm) + if (msg.rtm.rtm_msglen < (int)sizeof(msg.rtm) +
sizeof(*sin) + sizeof(*sa)) { ROUNDUP(SA_LEN(sin)) + SA_LEN(sa)) {
errno = ESRCH; errno = ESRCH;
return (-1); return (-1);
} }
if (sin->sin_addr.s_addr == entry->arp_pa.addr_ip) { if (sockaddr_equal_addr(sin, &entry->arp_pa)) {
if ((msg.rtm.rtm_flags & RTF_LLINFO) == 0 || if ((msg.rtm.rtm_flags & RTF_LLINFO) == 0 ||
(msg.rtm.rtm_flags & RTF_GATEWAY) != 0) { (msg.rtm.rtm_flags & RTF_GATEWAY) != 0) {
errno = EADDRINUSE; errno = EADDRINUSE;
@ -227,31 +271,31 @@ int
arp_get(arp_t *arp, struct arp_entry *entry) arp_get(arp_t *arp, struct arp_entry *entry)
{ {
struct arpmsg msg; struct arpmsg msg;
struct sockaddr_in *sin; struct sockaddr *sin;
struct sockaddr *sa; struct sockaddr *sa;
if (entry->arp_pa.addr_type != ADDR_TYPE_IP) { if (entry->arp_pa.addr_type != ADDR_TYPE_IP &&
entry->arp_pa.addr_type != ADDR_TYPE_IP6) {
errno = EAFNOSUPPORT; errno = EAFNOSUPPORT;
return (-1); return (-1);
} }
sin = (struct sockaddr_in *)msg.addrs; sin = (struct sockaddr *)msg.addrs;
sa = (struct sockaddr *)(sin + 1);
if (addr_ntos(&entry->arp_pa, (struct sockaddr *)sin) < 0) if (addr_ntos(&entry->arp_pa, (struct sockaddr *)sin) < 0)
return (-1); return (-1);
sa = NEXTSA(sin);
memset(&msg.rtm, 0, sizeof(msg.rtm)); memset(&msg.rtm, 0, sizeof(msg.rtm));
msg.rtm.rtm_type = RTM_GET; msg.rtm.rtm_type = RTM_GET;
msg.rtm.rtm_addrs = RTA_DST; msg.rtm.rtm_addrs = RTA_DST;
msg.rtm.rtm_flags = RTF_LLINFO; msg.rtm.rtm_flags = RTF_LLINFO;
msg.rtm.rtm_msglen = sizeof(msg.rtm) + sizeof(*sin); msg.rtm.rtm_msglen = sizeof(msg.rtm) + ROUNDUP(SA_LEN(sin));
if (arp_msg(arp, &msg) < 0) if (arp_msg(arp, &msg) < 0)
return (-1); return (-1);
if (msg.rtm.rtm_msglen < (int)sizeof(msg.rtm) + if (msg.rtm.rtm_msglen < (int)sizeof(msg.rtm) +
sizeof(*sin) + sizeof(*sa) || ROUNDUP(SA_LEN(sin)) + SA_LEN(sa) ||
sin->sin_addr.s_addr != entry->arp_pa.addr_ip ||
sa->sa_family != AF_LINK) { sa->sa_family != AF_LINK) {
errno = ESRCH; errno = ESRCH;
return (-1); return (-1);
@ -268,7 +312,7 @@ arp_loop(arp_t *arp, arp_handler callback, void *arg)
{ {
struct arp_entry entry; struct arp_entry entry;
struct rt_msghdr *rtm; struct rt_msghdr *rtm;
struct sockaddr_in *sin; struct sockaddr *sin;
struct sockaddr *sa; struct sockaddr *sa;
char *buf, *lim, *next; char *buf, *lim, *next;
size_t len; size_t len;
@ -293,8 +337,8 @@ arp_loop(arp_t *arp, arp_handler callback, void *arg)
for (next = buf; next < lim; next += rtm->rtm_msglen) { for (next = buf; next < lim; next += rtm->rtm_msglen) {
rtm = (struct rt_msghdr *)next; rtm = (struct rt_msghdr *)next;
sin = (struct sockaddr_in *)(rtm + 1); sin = (struct sockaddr *)(rtm + 1);
sa = (struct sockaddr *)(sin + 1); sa = NEXTSA(sin);
if (addr_ston((struct sockaddr *)sin, &entry.arp_pa) < 0 || if (addr_ston((struct sockaddr *)sin, &entry.arp_pa) < 0 ||
addr_ston(sa, &entry.arp_ha) < 0) addr_ston(sa, &entry.arp_ha) < 0)

View file

@ -102,6 +102,7 @@ export-%:
# Using @BASE discards local changes. # Using @BASE discards local changes.
svn export .. $* svn export .. $*
NMAP_SOURCEDIR=$(JHBUILD_SOURCE)/nmap-$(NMAP_VERSION)
NMAP_TARBALL=$(JHBUILD_SOURCE)/pkgs/nmap-$(NMAP_VERSION).tar.gz NMAP_TARBALL=$(JHBUILD_SOURCE)/pkgs/nmap-$(NMAP_VERSION).tar.gz
$(NMAP_TARBALL): $(NMAP_TARBALL):
rm -rf nmap-$(NMAP_VERSION) rm -rf nmap-$(NMAP_VERSION)
@ -132,6 +133,8 @@ LICENSE.formatted:
../mswin32/license-format/licformat.sh ../LICENSE > $@ ../mswin32/license-format/licformat.sh ../LICENSE > $@
clean: clean-nmap clean-ncat clean-nping clean: clean-nmap clean-ncat clean-nping
rm -f $(NMAP_TARBALL)
rm -rf $(NMAP_SOURCEDIR)
rm -rf $(IMAGE_STAGING_DIR) rm -rf $(IMAGE_STAGING_DIR)
rm -rf *-build/ rm -rf *-build/
rm -rf *-root/ rm -rf *-root/

View file

@ -1,6 +1,6 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!DOCTYPE moduleset SYSTEM "moduleset.dtd" [ <!DOCTYPE moduleset SYSTEM "moduleset.dtd" [
<!ENTITY nmap_version "7.98SVN"> <!ENTITY nmap_version "7.99">
<!ENTITY openssl_version "3.0.19"> <!ENTITY openssl_version "3.0.19">
<!ENTITY libpcap_version "1.10.6"> <!ENTITY libpcap_version "1.10.6">
<!ENTITY libssh2_version "1.11.1"> <!ENTITY libssh2_version "1.11.1">

View file

@ -2,12 +2,12 @@
.\" Title: Ncat .\" Title: Ncat
.\" Author: [see the "Authors" section] .\" Author: [see the "Authors" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/> .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 08/21/2025 .\" Date: 03/19/2026
.\" Manual: Ncat Reference Guide .\" Manual: Ncat Reference Guide
.\" Source: Ncat .\" Source: Ncat
.\" Language: English .\" Language: English
.\" .\"
.TH "NCAT" "1" "08/21/2025" "Ncat" "Ncat Reference Guide" .TH "NCAT" "1" "03/19/2026" "Ncat" "Ncat Reference Guide"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * Define some portability stuff .\" * Define some portability stuff
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
@ -43,7 +43,7 @@ Among Ncat\*(Aqs vast number of features there is the ability to chain Ncats tog
.RS 4 .RS 4
.\} .\}
.nf .nf
Ncat 7\&.98SVN ( https://nmap\&.org/ncat ) Ncat 7\&.99 ( https://nmap\&.org/ncat )
Usage: ncat [options] [hostname] [port] Usage: ncat [options] [hostname] [port]
Options taking a time assume seconds\&. Append \*(Aqms\*(Aq for milliseconds, Options taking a time assume seconds\&. Append \*(Aqms\*(Aq for milliseconds,

View file

@ -1,4 +1,4 @@
Ncat 7.98SVN ( https://nmap.org/ncat ) Ncat 7.99 ( https://nmap.org/ncat )
Usage: ncat [options] [hostname] [port] Usage: ncat [options] [hostname] [port]
Options taking a time assume seconds. Append 'ms' for milliseconds, Options taking a time assume seconds. Append 'ms' for milliseconds,

View file

@ -79,7 +79,7 @@
/* Ncat information for output, etc. */ /* Ncat information for output, etc. */
#define NCAT_NAME "Ncat" #define NCAT_NAME "Ncat"
#define NCAT_URL "https://nmap.org/ncat" #define NCAT_URL "https://nmap.org/ncat"
#define NCAT_VERSION "7.98SVN" #define NCAT_VERSION "7.99"
#ifndef __GNUC__ #ifndef __GNUC__
#ifndef __attribute__ #ifndef __attribute__

View file

@ -1 +1 @@
VERSION = "7.97" VERSION = "7.99"

View file

@ -2,12 +2,12 @@
.\" Title: ndiff .\" Title: ndiff
.\" Author: [see the "Authors" section] .\" Author: [see the "Authors" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/> .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 08/21/2025 .\" Date: 03/19/2026
.\" Manual: User Commands .\" Manual: User Commands
.\" Source: Ndiff .\" Source: Ndiff
.\" Language: English .\" Language: English
.\" .\"
.TH "NDIFF" "1" "08/21/2025" "Ndiff" "User Commands" .TH "NDIFF" "1" "03/19/2026" "Ndiff" "User Commands"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * Define some portability stuff .\" * Define some portability stuff
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------

6
nmap.h
View file

@ -123,10 +123,10 @@
/* Edit this definition only within the quotes, because it is read from this /* Edit this definition only within the quotes, because it is read from this
file by the makefiles. */ file by the makefiles. */
#define NMAP_MAJOR 7 #define NMAP_MAJOR 7
#define NMAP_MINOR 98 #define NMAP_MINOR 99
#define NMAP_BUILD 1 #define NMAP_BUILD 0
/* SVN, BETA, etc. */ /* SVN, BETA, etc. */
#define NMAP_SPECIAL "SVN" #define NMAP_SPECIAL ""
#define NMAP_VERSION STR(NMAP_MAJOR) "." STR(NMAP_MINOR) NMAP_SPECIAL #define NMAP_VERSION STR(NMAP_MAJOR) "." STR(NMAP_MINOR) NMAP_SPECIAL
#define NMAP_NUM_VERSION STR(NMAP_MAJOR) "." STR(NMAP_MINOR) "." STR(NMAP_BUILD) ".0" #define NMAP_NUM_VERSION STR(NMAP_MAJOR) "." STR(NMAP_MINOR) "." STR(NMAP_BUILD) ".0"

View file

@ -2,12 +2,12 @@
.\" Title: nping .\" Title: nping
.\" Author: [see the "Authors" section] .\" Author: [see the "Authors" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/> .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 08/21/2025 .\" Date: 03/19/2026
.\" Manual: Nping Reference Guide .\" Manual: Nping Reference Guide
.\" Source: Nping .\" Source: Nping
.\" Language: English .\" Language: English
.\" .\"
.TH "NPING" "1" "08/21/2025" "Nping" "Nping Reference Guide" .TH "NPING" "1" "03/19/2026" "Nping" "Nping Reference Guide"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * Define some portability stuff .\" * Define some portability stuff
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------

View file

@ -265,7 +265,7 @@
/* General tunable defines **************************************************/ /* General tunable defines **************************************************/
#define NPING_NAME "Nping" #define NPING_NAME "Nping"
#define NPING_URL "https://nmap.org/nping" #define NPING_URL "https://nmap.org/nping"
#define NPING_VERSION "0.7.98SVN" #define NPING_VERSION "0.7.99"
#define DEFAULT_VERBOSITY VB_0 #define DEFAULT_VERBOSITY VB_0

5073
nsock/src/configure vendored

File diff suppressed because it is too large Load diff

View file

@ -35,7 +35,8 @@ prerule = function()
end end
local function filter_interfaces(if_table) local function filter_interfaces(if_table)
if ipOps.ip_to_str(if_table.address) and if_table.link == "ethernet" then local addr = ipOps.ip_to_str(if_table.address)
if addr and #addr == 16 and if_table.link == "ethernet" then
return if_table return if_table
end end
end end

View file

@ -50,7 +50,8 @@ local function build_invalid_extension_header(nxt_hdr)
end end
local function filter_interfaces(if_table) local function filter_interfaces(if_table)
if ipOps.ip_to_str(if_table.address) and if_table.link == "ethernet" then local addr = ipOps.ip_to_str(if_table.address)
if addr and #addr == 16 and if_table.link == "ethernet" then
return if_table return if_table
end end
end end

View file

@ -96,7 +96,8 @@ local function build_router_advert(mac_src,prefix,prefix_len,valid_time,preferre
end end
local function filter_interfaces(if_table) local function filter_interfaces(if_table)
if ipOps.ip_to_str(if_table.address) and if_table.link == "ethernet" then local addr = ipOps.ip_to_str(if_table.address)
if addr and #addr == 16 and if_table.link == "ethernet" then
return if_table return if_table
end end
end end

View file

@ -1 +1 @@
VERSION = "7.97" VERSION = "7.99"