1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-07 21:21:31 +00:00

Finish applying patch from #1158

This commit is contained in:
dmiller
2018-04-10 03:18:50 +00:00
parent 99e69ecae5
commit 87794c45ce
2 changed files with 7 additions and 4 deletions

View File

@@ -231,7 +231,7 @@ action = function(host, port)
local results = stdnse.output_table()
local all_match = {} -- a table that stores all matches. used to eliminate duplicates.
-- check if builtin arugment is a table or a single value
-- check if builtin argument is a table or a single value
if builtins and builtins == 1 then
for name, patterns in pairs(BUILT_IN_PATTERNS) do
to_be_searched[name] = {}
@@ -257,14 +257,15 @@ action = function(host, port)
end
end
-- check if match arugment is a table or a single value
-- check if match argument is a table or a single value
if match and type(match) ~= 'table' then
to_be_searched['User Pattern 1'] = {}
table.insert(to_be_searched['User Pattern 1'], match)
elseif type(match) == 'table' then
for i, pattern in pairs(match) do
to_be_searched['User Pattern ' .. tostring(i)] = {}
table.insert(to_be_searched['User Pattern ' .. tostring(i)], pattern)
local k = 'User Pattern ' .. tostring(i)
to_be_searched[k] = {}
table.insert(to_be_searched[k], pattern)
end
end