diff --git a/scripts/nfs-ls.nse b/scripts/nfs-ls.nse index de441ee17..ae68aebed 100644 --- a/scripts/nfs-ls.nse +++ b/scripts/nfs-ls.nse @@ -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 diff --git a/scripts/nfs-showmount.nse b/scripts/nfs-showmount.nse index a50f5c2ef..f5953dc4e 100644 --- a/scripts/nfs-showmount.nse +++ b/scripts/nfs-showmount.nse @@ -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 diff --git a/scripts/nfs-statfs.nse b/scripts/nfs-statfs.nse index 6c2edf629..1337d34ae 100644 --- a/scripts/nfs-statfs.nse +++ b/scripts/nfs-statfs.nse @@ -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