Nmap Development mailing list archives

Re: Version display patch


From: David Fifield <david () bamsoftware com>
Date: Tue, 1 Feb 2011 13:06:47 -0800

On Mon, Jan 31, 2011 at 02:44:04AM -0800, David Fifield wrote:
On Thu, Jan 27, 2011 at 01:28:20AM +0530, ambarisha b wrote:
Hi,
This is a patch to modify -V option(as suggested in the todo
list).Along with nmap version number,it now gives the current
platform,whether lua and openSSL have been compiled or not.
Please find the attachment.

Thanks for this patch. Here's what its output looks like for me:

Nmap version 5.51SVN ( http://nmap.org )
Platform : i686-pc-linux-gnu
Lua - compiled
OpenSSL -compiled

There are some issues with whitespace but other than that I think this
matches what we need. The question is the output format. Vim has a
similar feature; the output of "vim --version" looks like:

VIM - Vi IMproved 7.1 (2007 May 12, compiled Oct 18 2008 09:05:15)
Included patches: 1-314
Compiled by buildd () excelsior roeckx be
Huge version without GUI.  Features included (+) or not (-):
+arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent
-clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
+cryptv +cscope +cursorshape +dialog_con +diff +digraphs -dnd -ebcdic

Does anyone have comments on how this should look or what other
information should be included?

Fyodor and I discussed this and came up with this format:

Nmap version 5.51SVN ( http://nmap.org )
Platform: i686-pc-linux-gnu
Compiled with: openssl-0.9.8g liblua-5.1.3 libdnet-1.12 libpcre-7.6 libpcap-1.1.1 ipv6
Compiled without:

If it was compiled without liblua and IPv6, it would look like this
instead:

Nmap version 5.51SVN ( http://nmap.org )
Platform: i686-pc-linux-gnu
Compiled with: openssl-0.9.8g libdnet-1.12 libpcre-7.6 libpcap-1.1.1
Compiled without: liblua ipv6

The idea is that the version number is included if the feature is
enabled, but if it's not enabled you just use the feature name in the
"Compiled without" line.

Do you want to implement this, Ambarisha? For each library, you have to
find out how to query for the version number. libdnet, libpcre, and
libpcap will always by in the "Compiled with" line, so you only need to
find their version numbers. It might not be easy to get a printable
version number from every library, so if you run into difficulties, just
send in what you have.

David Fifield
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


Current thread: