XMLHTTP小偷程序POST方法(ASP)
2005-12-21 01:35
399 查看
<%
Function GetSourceInfo(byval url,pages,Cookies)
dim xmlhttp,xmlget,bgpos,endpos
Set xmlhttp = CreateObject("Msxml2.ServerXMLHTTP")
With xmlhttp
.Open "POST", url, False
.setRequestHeader "CONTENT-TYPE","application/x-www-form-urlencoded"
'.setRequestHeader("Referer","来路的绝对地址")
'.setRequestHeader "Cookie",Cookies 'Cookie
.Send pages'post的参数
xmlget = bin2str(.responseBody)
End With
set xmlhttp = nothing
GetSourceInfo=xmlget
End Function
Function bin2str(binstr)
Const adTypeBinary = 1
Const adTypeText = 2
Dim BytesStream,StringReturn
Set BytesStream = Server.CreateObject("ADODB.Stream") '建立一个流对象
With BytesStream
.Type = adTypeText
.Open
.WriteText binstr
.Position = 0
.Charset = "GB2312"
.Position = 2
StringReturn = .ReadText
.close
End With
Set BytesStream = Nothing
bin2str = StringReturn
End Function
'--------------------------------------------------------------------------------------
Cookies = ""
pages = "curDate=2005-12-20&FlightWay1=Single&FlightWay=Single&Homecity="&escape("成都")&"&DDatePeriod1=2005-12-25&startPeriod=All&Destcity1="&escape("深圳")&"&TicketAgency_List="&escape("成都")&"&ChildType=ADU&Quantity=1&DSeatClass=Y&airlineChoice=All"
'GetSourceInfo(网址,提交的表单,Cookies)
response.write(GetSourceInfo("http://www.ctrip.com/supermarket/Flight/SuperFlightSearchResult.asp",pages,Cookies))
%>
Function GetSourceInfo(byval url,pages,Cookies)
dim xmlhttp,xmlget,bgpos,endpos
Set xmlhttp = CreateObject("Msxml2.ServerXMLHTTP")
With xmlhttp
.Open "POST", url, False
.setRequestHeader "CONTENT-TYPE","application/x-www-form-urlencoded"
'.setRequestHeader("Referer","来路的绝对地址")
'.setRequestHeader "Cookie",Cookies 'Cookie
.Send pages'post的参数
xmlget = bin2str(.responseBody)
End With
set xmlhttp = nothing
GetSourceInfo=xmlget
End Function
Function bin2str(binstr)
Const adTypeBinary = 1
Const adTypeText = 2
Dim BytesStream,StringReturn
Set BytesStream = Server.CreateObject("ADODB.Stream") '建立一个流对象
With BytesStream
.Type = adTypeText
.Open
.WriteText binstr
.Position = 0
.Charset = "GB2312"
.Position = 2
StringReturn = .ReadText
.close
End With
Set BytesStream = Nothing
bin2str = StringReturn
End Function
'--------------------------------------------------------------------------------------
Cookies = ""
pages = "curDate=2005-12-20&FlightWay1=Single&FlightWay=Single&Homecity="&escape("成都")&"&DDatePeriod1=2005-12-25&startPeriod=All&Destcity1="&escape("深圳")&"&TicketAgency_List="&escape("成都")&"&ChildType=ADU&Quantity=1&DSeatClass=Y&airlineChoice=All"
'GetSourceInfo(网址,提交的表单,Cookies)
response.write(GetSourceInfo("http://www.ctrip.com/supermarket/Flight/SuperFlightSearchResult.asp",pages,Cookies))
%>
相关文章推荐
- ASP小偷程序如何利用XMLHTTP实现表单的提交以及cookies或session的发送
- asp 小偷采集程序原理与常用函数方法
- ASP小偷程序如何利用XMLHTTP实现表单的提交
- ASP小偷程序如何利用XMLHTTP实现表单的提交
- 用正则和xmlHttp实现的asp小偷程序
- 用正则和xmlHttp实现的asp小偷程序
- asp小偷程序如何利用xmlhttp实现表单的提交以及cookies或session的发送
- asp 小偷采集程序原理与常用函数方法
- ASP小偷程序如何利用XMLHTTP实现表单的提交以及cookies或session的发送
- ASP XMLHTTP组件 GET或POST请求 小偷采集方法anhttp()
- 关于asp程序的Server.CreateObject错误解决方法
- asp,.net防注入程序及代码(s.see9.us挂马解决方法)
- 开发ASP.NET下的MP3小偷程序
- [ASP.NET]从ASP.NET Postback机制,到POST/GET方法
- 2003下不能运行asp程序的彻底解决方法
- Asp程序移植到Linux上的方法
- 开发ASP.NET下的MP3小偷程序
- [置顶] Ajax程序:处理异步调用中的异常(使用Asp.Net Ajax内建的异常处理方法)
- xmlhttp:open方法中的POST、GET参数的区别
- PHP小偷程序的设计与实现方法详解