Land #9828, fix reverse HTTP/S listeners for the wildcard address

4.x
Brent Cook 2018-04-06 16:06:51 -05:00 committed by Metasploit
parent 62c6340d70
commit fcafc54db1
No known key found for this signature in database
GPG Key ID: CDFB5FA52007B954
1 changed files with 10 additions and 3 deletions

View File

@ -51,9 +51,16 @@ module Msf::Payload::TransportConfig
def transport_uri_components(opts={})
ds = opts[:datastore] || datastore
scheme = opts[:scheme]
lhost = ds['LHOST']
lport = ds['LPORT']
if opts[:url]
u = URI(opts[:url])
scheme = u.scheme
lhost = u.host
lport = u.port
else
scheme = opts[:scheme]
lhost = ds['LHOST']
lport = ds['LPORT']
end
if ds['OverrideRequestHost']
scheme = ds['OverrideScheme'] || scheme
lhost = ds['OverrideLHOST'] || lhost