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