本帖最后由 benz1979 于 2011-4-2 15:55 编辑
我今天用抓包工具抓一个网站的包,抓到的数据如下
(Request-Line):POST /submit HTTP/1.1
Accept:*/*
Accept-Language:zh-cn
Referer:http://www.xxxx.com/doc/4598135.html
x-request-by:xxx.ajax
Content-Type:application/x-www-form-urlencoded
Accept-Encoding:gzip, deflate
User-Agent:Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0)
Host:www.xxxx.com
Content-Length:54
Connection:Keep-Alive
Cache-Control:no-cache
Cookie:XXXID=93947AE0FFB5A17C8432F67BA186FD02:FG=1; XXSS=HVQUVMwR21VbzRPMkZvUVMza1Y1WkZ0WDR1UX4yVU5wdEZrd0VzTFdxcEVYcnBOQVFBQUFBJCQAAAAAAAAAAAokNx-JljMBYmVuejE5NzkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgusRwAAAAAOC6xHAAAAAAcF1CAAAAAAAxMC42NS40NETRkk1E0ZJNW; USERID=8fcebb34524949c94c8ebda2
我写的代码如下:$oHTTP = ObjCreate("microsoft.xmlhttp")
$oHTTP.Open("post","http://www.xxxx.com/submit",False)
$oHTTP.setRequestHeader("Accept","*/*")
$oHTTP.setRequestHeader("Accept-Language","zh-cn")
$oHTTP.setRequestHeader("x-request-by","XXXX.ajax")
$oHTTP.setRequestHeader("Content-Type","application/x-www-form-urlencoded")
$oHTTP.setRequestHeader("Accept-Encoding","gzip, deflate")
$oHTTP.setRequestHeader("User-Agent","Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0)")
$oHTTP.setRequestHeader("Host","www.xxxx.com")
$oHTTP.setRequestHeader("Content-Length","54")
$oHTTP.setRequestHeader("Connection","Keep-Alive")
$oHTTP.setRequestHeader("Cache-Control","no-cache")
$oHTTP.setRequestHeader("Referer","http://www.xxxx.com/doc/4598135.html")
$oHTTP.setRequestHeader("Cookie","XXXID=93947AE0FFB5A17C8432F67BA186FD02:FG=1; BDUSS=HVQUVMwR21VbzRPMkZvUVMza1Y1WkZ0WDR1UX4yVU5wdEZrd0VzTFdxcEVYcnBOQVFBQUFBJCQAAAAAAAAAAAokNx-JljMBYmVuejE5NzkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgusRwAAAAAOC6xHAAAAAAcF1CAAAAAAAxMC42NS40NETRkk1E0ZJNW; USERID=8fcebb34524949c94c8ebda2")
$oHTTP.Send("wp=20009&doc_id=4598135&value_score=5")
执行上面的代码抓包,发现Referer无法执行到底是什么原因
|