mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
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
This commit is contained in:
@@ -193,7 +193,7 @@ action = function(host)
|
||||
-- remove leading slash
|
||||
arg_path = ( arg_path:sub(1,2) == '\\' and arg_path:sub(2) or arg_path )
|
||||
|
||||
local options = {}
|
||||
local options = {maxfiles = ls.config('maxfiles')}
|
||||
local depth, path, dirs = 0, arg_path, {}
|
||||
local file_count, dir_count, total_bytes = 0, 0, 0
|
||||
local continue = true
|
||||
|
||||
Reference in New Issue
Block a user