mirror of
https://github.com/nmap/nmap.git
synced 2025-12-18 13:39:02 +00:00
Correct location of rules declaration.
This commit is contained in:
@@ -94,13 +94,13 @@ portrule = shortport.port_or_service(3306, "mysql")
|
|||||||
local TEMPLATE_NAME, ADMIN_ACCOUNTS = "", ""
|
local TEMPLATE_NAME, ADMIN_ACCOUNTS = "", ""
|
||||||
|
|
||||||
local function loadAuditRulebase( filename )
|
local function loadAuditRulebase( filename )
|
||||||
|
local rules = {}
|
||||||
|
|
||||||
local env = setmetatable({
|
local env = setmetatable({
|
||||||
test = function(t) table.insert(rules, t) end;
|
test = function(t) table.insert(rules, t) end;
|
||||||
}, {__index = _G})
|
}, {__index = _G})
|
||||||
|
|
||||||
local file, err = loadfile(filename, "t", env)
|
local file, err = loadfile(filename, "t", env)
|
||||||
local rules = {}
|
|
||||||
|
|
||||||
if ( not(file) ) then
|
if ( not(file) ) then
|
||||||
return false, ("ERROR: Failed to load rulebase:\n%s"):format(err)
|
return false, ("ERROR: Failed to load rulebase:\n%s"):format(err)
|
||||||
|
|||||||
Reference in New Issue
Block a user