1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-26 17:39:03 +00:00

Added a more useful error message when the script database is corrupt or

out of date. Here is an example:

NSE: failed to initialize the script engine:
./nse_main.lua:289: database appears to be corrupt or out of date;
        please update using: nmap --script-updatedb
This commit is contained in:
batrick
2009-04-29 10:16:27 +00:00
parent 9292eaef8a
commit 3a06a43a24

View File

@@ -286,7 +286,9 @@ local function get_chosen_scripts (rules)
assert(cnse.updatedb(), "could not update script database!");
t, path = assert(cnse.fetchfile_absolute(script_dbpath));
end
local db_closure = assert(loadfile(path));
local db_closure = assert(loadfile(path),
"database appears to be corrupt or out of date;\n"..
"\tplease update using: nmap --script-updatedb");
local chosen_scripts, entry_rules, files_loaded = {}, {}, {};