高手接招:分析一个网页的Post分析了一周,都没搞定,各位高手试试
网页:http://ent.cctv.com/special/C18946/index.shtml
选择投票提交的时候,提交数据如下:
POST /application_vote/survey/poll_vote HTTP/1.1
Accept: */*
Referer: http://ent.cctv.com/special/C18946/index.shtml
Accept-Language: zh-cn
Content-Type: multipart/form-data; boundary=---------------------------7d737a25110292
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 2.0.50727; .NET CLR 1.1.4322)
Host: vote.cctv.com
Content-Length: 836
Connection: Keep-Alive
Cache-Control: no-cache
-----------------------------7d737a25110292
Content-Disposition: form-data; name= "ans1_9 "
on
-----------------------------7d737a25110292
Content-Disposition: form-data; name= "sigmult1 "
1
-----------------------------7d737a25110292
Content-Disposition: form-data; name= "ansnum1 "
30
-----------------------------7d737a25110292
Content-Disposition: form-data; name= "srvyid "
8199
-----------------------------7d737a25110292
Content-Disposition: form-data; name= "checkout "
0
-----------------------------7d737a25110292
Content-Disposition: form-data; name= "votekind "
0
-----------------------------7d737a25110292
Content-Disposition: form-data; name= "voteto "
2
-----------------------------7d737a25110292
Content-Disposition: form-data; name= "quesnum "
1
-----------------------------7d737a25110292--
我在线调试了很久,都没找到multipart/form-data数据分隔符7d737a25110292是在那段代码生成的,高手指点指点...
------解决方案--------------------Content-Type: multipart/form-data; boundary=---------------------------7d737a25110292
这个是浏览器自动生成的.
你要组合包的时候.可以任意指定.
只需要在 发送的头里的
Content-Type 段后面,按上面的生成就行了.
------解决方案--------------------浏览器自动生成的...
基本上是拿来区分每个值的随机字串...
你也可以简单点用 "名=值&name=value... "这种方式提交...
------解决方案--------------------那串东西是浏览器自动生成的~~!!!