mirror of
https://github.com/nmap/nmap.git
synced 2026-08-03 22:29:06 +00:00
Provide a default {} value for script categories.
This is so I don't have to write
categories = {}
when writing test scripts.
This commit is contained in:
parent
fdac9750a1
commit
676de05f7f
1 changed files with 2 additions and 0 deletions
|
|
@ -418,6 +418,7 @@ do
|
|||
return nil;
|
||||
end
|
||||
|
||||
-- Script.new provides defaults for some of these.
|
||||
local required_fields = {
|
||||
action = "function",
|
||||
categories = "table",
|
||||
|
|
@ -469,6 +470,7 @@ do
|
|||
local env = {
|
||||
SCRIPT_PATH = filename,
|
||||
SCRIPT_NAME = short_basename,
|
||||
categories = {},
|
||||
dependencies = {},
|
||||
};
|
||||
setmetatable(env, {__index = _G});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue