Nmap Development mailing list archives

[NSE] smb-ls fixes and improvements


From: Pierre LALET <pierre () droids-corp org>
Date: Sat, 7 Mar 2015 20:36:34 +0100

Hi list,

Here is a patch that:

  - Fixes a bug in smb.lua (smb-ls was broken, at least against a
    Samba service I found).

  - Allows smb-ls to be used with multiple shares at once and creates
    a default value ("\") for its `path` argument.

  - Allows smb-enum-shares to tell smb-ls which share to browse when
    no share has been specified.

I'm new to LUA & NSE so forgive me if my code is not as good as it
should be.

I have tried to make sure that the script smb-ls and smb-enum-shares
still work as before when used with the same arguments (no API was
harmed in the making of this patch).

I think we should consider to use 1 as default value when no value has
been set for `maxdepth` parameter (for now it defaults to 0 which can
take a *really* long time to complete on some shares, 1 would mean "no
recursion").

I did not add that in this patch because that would change the current
behavior of smb-ls.

Of course, remarks and comments welcome!

-- 
Pierre
http://pierre.droids-corp.org/

Attachment: smb-ls.patch
Description:

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

Current thread: