1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-09 22:21:29 +00:00

Make version scripts (with non shortport portrules) obey nmap.version_intensity() >= 7

This commit is contained in:
jay
2014-07-30 07:12:50 +00:00
parent 61d13e12d2
commit d93a78f502
7 changed files with 10 additions and 5 deletions

View File

@@ -30,7 +30,7 @@ portrule = function(host, port)
if type(port.version) == "table" and (port.version.name_confidence > 3 or port.version.product ~= nil) then
return false
end
return shortport.http(host,port)
return (shortport.http(host,port) and nmap.version_intensity() >= 7)
end
action = function(host, port)

View File

@@ -28,6 +28,7 @@ portrule = function(host, port)
return port.service == "tcpwrapped"
and port.protocol == "tcp" and port.state == "open"
and not(shortport.port_is_excluded(port.number,port.protocol))
and nmap.version_intensity() >= 7
end
action = function(host, port)

View File

@@ -31,10 +31,12 @@ local string = require "string"
portrule = function(host, port)
if port.version ~= nil and port.version.product ~= nil then
return (port.version.product:find("[eE][pP]olicy Orch")
return ((port.version.product:find("[eE][pP]olicy Orch")
or port.version.product:find("[eE]PO [aA]gent"))
and nmap.version_intensity() >= 7)
else
return (port.number == 8081 and port.protocol == "tcp")
return ((port.number == 8081 and port.protocol == "tcp")
and nmap.version_intensity() >= 7)
end
end

View File

@@ -74,6 +74,7 @@ function portrule(host, port)
and port.protocol == 'udp'
and ((26000 <= port.number and port.number <= 26004)
or port.service == 'quake')
and nmap.version_intensity() >= 7
end

View File

@@ -52,7 +52,7 @@ portrule = function(host, port)
-- different than rpcbind.
return false
end
return true
return nmap.version_intensity() >= 7
end
--- Function that determines if the target port of host uses RPC protocol.

View File

@@ -24,6 +24,7 @@ portrule = function(host, port)
and port.protocol == "tcp" and port.state == "open"
and port.version.name_confidence < 10
and not(shortport.port_is_excluded(port.number,port.protocol))
and nmap.version_intensity() >= 7
end
action = function(host, port)

View File

@@ -10,7 +10,7 @@ categories = {"default","safe","discovery","version"}
portrule = function(host, port)
if type(port.version) == "table" and port.version.name_confidence > 3 and port.version.product ~= nil then
return string.find(port.version.product, "WebLogic", 1, true)
return string.find(port.version.product, "WebLogic", 1, true) and nmap.version_intensity() >= 7
end
return shortport.version_port_or_service({7001,7002,7003},"http")(host,port)
end