1
0
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:
nnposter
2019-12-19 20:16:23 +00:00
parent 6998bfca49
commit ccdb816552

View File

@@ -145,7 +145,7 @@ local function list_files(host, share, smbstate, path, options, output, maxdepth
if not continue then
return false
end
if is_dir(fe) then
if is_dir(fe) and not (fe.fname == "." or fe.fname == "..") then
continue = true
if maxdepth > 0 then
continue = list_files(host, share, smbstate,