Nmap Development mailing list archives

Re: Script database update error


From: jah <jah () zadkiel plus com>
Date: Tue, 12 Jan 2010 14:08:52 +0000

On 12/01/2010 13:53, Tom Sellers wrote:
Starting Nmap 5.10BETA2 ( http://nmap.org ) at 2010-01-12 07:47 CST
NSE: Updating rule database.
NSE: error while updating Script Database:
[string "local nse = ......"]:17:
/usr/local/share/nmap/nselib/http.lua:45: attempt to index field
'args' (a nil value)
stack traceback:
        [C]: in function 'assert'
        [string "local nse = ......"]:17: in main chunk 
It looks to be because, during an update, the args table doesn't exist
and so an attempt to index it causes an exception.
The attached patch is a quick fix.

Regards,

jah
--- http.lua.orig       2010-01-12 14:03:38.119000000 +0000
+++ http.lua    2010-01-12 14:02:30.681500000 +0000
@@ -41,7 +41,7 @@
 local have_ssl = (nmap.have_ssl() and pcall(require, "openssl"))
 
 local USER_AGENT
-do
+if nmap.registry.args then
   local arg = nmap.registry.args["http.useragent"]
   if arg and arg == "" then
     USER_AGENT = nil
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/

Current thread: