mirror of
https://github.com/nmap/nmap.git
synced 2025-12-27 01:49:03 +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 )
|
||||
|
||||
|
||||
Reference in New Issue
Block a user