1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-30 11:29:01 +00:00

Require trailing '/' to match a directory name with --script. See #2051

This commit is contained in:
dmiller
2020-08-28 15:06:10 +00:00
parent 8417aa5576
commit a0b05c0f4f
4 changed files with 14 additions and 6 deletions

View File

@@ -817,6 +817,8 @@ local function get_chosen_scripts (rules)
if not (cnse.scriptversion and rule == "version") then
error("'"..rule.."' did not match a category, filename, or directory");
end
elseif t == "bare_directory" then
error("directory '"..path.."' found, but will not match without '/'")
elseif t == "file" and not files_loaded[path] then
script_params.selection = "file path";
script_params.verbosity = true;