Nmap Development mailing list archives

Re: [SCRIPT] DB2 Information gathering script - New version of the script


From: Tom Sellers <nmap () fadedcode net>
Date: Wed, 11 Nov 2009 11:19:17 -0600

David Fifield wrote:
On Tue, Nov 10, 2009 at 11:10:41PM -0600, Tom Sellers wrote:

The only thing I can see to change is the ebcdic2ascii table. It should
be able to handle any byte value, or unless I'm mistaken, the script can
crash at this line:

        data_string  = data_string .. ebcdic2ascii[string.format("%x",string.byte(response,i))]

You can do it by setting a default value on the table as is described
here: http://www.lua.org/pil/13.4.3.html. So in this case it might be

setmetatable(ebcdic2ascii, { __index = function() return "." end })


Thanks David, changed.  I feel much better about that table now.
I set the default character as a space as the script does some testing
based on number of "." in the version string.

Tom

Attachment: db2-info.nse
Description:

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

Current thread: