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:
@@ -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"})
|
||||
|
||||
Reference in New Issue
Block a user