java_jmx_scanner: Incorporate @bcoles suggestions

GSoC/Meterpreter_Web_Console
asoto-r7 2018-12-19 12:56:53 -06:00
parent 51ce96a2b4
commit 50b7d93a18
No known key found for this signature in database
GPG Key ID: F531810B7FE55396
1 changed files with 12 additions and 19 deletions

View File

@ -117,25 +117,18 @@ class MetasploitModule < Msf::Auxiliary
end
def handshake(mbean)
begin
opts = {
object_number: mbean[:object_number],
uid_number: mbean[:uid].number,
uid_time: mbean[:uid].time,
uid_count: mbean[:uid].count
}
ref = send_new_client(opts)
rescue ::Rex::Proto::Rmi::Exception => e
vprint_error("JMXRMI discovery raised an exception of type #{e.message}")
if e.message == "java.lang.SecurityException"
return false
else
return nil
end
opts = {
object_number: mbean[:object_number],
uid_number: mbean[:uid].number,
uid_time: mbean[:uid].time,
uid_count: mbean[:uid].count
}
send_new_client(opts)
rescue ::Rex::Proto::Rmi::Exception => e
vprint_error("JMXRMI discovery raised an exception of type #{e.message}")
if e.message == 'java.lang.SecurityException'
return false
end
ref
return nil
end
end