1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-09 16:09:03 +00:00

Add a new function, shortport.http, that will be used as the portrule

for HTTP scripts.
This commit is contained in:
david
2010-08-09 22:23:43 +00:00
parent 123b018c9c
commit fbe60bdcc9

View File

@@ -150,3 +150,17 @@ version_port_or_service = function(ports, services, protos, states)
and not(port_is_excluded(port.number, port.protocol))
end
end
---
-- A portrule that matches likely HTTP services.
--
-- @name http
-- @class function
-- @param host The host table to match against.
-- @param port The port table to match against.
-- @return <code>true</code> if the port is likely to be HTTP,
-- <code>false</code> otherwise.
-- @usage
-- portrule = shortport.http
http = shortport.port_or_service({80, 443, 631, 3872, 8080},
{"http", "https", "ipp", "http-alt", "oem-agent"})