GSoC/Meterpreter_Web_Console
scriptjunkie 2018-04-06 11:06:52 -05:00
parent 81c78a51c2
commit c303859c11
1 changed files with 10 additions and 3 deletions

View File

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