<%
'防图片木马函数
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
%>