Hide RPORT more intelligently
parent
e76b53c5d1
commit
b06895b604
|
@ -465,8 +465,15 @@ module Exploit::Remote::HttpClient
|
|||
# Returns the complete URI as string including the scheme, port and host
|
||||
def full_uri(custom_uri = nil)
|
||||
uri_scheme = ssl ? 'https' : 'http'
|
||||
uri_port = rport.to_s == '80' ? '' : ":#{rport}"
|
||||
|
||||
if (rport == 80 && !ssl) || (rport == 443 && ssl)
|
||||
uri_port = ''
|
||||
else
|
||||
uri_port = ":#{rport}"
|
||||
end
|
||||
|
||||
uri = normalize_uri(custom_uri || target_uri.to_s)
|
||||
|
||||
"#{uri_scheme}://#{rhost}#{uri_port}#{uri}"
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue