File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
lib/msf/core/payload/windows Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ def generate(opts={})
37
37
38
38
# Add extra options if we have enough space
39
39
if self . available_space && required_space <= self . available_space
40
- conf [ :uri ] = generate_uri
40
+ conf [ :uri ] = luri + generate_uri
41
41
conf [ :exitfunk ] = datastore [ 'EXITFUNC' ]
42
42
conf [ :verify_cert_hash ] = opts [ :verify_cert_hash ]
43
43
conf [ :proxy_host ] = datastore [ 'PayloadProxyHost' ]
@@ -49,7 +49,7 @@ def generate(opts={})
49
49
conf [ :proxy_ie ] = datastore [ 'PayloadProxyIE' ]
50
50
else
51
51
# Otherwise default to small URIs
52
- conf [ :uri ] = generate_small_uri
52
+ conf [ :uri ] = luri + generate_small_uri
53
53
end
54
54
55
55
generate_reverse_winhttp ( conf )
@@ -139,7 +139,7 @@ def asm_reverse_winhttp(opts={})
139
139
full_url << opts [ :uri ]
140
140
141
141
encoded_full_url = asm_generate_wchar_array ( full_url )
142
- encoded_uri_index = full_url . rindex ( '/' ) * 2
142
+ encoded_uri_index = ( full_url . length - opts [ :uri ] . length ) * 2
143
143
144
144
if opts [ :ssl ] && opts [ :verify_cert_hash ]
145
145
verify_ssl = true
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ def generate(opts={})
38
38
39
39
# Add extra options if we have enough space
40
40
if self . available_space && required_space <= self . available_space
41
- conf [ :uri ] = generate_uri
41
+ conf [ :uri ] = luri + generate_uri
42
42
conf [ :exitfunk ] = datastore [ 'EXITFUNC' ]
43
43
conf [ :verify_cert_hash ] = opts [ :verify_cert_hash ]
44
44
conf [ :proxy_host ] = datastore [ 'PayloadProxyHost' ]
@@ -50,7 +50,7 @@ def generate(opts={})
50
50
conf [ :proxy_ie ] = datastore [ 'PayloadProxyIE' ]
51
51
else
52
52
# Otherwise default to small URIs
53
- conf [ :uri ] = generate_small_uri
53
+ conf [ :uri ] = luri + generate_small_uri
54
54
end
55
55
56
56
generate_reverse_winhttp ( conf )
@@ -141,7 +141,7 @@ def asm_reverse_winhttp(opts={})
141
141
full_url << opts [ :uri ]
142
142
143
143
encoded_full_url = asm_generate_wchar_array ( full_url )
144
- encoded_uri_index = full_url . rindex ( '/' ) * 2
144
+ encoded_uri_index = ( full_url . length - opts [ :uri ] . length ) * 2
145
145
146
146
if opts [ :ssl ] && opts [ :verify_cert_hash ]
147
147
verify_ssl = true
You can’t perform that action at this time.
0 commit comments