mirror of
https://github.com/nmap/nmap.git
synced 2026-02-09 06:56:35 +00:00
Change hadoop/hbase portrules to match HTTP services.
This is so that these scripts can run for ports that -sV detects as http, but not when the port is a common HTTP port.
This commit is contained in:
@@ -29,7 +29,12 @@ categories = {"default", "discovery", "safe"}
|
||||
require ("shortport")
|
||||
require ("http")
|
||||
|
||||
portrule = shortport.port_or_service ({50075}, "hadoop-datanode", {"tcp"})
|
||||
portrule = function(host, port)
|
||||
-- Run for the special port number, or for any HTTP-like service that is
|
||||
-- not on a usual HTTP port.
|
||||
return shortport.port_or_service({50075}, "hadoop-datanode")(host, port)
|
||||
or (shortport.service(shortport.LIKELY_HTTP_SERVICES)(host, port) and not shortport.portnumber(shortport.LIKELY_HTTP_PORTS)(host, port))
|
||||
end
|
||||
|
||||
action = function( host, port )
|
||||
|
||||
|
||||
@@ -47,7 +47,12 @@ require ("shortport")
|
||||
require ("target")
|
||||
require ("http")
|
||||
|
||||
portrule = shortport.port_or_service ({50030}, "hadoop-jobtracker", {"tcp"})
|
||||
portrule = function(host, port)
|
||||
-- Run for the special port number, or for any HTTP-like service that is
|
||||
-- not on a usual HTTP port.
|
||||
return shortport.port_or_service ({50030}, "hadoop-jobtracker")(host, port)
|
||||
or (shortport.service(shortport.LIKELY_HTTP_SERVICES)(host, port) and not shortport.portnumber(shortport.LIKELY_HTTP_PORTS)(host, port))
|
||||
end
|
||||
|
||||
get_userhistory = function( host, port )
|
||||
local results = {}
|
||||
|
||||
@@ -47,7 +47,12 @@ require ("shortport")
|
||||
require ("target")
|
||||
require ("http")
|
||||
|
||||
portrule = shortport.port_or_service ({50070}, "hadoop-namenode", {"tcp"})
|
||||
portrule = function(host, port)
|
||||
-- Run for the special port number, or for any HTTP-like service that is
|
||||
-- not on a usual HTTP port.
|
||||
return shortport.port_or_service ({50070}, "hadoop-namenode")(host, port)
|
||||
or (shortport.service(shortport.LIKELY_HTTP_SERVICES)(host, port) and not shortport.portnumber(shortport.LIKELY_HTTP_PORTS)(host, port))
|
||||
end
|
||||
|
||||
get_datanodes = function( host, port, Status )
|
||||
local result = {}
|
||||
|
||||
@@ -43,7 +43,12 @@ require ("shortport")
|
||||
require ("target")
|
||||
require ("http")
|
||||
|
||||
portrule = shortport.port_or_service ({50090}, "hadoop-secondary-namenode", {"tcp"})
|
||||
portrule = function(host, port)
|
||||
-- Run for the special port number, or for any HTTP-like service that is
|
||||
-- not on a usual HTTP port.
|
||||
return shortport.port_or_service ({50090}, "hadoop-secondary-namenode")(host, port)
|
||||
or (shortport.service(shortport.LIKELY_HTTP_SERVICES)(host, port) and not shortport.portnumber(shortport.LIKELY_HTTP_PORTS)(host, port))
|
||||
end
|
||||
|
||||
action = function( host, port )
|
||||
|
||||
|
||||
@@ -33,7 +33,12 @@ categories = {"default", "discovery", "safe"}
|
||||
require ("shortport")
|
||||
require ("http")
|
||||
|
||||
portrule = shortport.port_or_service ({50060}, "hadoop-tasktracker", {"tcp"})
|
||||
portrule = function(host, port)
|
||||
-- Run for the special port number, or for any HTTP-like service that is
|
||||
-- not on a usual HTTP port.
|
||||
return shortport.port_or_service ({50060}, "hadoop-tasktracker")(host, port)
|
||||
or (shortport.service(shortport.LIKELY_HTTP_SERVICES)(host, port) and not shortport.portnumber(shortport.LIKELY_HTTP_PORTS)(host, port))
|
||||
end
|
||||
|
||||
action = function( host, port )
|
||||
|
||||
|
||||
@@ -44,7 +44,12 @@ require ("shortport")
|
||||
require ("http")
|
||||
require ("target")
|
||||
|
||||
portrule = shortport.port_or_service ({60010}, "hbase-master", {"tcp"})
|
||||
portrule = function(host, port)
|
||||
-- Run for the special port number, or for any HTTP-like service that is
|
||||
-- not on a usual HTTP port.
|
||||
return shortport.port_or_service ({60010}, "hbase-master")(host, port)
|
||||
or (shortport.service(shortport.LIKELY_HTTP_SERVICES)(host, port) and not shortport.portnumber(shortport.LIKELY_HTTP_PORTS)(host, port))
|
||||
end
|
||||
|
||||
action = function( host, port )
|
||||
|
||||
|
||||
@@ -38,7 +38,12 @@ require ("shortport")
|
||||
require ("http")
|
||||
require ("target")
|
||||
|
||||
portrule = shortport.port_or_service ({60030}, "hbase-region", {"tcp"})
|
||||
portrule = function(host, port)
|
||||
-- Run for the special port number, or for any HTTP-like service that is
|
||||
-- not on a usual HTTP port.
|
||||
return shortport.port_or_service ({60030}, "hbase-region")(host, port)
|
||||
or (shortport.service(shortport.LIKELY_HTTP_SERVICES)(host, port) and not shortport.portnumber(shortport.LIKELY_HTTP_PORTS)(host, port))
|
||||
end
|
||||
|
||||
action = function( host, port )
|
||||
|
||||
|
||||
Reference in New Issue
Block a user