注册 登陆

MSXML2.XMLHTTP组件与小偷的写法

代码:
MSXML2.XMLHTTP组件真是很有用

06.asp

<%
function getHTTPPage(url)
  dim Http
  set Http=server.createobject("MSXML2.XMLHTTP")
  Http.open "GET",url,false
  Http.send()
  if Http.readystate<>4 then
      exit function
  end if
  getHTTPPage=bytesToBSTR(Http.responseBody,"GB2312")
  set http=nothing
  if err.number<>0 then err.Clear
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

Dim Url,Html
Url="http://www.im286.com&#...
Html = getHTTPPage(Url)
Html = Replace(Html,"images/","http://www.im286.com/image...
Html = Replace(Html,"http://www.discuz.net/http...,"http://www.discuz.net/imag...
Html = Replace(Html,"forumdisplay.php?fid","06_1.asp?id")
Html = Replace(Html,"viewpro.php?username","06_3.asp?username")
Html = Replace(Html,"落伍","混混")
response.write html
%>

06_1.asp

<%
function getHTTPPage(url)
  dim Http
  set Http=server.createobject("MSXML2.XMLHTTP")
  Http.open "GET",url,false
  Http.send()
  if Http.readystate<>4 then
      exit function
  end if
  getHTTPPage=bytesToBSTR(Http.responseBody,"GB2312")
  set http=nothing
  if err.number<>0 then err.Clear
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

Dim Url,Html,id,page
id=request.querystring("id")
page=request.querystring("page")
If page ="" then
Url="http://www.im286.com/forum...
Else
Url="http://www.im286.com/forum...
End if
Html = getHTTPPage(Url)
Html = Replace(Html,"images/","http://www.im286.com/image...
Html = Replace(Html,"forumdisplay.php?fid","06_1.asp?id")
Html = Replace(Html,"viewthread.php?tid","06_2.asp?id")
Html = Replace(Html,"index.php","06.asp")
Html = Replace(Html,"viewpro.php?username","06_3.asp?username")
Html = Replace(Html,"viewpro.php?uid","06_3.asp?id")
Html = Replace(Html,"落伍","混混")
response.write html
%>

06_2.asp

<%
function getHTTPPage(url)
  dim Http
  set Http=server.createobject("MSXML2.XMLHTTP")
  Http.open "GET",url,false
  Http.send()
  if Http.readystate<>4 then
      exit function
  end if
  getHTTPPage=bytesToBSTR(Http.responseBody,"GB2312")
  set http=nothing
  if err.number<>0 then err.Clear
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

Dim Url,Html,id,page,extra
id=request.querystring("id")
page=request.querystring("page")
If page ="" then
Url="http://www.im286.com/viewt...
Else
Url="http://www.im286.com/viewt...
End if
Html = getHTTPPage(Url)
Html = Replace(Html,"images/","http://www.im286.com/image...
Html = Replace(Html,"forumdisplay.php?fid","06_1.asp?id")
Html = Replace(Html,"viewthread.php?tid","06_2.asp?id")
Html = Replace(Html,"index.php","06.asp")
Html = Replace(Html,"viewpro.php?username","06_3.asp?username")
Html = Replace(Html,"viewpro.php?uid","06_3.asp?id")
response.write html
%>

06_3.asp

<%
function getHTTPPage(url)
  dim Http
  set Http=server.createobject("MSXML2.XMLHTTP")
  Http.open "GET",url,false
  Http.send()
  if Http.readystate<>4 then
      exit function
  end if
  getHTTPPage=bytesToBSTR(Http.responseBody,"GB2312")
  set http=nothing
  if err.number<>0 then err.Clear
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

Dim Url,Html,id,page,extra
id=request.querystring("id")
username=request.querystring("username")
If id="" Then
Url="http://www.im286.com/viewp...
Else
url="http://www.im286.com/viewp...
End if
Html = getHTTPPage(Url)
Html = Replace(Html,"images/","http://www.im286.com/image...
'Html = Replace(Html,"forumdisplay.php?fid","06_1.asp?id")
'Html = Replace(Html,"viewthread.php?tid","06_2.asp?id")
Html = Replace(Html,"index.php","06.asp")
'Html = Replace(Html,"viewpro.php?username","06_3.asp?username")
'Html = Replace(Html,"viewpro.php?uid","06_3.asp?id")
response.write html
%>

« 上一篇 | 下一篇 »

访客评论

JackFans
Not bad... Not bad.
JackFans
Nice site, thanks for information!
JackFans
DAESH ONOTOLE V PRAVITELI VSELENNOI!
JackFans
MJL2Xz bnnLst19hdY6llAd3fg6
JackFans
http://www.jackfeng.com

发表评论

评论内容 (必填):