Nmap Development mailing list archives

Re: [NSE] First draft of Windows Version Table library


From: Abuse 007 <abuse007 () gmail com>
Date: Sat, 8 Sep 2012 05:45:54 +1000

I would prefer the official product names rather than codenames


On 9/7/12, David Fifield <david () bamsoftware com> wrote:
On Sat, Aug 25, 2012 at 03:02:42AM -0500, Alex Weber wrote:
Hey list,

I took a crack at the Windows Version Table function suggested by the
wiki,
implemented as a library.
Usage:
local winver = require("winver")
winver.get_name("6.0.5048") => "Windows Longhorn"

Relies on a file placed in nselib/data/ called windows_versions.lua -
Most
of the data came from the website linked to on the wiki. This is just a
first go at it - please give some feedback if you have ideas on how to
extend the functionality. I could only think of one useful function
(get_name), and I'd like to add to it before it's committed. I was
thinking
of a 'fuzzy match' function? I'm not sure how useful that would be.

Thanks Alex. Could you make the changes that the wiki suggests to
ndmp-version or smb-mbenum? We should not commit this without code that
uses it, and making sure the API suits an existing script is a good
test.

I don't think you should have a separate windows_versions.lua file. Put
all this inside the library. Creating an external data file only creates
a new backward compatibility constraint, and I'm not sure a table with
string keys is the best way to represent this mapping.

Don't worry about a fuzzy matching unless it's required by a script.
Just make sure that you meet the needs of existing scripts.

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

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


Current thread: