mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Avoid traversing dot and dot-dot directories
This commit is contained in:
@@ -145,7 +145,7 @@ local function list_files(host, share, smbstate, path, options, output, maxdepth
|
|||||||
if not continue then
|
if not continue then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
if is_dir(fe) then
|
if is_dir(fe) and not (fe.fname == "." or fe.fname == "..") then
|
||||||
continue = true
|
continue = true
|
||||||
if maxdepth > 0 then
|
if maxdepth > 0 then
|
||||||
continue = list_files(host, share, smbstate,
|
continue = list_files(host, share, smbstate,
|
||||||
|
|||||||
Reference in New Issue
Block a user