您当前位置:桂林网站建设 > 新闻资讯
小偷页面代码
Time:2011-12-16 下午 10:40:22
<%
Dim Url,Content,awbno
Url = "http://www.baidu.com"
awbno = Request.Form("awbno")
If awbno="" Or IsNull(awbno) Then
  Content = GetData(Url,1)
Else
  Content = PostData(Url&"return.asp","awbno=" & awbno,1)
End If

Content = Replace(Content,"images/",Url & "images/")
Content = Replace(Content,"return.asp","")
Response.Write Content

Function GetData(GetUrl,GetMode)
  Dim Http
  Set Http = Server.CreateObject("msxml2.XMLHTTP")
  With Http
    .Open "GET",GetUrl,False
    .SetRequestHeader "Referer",GetUrl
    .Send
    If GetMode = 0 Then
      GetData = .ResponseBody
    Else
      GetData = BytesToBstr(.ResponseBody,"GB2312")
    End If
  End With
  Set Http = Nothing
End Function

Function PostData(PostUrl,PostStr,PostMode)
  Dim Http
  Set Http = Server.CreateObject("msxml2.XMLHTTP")
  With Http
    .Open "POST",PostUrl,False
    .SetRequestHeader "Content-Length",Len(PostStr)
    .SetRequestHeader "Content-Type","application/x-www-form-urlencoded"
    .SetRequestHeader "Referer",PostUrl
    .Send PostStr
    If PostMode=0 Then
      PostData = .ResponseBody
    Else
      PostData = BytesToBstr(.ResponseBody,"GB2312")
    End If
  End With
  Set Http = Nothing
End Function

Function BytesToBstr(Body,Cset)
  Dim ADOS
  Set ADOS = Server.CreateObject("Adodb.Stream")
  With ADOS
    .Type = 1
    .Mode =3
    .Open
    .Write Body
    .Position = 0
    .Type = 2
    .Charset = Cset
    BytesToBstr = .ReadText 
    .Close
  End With
  Set ADOS = Nothing
End Function
%>

最新资讯