1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-27 18:09:01 +00:00

Add http-alt and https-alt to the services handled by html-title.nse

Modified http.request() to connect using ssl for the https-alt service.
html-title.nse can now deal with a redirect which changes the url scheme
as long as a port is present in the url and it is the port being scanned.
This commit is contained in:
jah
2008-11-17 22:06:58 +00:00
parent 5464198f6b
commit fece92c4f7
2 changed files with 24 additions and 19 deletions

View File

@@ -105,8 +105,9 @@ end
-- host table passed to a portrule or hostrule. The second argument is either
-- the port number or a table like the port table passed to a portrule or
-- hostrule. SSL is used for the request if <code>port.service</code> is
-- <code>"https"</code> or <code>port.version.service_tunnel</code> is
-- <code>"ssl"</code>. The third argument is the request. The fourth argument is
-- <code>"https"</code> or <code>"https-alt"</code> or
-- <code>port.version.service_tunnel</code> is <code>"ssl"</code>.
-- The third argument is the request. The fourth argument is
-- a table for further options.
-- @param host The host to query.
-- @param port The port on the host.
@@ -127,7 +128,7 @@ request = function( host, port, data, options )
stdnse.print_debug(1, "http.request() supports the TCP protocol only, your request to %s cannot be completed.", host)
return nil
end
if port.service == 'https' or ( port.version and port.version.service_tunnel == 'ssl' ) then
if port.service == 'https' or port.service == 'https-alt' or ( port.version and port.version.service_tunnel == 'ssl' ) then
protocol = 'ssl'
end
port = port.number