| 订阅 | 在线投稿
分享
 
 
 

ASP伪造REFERER

来源:互联网  宽屏版  评论
2008-06-01 03:16:14

代码:

<%

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"))

%>

 
代码: <% 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")) %>
󰈣󰈤
 
 
 
>>返回首页<<
 
 热帖排行
 
 
 
静静地坐在废墟上,四周的荒凉一望无际,忽然觉得,凄凉也很美
©2005- 王朝网络 版权所有