首页 > 学院 > 开发设计 > 正文

ASP伪造REFERER

2019-11-17 04:33:48
字体:
来源:转载
供稿:网友

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


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表