Skip to content

Commit 0321000

Browse files
committed
Update Http mixin for opts[:ssl]
1. Add opts[:ssl] 2. Remove opts[:busybox] 3. Refactor logic 4. Remove resource_uri
1 parent 34d358b commit 0321000

File tree

1 file changed

+4
-15
lines changed
  • lib/msf/core/exploit/cmdstager

1 file changed

+4
-15
lines changed

lib/msf/core/exploit/cmdstager/http.rb

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,17 @@ def initialize(info = {})
1515
end
1616

1717
def start_service(opts = {})
18-
if opts[:busybox] && (ssl = datastore['SSL'])
19-
datastore['SSL'] = false
20-
end
18+
datastore_ssl = datastore['SSL']
19+
datastore['SSL'] = !!opts[:ssl]
2120

2221
super
23-
payload_uri = get_uri
2422

25-
if ssl
26-
datastore['SSL'] = true
27-
end
23+
payload_uri = get_uri
24+
datastore['SSL'] = datastore_ssl
2825

2926
payload_uri
3027
end
3128

32-
def resource_uri
33-
if (datastore['URIPATH'] || '').end_with?(?/)
34-
random_uri
35-
else
36-
super
37-
end
38-
end
39-
4029
def on_request_uri(cli, request)
4130
if request['User-Agent'] =~ /^(?:Wget|curl)/
4231
send_response(cli, exe)

0 commit comments

Comments
 (0)