使用ASP偽造REFERER訪問指定頁面
來源:程序員人生 發布時間:2014-01-17 19:11:24 閱讀次數:2836次
這個一般人用不到,想去黑別人的網站也許用的到,比如我的網站上http://www.wfuwu.com/write.asp不允許直接輸入訪問,使用如下代碼能繞過這個限制。代碼如下:
以下為引用的內容: <% Function GetBody(weburl) Set Retrieval = Server.CreateObject("MSXML2.XMLHTTP") With Retrieval .Open "Get", weburl, False, "", "" .setRequestHeader "referer",http://www.wfuwu.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.wfuwu.com/write.asp)) %> |
生活不易,碼農辛苦
如果您覺得本網站對您的學習有所幫助,可以手機掃描二維碼進行捐贈