diff --git a/lib/msf/core/exploit/java.rb b/lib/msf/core/exploit/java.rb index c29a7f16ea..e5aee237fb 100644 --- a/lib/msf/core/exploit/java.rb +++ b/lib/msf/core/exploit/java.rb @@ -118,21 +118,9 @@ module Exploit::Java def sign_jar(cert_cn, unsiged_jar, signed_jar, cert_alias="signFiles", msf_keystore="msfkeystore", msf_store_pass="msfstorepass", msf_key_pass="msfkeypass") - # The regular versions of KeyTool and JarSigner call System.exit() after functions complete. - # While this is find for a standalone tool, it will kill the JVM and MSF at the same time. - # To fix this, I obtained the open source version of these two tools and removed the calls to - # .exit. This temporarily fixes the problem, but relies on various unpublished APIs in sun.*, - # which may not work the same way accross different versions of the JDK. - # - # JDK6 is required for use of the compiler functions anyway, so this is probably not a huge deal - # right now, but long term, this functionality may be lost in future versions. - # - # Custom Keytool and JarSigner are stored in javaCompile.jar # Dependent on $JAVA_HOME/lib/tools.jar that comes with the JDK. keytool_klass = Rjb::import('sun.security.tools.KeyTool') jarsigner_klass = Rjb::import('sun.security.tools.JarSigner') - #keytool = keytool_klass - #jarsigner = jarsigner_klass # Check if the keystore exists from previous run. If it does, delete it. msf_keystore = File.join(datastore['JAVACACHE'], msf_keystore)