开发学院WEB开发ASP ASP伪造REFERER 阅读

ASP伪造REFERER

 2008-05-02 10:37:53 来源:WEB开发网   
核心提示:代码:<%Function GetBody(weburl) Set Retrieval = Server.CreateObject("MSxml2.xmlhttp") With Retrieval .Open "Get", weburl, False, &quo

代码:
<%
Function GetBody(weburl)
   Set Retrieval = Server.CreateObject("MSxml2.xmlhttp")
   With Retrieval
     .Open "Get", weburl, False, "", ""
     .setRequestHeader "referer","http://www.devdao.com/"'想改什么就改什么
     .Send
     GetBody = .ResponseBody
   End With
   GetBody = BytesToBstr(GetBody,"GB2312")
   Set Retrieval = Nothing
End Function

Function BytesToBstr(body,Cset)
     dim objstream
     set objstream = Server.CreateObject("adodb.stream")
     objstream.Type = 1
     objstream.Mode =3
     objstream.Open
     objstream.Write body
     objstream.Position = 0
     objstream.Type = 2
     objstream.Charset = Cset
     BytesToBstr = objstream.ReadText
     objstream.Close
     set objstream = nothing
End Function

Response.Write(GetBody("http://www.devdao.com/referer.asp"))
%>

Tags:ASP 伪造 REFERER

编辑录入:爽爽 [复制链接] [打 印]
[]
  • 好
  • 好的评价 如果觉得好,就请您
      0%(0)
  • 差
  • 差的评价 如果觉得差,就请您
      0%(0)
赞助商链接