防圖片木馬函數(shù) |
發(fā)布時間: 2012/9/5 11:10:02 |
'防圖片木馬函數(shù) Public Function ispic(FilePath) set PicFile = server.CreateObject("Scripting.FileSystemObject") set PicText = PicFile.OpenTextFile(FilePath, 1) sTextAll = lcase(PicText.ReadAll) PicText.close set PicFile = nothing sStr=".getfolder|.createfolder|.deletefolder|.createdirectory|.deletedirectory|.saveas|wscript.shell| script .encode|server.|.createobject|execute|activexobject|language=" sNoString = split(sStr,"|") for i=0 to ubound(sNoString) if instr(sTextAll,sNoString(i))>0 then set filedel = server.CreateObject("Scripting.FileSystemObject") filedel.deletefile FilePath set filedel = nothing Response.Write("您上傳的文件有問題,上傳失敗") Response.End() end if next End Function 本文出自:億恩科技【mszdt.com】 服務(wù)器租用/服務(wù)器托管中國五強!虛擬主機域名注冊頂級提供商!15年品質(zhì)保障!--億恩科技[ENKJ.COM] |