mirror of
https://github.com/nmap/nmap.git
synced 2026-06-19 23:17:48 +00:00
Add a new function, shortport.http, that will be used as the portrule
for HTTP scripts.
This commit is contained in:
parent
123b018c9c
commit
fbe60bdcc9
1 changed files with 14 additions and 0 deletions
|
|
@ -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"})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue