Skip to content

Commit a066105

Browse files
author
Brent Cook
committed
prefer reading directly with MetasploitPayloads where possible
1 parent f0c989c commit a066105

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

modules/exploits/multi/http/axis2_deployer.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,7 @@ def upload_exec(session,rpath)
9898

9999
# We need this class as a wrapper to run in a thread. For some reason
100100
# the Payload class is giving illegal access exceptions without it.
101-
path = MetasploitPayloads.path("java", "metasploit", "PayloadServlet.class")
102-
fd = File.open(path, "rb")
103-
servlet = fd.read(fd.stat.size)
104-
fd.close
101+
servlet = MetasploitPayloads.read("java", "metasploit", "PayloadServlet.class")
105102
zip.add_file("metasploit/PayloadServlet.class", servlet)
106103

107104
contents = zip.pack

0 commit comments

Comments
 (0)