mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 13:11:28 +00:00
Fix crash when field doesn't exist. Closes #306
This commit is contained in:
@@ -240,7 +240,8 @@ local detect_form = function (host, port, path, hostname)
|
|||||||
local match = true
|
local match = true
|
||||||
-- first check the 'match' table and be sure all values match
|
-- first check the 'match' table and be sure all values match
|
||||||
for k, v in pairs(val.match) do
|
for k, v in pairs(val.match) do
|
||||||
match = match and string.match(form[k], v)
|
-- ensure that corresponding field exists in form table also
|
||||||
|
match = match and form[k] and string.match(form[k], v)
|
||||||
end
|
end
|
||||||
-- then check that uservar and passvar are in this form
|
-- then check that uservar and passvar are in this form
|
||||||
if match then
|
if match then
|
||||||
|
|||||||
Reference in New Issue
Block a user