Home page logo

nmap-dev logo Nmap Development mailing list archives

Re: [patch] Assorted NSE fixes
From: Daniel Miller <bonsaiviking () gmail com>
Date: Tue, 29 May 2012 15:04:04 -0500

On 05/29/2012 01:36 PM, Patrick Donnelly wrote:
Hi Daniel,

On Tue, May 29, 2012 at 1:42 PM, Daniel Miller<bonsaiviking () gmail com>  wrote:
Also, I noticed an error from http-default-accounts:
NSE: http-default-accounts against threw an error!
./nselib/data/http-default-accounts-fingerprints.lua:45: variable 'http'
is not declared
stack traceback:
        [C]: in function 'error'
        ./nselib/strict.lua:80: in function '__index'
        ./nselib/data/http-default-accounts-fingerprints.lua:45: in
        (...tail calls...)
        ./scripts/http-default-accounts.nse:275: in function
        (...tail calls...)

I think this is related to changes in environment handling in Lua 5.2, but I
can't dig into it right now. The short fix would be to add 'require "http"'
to the top of the fingerprints file, but that might be more overhead than is
necessary. A similar issue cropped up with the packetdecoders.lua file from
broadcast-listener, so maybe all calls to loadfile should be checked.
Why would there be overhead? I added the missing requires.

I was probably off-base on this, not knowing how requires work, but I thought that there may have been a way to take advantage of the fact that the http-default-accounts script already requires the http library. Either way, the important part is to fix the functionality. Thanks!

Sent through the nmap-dev mailing list
Archived at http://seclists.org/nmap-dev/

  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]