122,129d121 < #if HAVE_OPENSSL < #include < #endif < < /* To get the version number only. */ < #include "libdnet-stripped/include/config.h" < #define DNET_VERSION VERSION < 139,140d130 < static void display_nmap_version(); < static char * get_word(char * str,int n); 1237c1227 < display_nmap_version(); --- > log_write(LOG_STDOUT, "\n%s version %s ( %s )\n", NMAP_NAME, NMAP_VERSION, NMAP_URL); 2813,2878d2802 < } < < extern const char pcap_version[]; < < static void display_nmap_version() { < std::vector with, without; < char tmp[50]; < unsigned int i; < < #ifndef NOLUA < with.push_back(std::string("liblua-") + (LUA_RELEASE + 4)); < #else < without.push_back("liblua"); < #endif < < #if HAVE_OPENSSL < with.push_back(std::string("openssl-") + get_word(OPENSSL_VERSION_TEXT,1)); < #else < without.push_back("openssl"); < #endif < < Strncpy(tmp, pcre_version(), sizeof(tmp)); < < with.push_back(std::string("libpcre-") + get_word(tmp,0)); < < with.push_back(std::string("libpcap-") + pcap_version); < < with.push_back(std::string("libdnet-") + DNET_VERSION); < < #if HAVE_IPV6 < with.push_back("ipv6"); < #else < without.push_back("ipv6"); < #endif < < log_write(LOG_STDOUT, "\n%s version %s ( %s )\n", NMAP_NAME, NMAP_VERSION, NMAP_URL); < log_write(LOG_STDOUT, "Platform: %s\n", NMAP_PLATFORM); < log_write(LOG_STDOUT, "Compiled with:"); < for (i = 0; i < with.size(); i++) < log_write(LOG_STDOUT, " %s", with[i].c_str()); < log_write(LOG_STDOUT, "\n"); < log_write(LOG_STDOUT, "Compiled without:"); < for (i = 0; i < without.size(); i++) < log_write(LOG_STDOUT, " %s", without[i].c_str()); < log_write(LOG_STDOUT, "\n"); < } < < static char * get_word(char * str,int n) < { < char * p = str; < char * word = (char *)safe_malloc(50); < char * a = word; < < for(;n!=0;p++) < { < if( *p == ' ' ) < n--; < if( *p == '\0') < return NULL; < } < < for(; *p != ' ' && *p != '\0'; p++,a++) < *a = *p; < < *a = '\0'; < return word;