diff --git a/scripts/smb-ls.nse b/scripts/smb-ls.nse index a6fdfa884..478ab71ca 100644 --- a/scripts/smb-ls.nse +++ b/scripts/smb-ls.nse @@ -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,