prefer reading directly with MetasploitPayloads where possible

bug/bundler_fix
Brent Cook 2015-05-07 16:59:02 -05:00
parent f0c989c1b5
commit a066105a86
1 changed files with 1 additions and 4 deletions

View File

@ -98,10 +98,7 @@ class Metasploit3 < Msf::Exploit::Remote
# We need this class as a wrapper to run in a thread. For some reason
# the Payload class is giving illegal access exceptions without it.
path = MetasploitPayloads.path("java", "metasploit", "PayloadServlet.class")
fd = File.open(path, "rb")
servlet = fd.read(fd.stat.size)
fd.close
servlet = MetasploitPayloads.read("java", "metasploit", "PayloadServlet.class")
zip.add_file("metasploit/PayloadServlet.class", servlet)
contents = zip.pack