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