1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Use shortport.http where appropriate.

This commit is contained in:
david
2010-08-09 22:30:50 +00:00
parent fbe60bdcc9
commit a9b75892f5
13 changed files with 17 additions and 81 deletions

View File

@@ -29,27 +29,13 @@ CVE-2001-1013: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2001-1013.
-- |_ apache-userdir-enum: Potential Users: root (403), user (200), test (200)
local http = require 'http'
local shortport = require 'shortport'
local stdnse = require 'stdnse'
local datafiles = require 'datafiles'
---
-- The script will run against http[s] and http[s]-alt tcp ports.
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