mirror of
https://github.com/nmap/nmap.git
synced 2026-05-13 08:46:45 +00:00
Avoid erroring when -sV but scripts directory is missing or modified
This commit is contained in:
parent
488437f57d
commit
78a526761b
1 changed files with 4 additions and 1 deletions
|
|
@ -818,7 +818,10 @@ local function get_chosen_scripts (rules)
|
|||
t, path = cnse.fetchscript(rule..".nse");
|
||||
end
|
||||
if t == nil then
|
||||
error("'"..rule.."' did not match a category, filename, or directory");
|
||||
-- Avoid erroring if -sV but no scripts are present
|
||||
if not (cnse.scriptversion and rule == "version") then
|
||||
error("'"..rule.."' did not match a category, filename, or directory");
|
||||
end
|
||||
elseif t == "file" and not files_loaded[path] then
|
||||
script_params.selection = "file path";
|
||||
script_params.verbosity = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue