Commit Graph

21 Commits

Author SHA1 Message Date
nnposter ccdb816552 Avoid traversing dot and dot-dot directories 2019-12-19 20:16:23 +00:00
nnposter 6998bfca49 Refactors function smb.find_files()
- Replaces its coroutine design to avoid sharing sockets across threads
    (Fixes #1837)
  - Corrects conversion of file attributes into bitmask
  - Removes side effect of modifying parameter "options" by populating
    member "srch_attrs"
  - Implements options.maxfiles to take advantage of script arg ls.maxfiles,
    reducing file requests that would be ultimately ignored anyway
  - Improves performace by supporting larger SMB block sizes
  - Implements rudimentary support for Trans2_Data by smb.send_transaction2()
  - Adds standard definitions for SMB file attributes
2019-12-19 20:13:16 +00:00
dmiller 0500811f5a Move string utility functions to stringaux.lua 2018-10-18 01:08:19 +00:00
dmiller 24c5ff63b2 Remove nearly all bit.lua use 2018-08-28 15:56:45 +00:00
paulino b0228a212b Updates smb.lua and msrpc.lua to support fully qualified path names as share names and updates match for OID. Modern Windows versions require FQPN and older version work the same. The level of information requested with the call NetShareGetInfo was reduced to support newer versions of Windows. This closes #266, closes #704, closes #238, and closes #883. 2017-05-27 07:28:44 +00:00
dmiller f4619edece Update http urls for nmap.org to https 2015-11-05 20:41:05 +00:00
dmiller 893f0c32f9 Update afp-ls, nfs-ls, smb-ls to use ls.lua. See #106 2015-09-04 12:52:08 +00:00
dmiller 7852fa3c18 Remove many ERROR outputs from non-debug NSE output 2015-08-27 20:43:55 +00:00
dmiller 00064a1809 Whitespace/reindent cleanup in NSE. https://secwiki.org/w/Nmap/Code_Standards 2015-05-31 17:37:51 +00:00
henri 9dafb0fa05 smb-ls: do not report connection errors by default
Patch by Pierre LALET <pierre.lalet@cea.fr>
2015-04-30 17:58:34 +00:00
henri 4d0e7c9000 Script smb-ls can now use results from smb-enum-shares
- smb-ls parameter `path` is now optional (defaults to '\').

  - smb-ls parameter `maxdepth` now defaults to 1 (no recursion)
    instead of 0 (infinite recursion).

  - smb-ls has a new `shares` parameter to specify a comma-separated
    list of shares to browse.

  - smb-enum-shares adds found shares to an array in the host
    registry, and smb-ls uses this array when no `share` or `shares`
    parameter have been specified.

Patch by Pierre LALET <pierre.lalet@cea.fr>
2015-04-30 17:58:19 +00:00
dmiller ba5f207d94 Fix NSEdoc generation problems due to block ordering
Reported here: http://seclists.org/nmap-dev/2014/q2/258

Complicated parsing issue, but short version is this: The NSEdoc for
scripts must not be followed by a local declaration, or it will not be
accepted. Easiest way is to be sure the block with @usage, @output,
@args, @xmloutput, etc. comes right before the author line.
2014-05-21 19:06:50 +00:00
dmiller 078aa688c9 Reindent some scripts. Whitespace only.
https://secwiki.org/w/Nmap/Code_Standards
2014-01-31 16:37:27 +00:00
dmiller 620f9fdb34 Remove trailing whitespace in lua files
Whitespace is not significant, so this should not be a problem.
https://secwiki.org/w/Nmap/Code_Standards
2014-01-23 21:51:58 +00:00
fyodor f13353a610 Minor description updates (and sometimes just text reformatting) for some of the 85 new scripts(!) since Nmap 6.01 2012-11-15 23:05:31 +00:00
patrik 6f43ac38b2 SSL overhaul fixing OpenSSL related problems when SSL has not been compiled in
* replace require function calls with stndse.silent_require
* fixed a bug in nse_main that would fail creating scripts.db when a script
  fails to load
* reworked some code to provide limited functionality even though SSL is not
  present
2012-08-05 12:05:07 +00:00
patrik 71e26189f6 o [NSE] More Windows 7 and Windows 2008 fixes for the smb library and smb-ls
scripts. [Patrik Karlsson]
2012-06-10 22:40:02 +00:00
fyodor 60baeb09b0 Cleaning up the descriptions for 28 scripts for consistency 2012-06-06 20:44:18 +00:00
batrick be0af7b304 Add some missing library requires. Patch generated by
$ nse_check_globals --patch

with some modifications for format consistency.
2012-06-05 15:21:54 +00:00
david 877e574f25 Include the error code when smb-ls fails to authenticate. 2012-06-04 03:46:14 +00:00
patrik 0372cf9e7a o [NSE] Added the script smb-ls that lists files on SMB shares and produces
output similar to the dir command on Windows. [Patrik Karlsson]
2012-06-03 18:10:49 +00:00