Woops, forgot to push the updated mixin.

git-svn-id: file:///home/svn/framework3/trunk@8560 4d416f70-5f16-0410-b530-b9f4589650da
unstable
natron 2010-02-19 06:06:30 +00:00
parent 1a53411282
commit 474228a132
1 changed files with 19 additions and 1 deletions

View File

@ -6,7 +6,7 @@
# Dependencies:
# - JDK6
# - rjb (rjb.rubyforge.org)
# - the $JAVA_HOME variable must point to the JDK
# - the $JAVA_HOME variable must point to the JDK
#
# Nathan Keltner <natron@metasploit.com>
#
@ -58,6 +58,24 @@ module Exploit::Java
return @jvmInit
end
def save_to_file(classnames, codez, location)
path = File.join( Msf::Config.install_root, "external", "source", location )
if not File.exists? path
Dir.mkdir(path)
end
i = 0
classnames.each { |fil|
file = File.join( path, fil + ".java")
fp = File.open( file, "w" )
print_status "Writing #{fil} to " + file
fp.puts codez[i]
i += 1
fp.close
}
end
def compile(classnames, codez, compile_options=nil)
if !@rjb_loaded or !@jvm_init
raise RuntimeError, "Could not load rjb and/or the JVM: " + @java_error.to_s