mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 13:11:28 +00:00
Use shortport.http where appropriate.
This commit is contained in:
@@ -31,20 +31,7 @@ categories = {"discovery", "safe"}
|
||||
require "shortport"
|
||||
require "http"
|
||||
|
||||
portrule = function(host, port)
|
||||
local svc = { std = { ["http"] = 1, ["http-alt"] = 1 },
|
||||
ssl = { ["https"] = 1, ["https-alt"] = 1 } }
|
||||
if port.protocol ~= 'tcp'
|
||||
or not ( svc.std[port.service] or svc.ssl[port.service] ) then
|
||||
return false
|
||||
end
|
||||
-- Don't bother running on SSL ports if we don't have SSL.
|
||||
if (svc.ssl[port.service] or port.version.service_tunnel == 'ssl')
|
||||
and not nmap.have_ssl() then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end
|
||||
portrule = shortport.http
|
||||
|
||||
action = function(host, port)
|
||||
local path = nmap.registry.args.path
|
||||
|
||||
Reference in New Issue
Block a user