Nmap Development mailing list archives

Re: [NSE] Yet another SMB version!


From: jah <jah () zadkiel plus com>
Date: Wed, 22 Oct 2008 00:02:48 +0100

Hi Ron,

I've just had a play with your scripts which are looking great -
unbelievable amounts of info available once auth'd.
So far, I've had one little mishap when specifying smbtype=v2:

SCRIPT ENGINE DEBUG: SMB: Creating v2 response
SCRIPT ENGINE: C:\Program Files\Nmap\nselib/smb.lua:601: attempt to call
global 'ntlmv2_create_response' (a nil value)
NSOCK (0.2180s) nsock_loop() started (timeout=50ms). 0 events pending
NSOCK (0.2180s) nsock_loop() started (timeout=50ms). 0 events pending
NSOCK (0.2180s) nsock_loop() started (timeout=50ms). 0 events pending

This is that old mutex issue (which needs to be addressed at some point)
where a thread which has a mutex dies because of a runtime error and
other threads that are in the waiting queue never resume - hence the
continuous NSOCK loop.

The reason for the failure in this case is because
lmv2_create_response() calls local ntlmv2_create_response() which is
defined later in the code.  If functions are to be declared as local,
they need to be defined before the point at which they are called.  The
alternative is not to declare functions as local and then they can be
defined in whatever order you like.
I'm no expert so I can't tell you the merits, or otherwise, of doing
either - save to say that I find the latter to be less problematic.

As an aside, I've tried your scripts on XP and a Vista machine I'm
fixing and all scripts work well on both.

Regards,

jah

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


Current thread: