Land #11485, VHOST support for full_uri
parent
6c3877d5ed
commit
829e274d0d
|
@ -480,7 +480,7 @@ module Exploit::Remote::HttpClient
|
|||
end
|
||||
|
||||
# Returns the complete URI as string including the scheme, port and host
|
||||
def full_uri(custom_uri = nil)
|
||||
def full_uri(custom_uri = nil, vhost_uri: false)
|
||||
uri_scheme = ssl ? 'https' : 'http'
|
||||
|
||||
if (rport == 80 && !ssl) || (rport == 443 && ssl)
|
||||
|
@ -491,7 +491,9 @@ module Exploit::Remote::HttpClient
|
|||
|
||||
uri = normalize_uri(custom_uri || target_uri.to_s)
|
||||
|
||||
if Rex::Socket.is_ipv6?(rhost)
|
||||
if vhost_uri && datastore['VHOST']
|
||||
uri_host = datastore['VHOST']
|
||||
elsif Rex::Socket.is_ipv6?(rhost)
|
||||
uri_host = "[#{rhost}]"
|
||||
else
|
||||
uri_host = rhost
|
||||
|
|
Loading…
Reference in New Issue