mirror of
https://github.com/nmap/nmap.git
synced 2025-12-12 18:59:03 +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
|
if type(port.version) == "table" and (port.version.name_confidence > 3 or port.version.product ~= nil) then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
return shortport.http(host,port)
|
return (shortport.http(host,port) and nmap.version_intensity() >= 7)
|
||||||
end
|
end
|
||||||
|
|
||||||
action = function(host, port)
|
action = function(host, port)
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ portrule = function(host, port)
|
|||||||
return port.service == "tcpwrapped"
|
return port.service == "tcpwrapped"
|
||||||
and port.protocol == "tcp" and port.state == "open"
|
and port.protocol == "tcp" and port.state == "open"
|
||||||
and not(shortport.port_is_excluded(port.number,port.protocol))
|
and not(shortport.port_is_excluded(port.number,port.protocol))
|
||||||
|
and nmap.version_intensity() >= 7
|
||||||
end
|
end
|
||||||
|
|
||||||
action = function(host, port)
|
action = function(host, port)
|
||||||
|
|||||||
@@ -31,10 +31,12 @@ local string = require "string"
|
|||||||
|
|
||||||
portrule = function(host, port)
|
portrule = function(host, port)
|
||||||
if port.version ~= nil and port.version.product ~= nil then
|
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"))
|
or port.version.product:find("[eE]PO [aA]gent"))
|
||||||
|
and nmap.version_intensity() >= 7)
|
||||||
else
|
else
|
||||||
return (port.number == 8081 and port.protocol == "tcp")
|
return ((port.number == 8081 and port.protocol == "tcp")
|
||||||
|
and nmap.version_intensity() >= 7)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ function portrule(host, port)
|
|||||||
and port.protocol == 'udp'
|
and port.protocol == 'udp'
|
||||||
and ((26000 <= port.number and port.number <= 26004)
|
and ((26000 <= port.number and port.number <= 26004)
|
||||||
or port.service == 'quake')
|
or port.service == 'quake')
|
||||||
|
and nmap.version_intensity() >= 7
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ portrule = function(host, port)
|
|||||||
-- different than rpcbind.
|
-- different than rpcbind.
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
return true
|
return nmap.version_intensity() >= 7
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Function that determines if the target port of host uses RPC protocol.
|
--- 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.protocol == "tcp" and port.state == "open"
|
||||||
and port.version.name_confidence < 10
|
and port.version.name_confidence < 10
|
||||||
and not(shortport.port_is_excluded(port.number,port.protocol))
|
and not(shortport.port_is_excluded(port.number,port.protocol))
|
||||||
|
and nmap.version_intensity() >= 7
|
||||||
end
|
end
|
||||||
|
|
||||||
action = function(host, port)
|
action = function(host, port)
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ categories = {"default","safe","discovery","version"}
|
|||||||
|
|
||||||
portrule = function(host, port)
|
portrule = function(host, port)
|
||||||
if type(port.version) == "table" and port.version.name_confidence > 3 and port.version.product ~= nil then
|
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
|
end
|
||||||
return shortport.version_port_or_service({7001,7002,7003},"http")(host,port)
|
return shortport.version_port_or_service({7001,7002,7003},"http")(host,port)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user