1
0
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:
david
2012-01-14 01:03:17 +00:00
parent a2e693fb24
commit 86c042302f
7 changed files with 42 additions and 7 deletions

View File

@@ -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 )