1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-15 20:29:03 +00:00

Correct location of rules declaration.

This commit is contained in:
batrick
2012-06-06 21:29:48 +00:00
parent a20ea34d38
commit 1ac2728821

View File

@@ -94,13 +94,13 @@ portrule = shortport.port_or_service(3306, "mysql")
local TEMPLATE_NAME, ADMIN_ACCOUNTS = "", ""
local function loadAuditRulebase( filename )
local rules = {}
local env = setmetatable({
test = function(t) table.insert(rules, t) end;
}, {__index = _G})
local file, err = loadfile(filename, "t", env)
local rules = {}
if ( not(file) ) then
return false, ("ERROR: Failed to load rulebase:\n%s"):format(err)