Nmap Development mailing list archives

[NSE] Changes to handling of SMB script arguments


From: Chris Woodbury <woodbusy () gmail com>
Date: Wed, 20 Apr 2011 15:56:24 -0500

I would also like to suggest some changes to how certain SMB script
arguments are handled. As it stands, arguments like "smbnoguest" must
be specified as "smbnoguest=1" or "smbnoguest=true". However, since
the value of the argument (and others like it) is ignored, I wonder if
we could change it so that users merely have to include it as an
argument, but do not have to give it a value (i.e. "... --script-args
smbnoguest ..."). I think this behavior is in-line with some of the
other NSE scripts, as well as with other tools.

I've attached a patch that implements this, using the
stdnse.get_script_args() function. I only made changes to flag-type
arguments, and left alone those that use their values:
smbbasic (smb.lua)
smbnoguest (smbauth.lua)
smblockout (smb-brute.nse)
cleanup (smb-psexec.nse)
nohide (smb-psexec.nse)
nocleanup (smb-psexec.nse)
nocipher (smb-psexec.nse)


-chris

Attachment: smb_args.patch
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: