首页 >> 文档 >> ASP专题

ASP 伪造访问来路 HTTP_REFERER

发布日期:2008-07-25最近更新:2008-07-25来源:BHCODE作者:

ASP 伪造访问来路 HTTP_REFERER


<%
Function GetBody(weburl)
    Set Retrieval = Server.CreateObject("MSXML2.XMLHTTP")
    With Retrieval
        .Open "Get", weburl, False, "", ""
        .setRequestHeader "referer","http://www.abc.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"))
%>

本周推荐
MORE
热点关注
MORE