mirror of
https://github.com/nmap/nmap.git
synced 2025-12-26 09:29:01 +00:00
Fixed bug that would result in the stun-version script incorrectly reporting
the stun port as open when the stun service would not respond to the service probe and the port was reported as open|filtered.
This commit is contained in:
@@ -352,6 +352,10 @@ Helper = {
|
||||
end
|
||||
end
|
||||
|
||||
if ( not(result) and not(self.cache) ) then
|
||||
return false, "Server returned no response"
|
||||
end
|
||||
|
||||
return status, result
|
||||
end,
|
||||
|
||||
@@ -359,9 +363,14 @@ Helper = {
|
||||
-- @return status true on success, false on failure
|
||||
-- @return version string containing the server product and version
|
||||
getVersion = function(self)
|
||||
local status, response = false, nil
|
||||
-- check if the server version was cached
|
||||
if ( not(self.cache) or not(self.cache.version) ) then
|
||||
self:getExternalAddress()
|
||||
local status, response = self:getExternalAddress()
|
||||
if ( status ) then
|
||||
return true, (self.cache and self.cache.server or "")
|
||||
end
|
||||
return false, response
|
||||
end
|
||||
return true, (self.cache and self.cache.server or "")
|
||||
end,
|
||||
|
||||
Reference in New Issue
Block a user