Index: docs/nmap.dtd =================================================================== --- docs/nmap.dtd (revision 6441) +++ docs/nmap.dtd (working copy) @@ -100,6 +100,13 @@ + + + + +#include +#endif + #ifdef WIN32 #include "winfix.h" #endif @@ -1255,6 +1263,22 @@ if (o.verbose && tm->tm_mon == 8 && tm->tm_mday == 1) { log_write(LOG_STDOUT|LOG_SKID, "Happy %dth Birthday to Nmap, may it live to be %d!\n", tm->tm_year - 97, tm->tm_year + 3 ); } + if (o.debugging) { +#ifndef WIN32 + log_write(LOG_STDOUT|LOG_SKID, "%s linked against %s\n", NMAP_NAME, pcap_lib_version()); +#endif + log_write(LOG_STDOUT|LOG_SKID, "%s linked against PCRE library %s\n", NMAP_NAME, pcre_version()); +#ifndef NOLUA + log_write(LOG_STDOUT|LOG_SKID, "%s linked against %s\n", NMAP_NAME, LUA_VERSION); +#endif +#ifndef HAVE_OPENSSL + log_write(LOG_STDOUT|LOG_SKID, "%s compiled without OpenSSL support.\n", NMAP_NAME); +#endif +#if HAVE_OPENSSL + log_write(LOG_STDOUT|LOG_SKID, "%s compiled against %s\n", NMAP_NAME, OPENSSL_VERSION_TEXT); + log_write(LOG_STDOUT|LOG_SKID, "%s linked against %s\n", NMAP_NAME, SSLeay_version(0)); +#endif + } if (iflist) { print_iflist(); exit(0); @@ -1445,6 +1469,19 @@ log_write(LOG_XML, "\n\n", o.verbose, o.debugging); + if (o.debugging) { + log_write(LOG_XML, "\n"); + log_write(LOG_XML, "\n", pcap_lib_version()); + log_write(LOG_XML, "\n", pcre_version()); +#ifndef NOLUA + log_write(LOG_XML, "\n", LUA_VERSION); +#endif +#if HAVE_OPENSSL + log_write(LOG_XML, "\n", SSLeay_version(0)); +#endif + log_write(LOG_XML, "\n"); + } + /* Before we randomize the ports scanned, lets output them to machine parseable output */ if (o.verbose) Index: nmap.h =================================================================== --- nmap.h (revision 6441) +++ nmap.h (working copy) @@ -234,6 +234,12 @@ #include #endif +#ifdef HAVE_PCRE_PCRE_H +# include +#else +# include +#endif + /*#include *//* defines struct arphdr needed for if_ether.h */ // #if HAVE_NET_IF_H // #ifndef NET_IF_H /* why doesn't OpenBSD do this?! */