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:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user