解析ASP隱藏下載地址及防盜代碼_ASP教程

      編輯Tag賺U幣
      教程Tag:暫無Tag,歡迎添加,賺取U幣!

      推薦:怎樣配置IIS既可以運行ASP又可以運行PHP
      整了個BaiDuMp3的Decode,Base64加上一些Unicode的變化,發現JS版和ASP版的Base64算法對中文支持都不理想,于是用了Php的,服務器是IIS6.0,要讓它跑Php也是可以的 。 1、準備好php.ini,php5ts.dll,php5isapi.dll這3個文件,其中的php5是你擁有的php版本的

       

      以下為引用的內容:
      <% FunctIon DownloadFIle(StrFIle)
      StrFIlename=StrFIle
      Response.Buffer=True
      Response.Clear
      Set S=Server.CreateObJect("ADODB.Stream")
      S.Open
      S.Type=1
      on Error Resume Next
      Set Fso=Server.CreateObJect("ScrIptIng.FIleSystemObJect")
      If Not Fso.FIleExists(StrFIleName) Then
      From_Url=Cstr(Request.ServerVarIables("HTTP_REFERER"))
      Serv_Url=Cstr(Request.ServerVarIables("SERVER_NAME"))
      If MId(From_Url,8,len(Serv_Url)) <> Serv_Url Then
      Response.WrIte "該文件不存在或者已經刪除."
      Response.End
      End If
      Response.RedIrect Request.ServerVarIables("HTTP_REFERER")
      Response.End
      End If
      FileExt=MId(StrFIlename,InStrRev(StrFIleName, ".")+1)
      Select Case UCase(FIleExt)
      Case "ASP", "ASA", "ASPX", "ASAX", "MDB", "PHP", "JSP", "SHTML", "HTML", "HTM", "TV", "DATA"
      From_Url=Cstr(Request.ServerVarIables("HTTP_REFERER"))
      Serv_Url=Cstr(Request.ServerVarIables("SERVER_NAME"))
      If MId(From_Url,8,len(Serv_Url)) <> Serv_Url Then
      Response.WrIte "該文件不存在或者已經刪除."
      Response.End
      End If
      Response.RedIrect Request.ServerVarIables("HTTP_REFERER")
      Response.End
      End Select
      Set F=Fso.GetFIle(StrFIlename)
      IntFIlelength=F.SIze
      s.LoadFromFIle(StrFIlename)
      If Err Then
      From_Url=Cstr(Request.ServerVarIables("HTTP_REFERER"))
      Serv_Url=Cstr(Request.ServerVarIables("SERVER_NAME"))
      If MId(From_Url,8,len(Serv_Url)) <> Serv_Url Then
      Response.WrIte "該文件數據不完整或許已損壞."
      Response.End
      End If
      Response.RedIrect Request.ServerVarIables("HTTP_REFERER")
      Response.End
      End If
      Set Upload=Server.CreateObJect("PersIts.Upload")
      If Upload Is Nothing Then
      Response.AddHeader "Content-DIsposItIon","attachment; FIlename="&F.Name
      Response.AddHeader "Content-Length",IntFilelength
      Response.CharSet="UTF-8"
      Response.ContentType="application/x-download"
      Response.BinaryWrite S.Read
      Response.Flush
      S.Close
      Set s=NothIng
      Else
      Upload.SendBinary StrFIlename,True,"application/x-download",False
      End If
      End FunctIon
      %>

      分享:sdcms怎樣添加在線提交功能
      sdcms在線提交的程序 回復 http://bbs.sdcms.cn/dispbbs.asp?boardid=2

      來源:模板無憂//所屬分類:ASP教程/更新時間:2009-11-15
      相關ASP教程