mirror of
https://github.com/nmap/nmap.git
synced 2026-02-12 16:36:34 +00:00
Fix Lua patterns that contain -
"-" in a Lua pattern means "ungreedy zero-or-more" and must be escaped to match a literal "-". http://www.lua.org/manual/5.2/manual.html#6.4.1
This commit is contained in:
@@ -114,7 +114,7 @@ hostrule = function(host)
|
||||
end
|
||||
if nfsport == nil then return false end
|
||||
if host.registry.nfs.nfsver == nil then
|
||||
local low, high = string.match(nfsport.version.version, "(%d)-(%d)")
|
||||
local low, high = string.match(nfsport.version.version, "(%d)%-(%d)")
|
||||
if high == nil then
|
||||
high = tonumber(nfsport.version.version)
|
||||
if high == 4 then
|
||||
@@ -132,7 +132,7 @@ hostrule = function(host)
|
||||
end
|
||||
if mountport == nil then return false end
|
||||
if host.registry.nfs.mountver == nil then
|
||||
local low, high = string.match(mountport.version.version, "(%d)-(%d)")
|
||||
local low, high = string.match(mountport.version.version, "(%d)%-(%d)")
|
||||
if high == nil then
|
||||
host.registry.nfs.mountver = tonumber(mountport.version.version)
|
||||
else
|
||||
|
||||
@@ -45,7 +45,7 @@ local function get_exports(host, port)
|
||||
host.registry.nfs = {}
|
||||
end
|
||||
if mountver == nil then
|
||||
local low, high = string.match(port.version.version, "(%d)-(%d)")
|
||||
local low, high = string.match(port.version.version, "(%d)%-(%d)")
|
||||
if high == nil then
|
||||
mountver = tonumber(port.version.version)
|
||||
else
|
||||
|
||||
@@ -67,7 +67,7 @@ hostrule = function(host)
|
||||
end
|
||||
if nfsport == nil then return false end
|
||||
if host.registry.nfs.nfsver == nil then
|
||||
local low, high = string.match(nfsport.version.version, "(%d)-(%d)")
|
||||
local low, high = string.match(nfsport.version.version, "(%d)%-(%d)")
|
||||
if high == nil then
|
||||
high = tonumber(nfsport.version.version)
|
||||
if high == 4 then
|
||||
@@ -85,7 +85,7 @@ hostrule = function(host)
|
||||
end
|
||||
if mountport == nil then return false end
|
||||
if host.registry.nfs.mountver == nil then
|
||||
local low, high = string.match(mountport.version.version, "(%d)-(%d)")
|
||||
local low, high = string.match(mountport.version.version, "(%d)%-(%d)")
|
||||
if high == nil then
|
||||
host.registry.nfs.mountver = tonumber(mountport.version.version)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user