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
if opts[:url]
u = URI(opts[:url])
scheme = u.scheme
lhost = u.host
lport = u.port
else
scheme = opts[:scheme] scheme = opts[:scheme]
lhost = ds['LHOST'] lhost = ds['LHOST']
lport = ds['LPORT'] 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