您的位置:首页 >> Web开发 >> ASP技术 >> ASP技巧 >> 正文
ASP技巧 RSS
 

ASP伪造REFERER

http://www.rdxx.com 08年05月02日 00:00 我要投稿

关键词: refer , ASP

代码:
<%
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"))
%>


 
 
标签: refer , ASP 打印本文
 
 
  热点搜索
 
 
 



Valid XHTML 1.0 Transitional
Copyright ©2005 - 2008 Rdxx.Com,All Rights Reserved
收藏本页
收藏本站