mirror of
https://github.com/nmap/nmap.git
synced 2025-12-10 09:49:05 +00:00
Show which libraries are the ones included with Nmap and which are from
the system by prefixing "nmap-" to the former in -V output. Patch by Ambarisha B. Hard-code the included/non-included libraries in nmap_winconfig.h:
This commit is contained in:
@@ -34,8 +34,10 @@ o [Zenmap] Worked around a pycairo bug that prevented saving the
|
||||
(like StringIO)". The problem was reported by Alex Kah. [David]
|
||||
|
||||
o The -V and --version options now show the platform Nmap was compiled
|
||||
on, which features are compiled in, and the version numbers of
|
||||
libraries it is linked against. [Ambarisha B., David]
|
||||
on, which features are compiled in, the version numbers of
|
||||
libraries it is linked against, and whether the libraries are the
|
||||
ones that come with Nmap or are from the operating system.
|
||||
[Ambarisha B., David]
|
||||
|
||||
o Fixed some inconsistencies in nmap-os-db reported by Xavier Sudre
|
||||
from netVigilance.
|
||||
|
||||
@@ -416,6 +416,7 @@ if test $have_libpcap != yes; then
|
||||
PCAP_BUILD="pcap_build"
|
||||
PCAP_CLEAN="pcap_clean"
|
||||
PCAP_DIST_CLEAN="pcap_dist_clean"
|
||||
AC_DEFINE(PCAP_INCLUDED)
|
||||
else
|
||||
AC_DEFINE(HAVE_LIBPCAP)
|
||||
LIBPCAP_LIBS="-lpcap"
|
||||
@@ -472,6 +473,7 @@ if test $have_pcre != yes ; then
|
||||
PCRE_BUILD="pcre_build"
|
||||
PCRE_CLEAN="pcre_clean"
|
||||
PCRE_DIST_CLEAN="pcre_dist_clean"
|
||||
AC_DEFINE(PCRE_INCLUDED)
|
||||
else
|
||||
# We only need to check for and use this if we are NOT using included pcre
|
||||
AC_CHECK_HEADERS(pcre/pcre.h)
|
||||
@@ -524,6 +526,7 @@ if test $have_dnet != yes ; then
|
||||
DNET_BUILD="dnet_build"
|
||||
DNET_CLEAN="dnet_clean"
|
||||
DNET_DIST_CLEAN="dnet_dist_clean"
|
||||
AC_DEFINE(DNET_INCLUDED)
|
||||
else
|
||||
LIBDNET_LIBS="-ldnet"
|
||||
DNET_DEPENDS=""
|
||||
@@ -621,6 +624,7 @@ else
|
||||
LUA_BUILD="lua_build"
|
||||
LUA_CLEAN="lua_clean"
|
||||
LUA_DIST_CLEAN="lua_dist_clean"
|
||||
AC_DEFINE(LUA_INCLUDED)
|
||||
else
|
||||
AC_MSG_RESULT(yes)
|
||||
fi
|
||||
|
||||
16
nmap.cc
16
nmap.cc
@@ -2854,7 +2854,11 @@ static void display_nmap_version() {
|
||||
unsigned int i;
|
||||
|
||||
#ifndef NOLUA
|
||||
#ifdef LUA_INCLUDED
|
||||
with.push_back(std::string("nmap-liblua-") + get_word_or_quote(LUA_RELEASE, 1));
|
||||
#else
|
||||
with.push_back(std::string("liblua-") + get_word_or_quote(LUA_RELEASE, 1));
|
||||
#endif
|
||||
#else
|
||||
without.push_back("liblua");
|
||||
#endif
|
||||
@@ -2865,11 +2869,23 @@ static void display_nmap_version() {
|
||||
without.push_back("openssl");
|
||||
#endif
|
||||
|
||||
#ifdef PCRE_INCLUDED
|
||||
with.push_back(std::string("nmap-libpcre-") + get_word_or_quote(pcre_version(), 0));
|
||||
#else
|
||||
with.push_back(std::string("libpcre-") + get_word_or_quote(pcre_version(), 0));
|
||||
#endif
|
||||
|
||||
#ifdef PCAP_INCLUDED
|
||||
with.push_back(std::string("nmap-libpcap-") + get_word_or_quote(pcap_lib_version(), 2));
|
||||
#else
|
||||
with.push_back(std::string("libpcap-") + get_word_or_quote(pcap_lib_version(), 2));
|
||||
#endif
|
||||
|
||||
#ifdef DNET_INCLUDED
|
||||
with.push_back(std::string("nmap-libdnet-") + DNET_VERSION);
|
||||
#else
|
||||
with.push_back(std::string("libdnet-") + DNET_VERSION);
|
||||
#endif
|
||||
|
||||
#if HAVE_IPV6
|
||||
with.push_back("ipv6");
|
||||
|
||||
@@ -178,6 +178,12 @@ extern "C" int gethostname (char *, unsigned int);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Used for -V. */
|
||||
#undef LUA_INCLUDED
|
||||
#undef PCAP_INCLUDED
|
||||
#undef DNET_INCLUDED
|
||||
#undef PCRE_INCLUDED
|
||||
|
||||
#undef DEC
|
||||
#undef LINUX
|
||||
#undef FREEBSD
|
||||
|
||||
@@ -104,4 +104,9 @@
|
||||
|
||||
#define HAVE_OPENSSL 1
|
||||
|
||||
#define LUA_INCLUDED 1
|
||||
#undef PCAP_INCLUDED
|
||||
#define DNET_INCLUDED 1
|
||||
#define PCRE_INCLUDED 1
|
||||
|
||||
#endif /* NMAP_WINCONFIG_H */
|
||||
|
||||
Reference in New Issue
Block a user