Skip to content

Commit b7c231b

Browse files
committed
further normalize transport config
1 parent bb5ea54 commit b7c231b

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

lib/msf/core/payload/python/meterpreter_loader.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,6 @@ def stage_meterpreter(opts={})
119119

120120
callback_url = "#{scheme}://#{lhost}:#{lport}#{ds['LURI']}#{uri}/"
121121

122-
$stderr.puts callback_url
123-
124122
# patch in the various payload related configuration
125123
met.sub!('HTTP_CONNECTION_URL = None', "HTTP_CONNECTION_URL = '#{var_escape.call(callback_url)}'")
126124
met.sub!('HTTP_USER_AGENT = None', "HTTP_USER_AGENT = '#{var_escape.call(http_user_agent)}'") if http_user_agent.to_s != ''

lib/msf/core/payload/transport_config.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ def transport_config_bind_tcp(opts={})
3737
def transport_config_reverse_https(opts={})
3838
ds = opts[:datastore] || datastore
3939
config = transport_config_reverse_http(opts)
40-
config[:scheme] = 'https'
41-
if ds['OverrideRequestHost']
42-
config[:scheme] = ds['OverrideScheme'] || config[:scheme]
43-
end
4440
config[:ssl_cert_hash] = get_ssl_cert_hash(ds['StagerVerifySSLCert'],
4541
ds['HandlerSSLCert'])
4642
config
@@ -59,7 +55,7 @@ def transport_config_reverse_http(opts={})
5955

6056
ds = opts[:datastore] || datastore
6157

62-
scheme = 'http'
58+
scheme = opts[:url].to_s.split(':')[0]
6359
lhost = ds['LHOST']
6460
lport = ds['LPORT']
6561
if ds['OverrideRequestHost']

0 commit comments

Comments
 (0)