找回密码
 加入
搜索
查看: 2885|回复: 4

[IE类操作] chrome浏览器抓包到的Request Payload 数据,应该如何POST【已解决】

[复制链接]
发表于 2018-1-19 22:54:08 | 显示全部楼层 |阅读模式
本帖最后由 fenhanxue 于 2018-1-21 15:59 编辑

之前一直用HTTPWATCH,但是HTTPWATCH不支持chrome,这次的网站IE不能打开,只能CHROME打开,我抓包到的数据是这样的:



其中,详细的细节如下:








即:
===========General
Request URL:https://www.vgobets8.com/indexnews.php?controller=game&action=play&sess=sess_0c100d67047322ca2f0d4058e486a2400&curmid=302&source=web
Request Method:POST
Status Code:200 
Remote Address:103.74.195.25:443
Referrer Policy:no-referrer-when-downgrade



===========Response Headers
access-control-allow-headers:x-requested-with
access-control-allow-methods:GET, POST
access-control-allow-origin:*
cache-control:no-cache
content-encoding:gzip
content-type:text/html; charset=UTF-8
date:Fri, 19 Jan 2018 14:42:39 GMT
expires:Fri, 19 Jan 2018 14:42:38 GMT
server:nginx/1.12.1
status:200
vary:Accept-Encoding
x-remote-addr:125.120.74.98



===========Request Headers
:authority:www.vgobets8.com
:method:POST
:path:/indexnews.php?controller=game&action=play&sess=sess_0c100d67047322ca2f0d4058e486a2400&curmid=302&source=web
:scheme:https
accept:July;Angular;version=3.0;
accept-encoding:gzip, deflate, br
accept-language:zh-CN,zh;q=0.9
content-length:327
content-type:text/plain;charset=UTF-8
cookie:_ga=GA1.2.566223537.1515339372; _gid=GA1.2.640528653.1516340094; _sessionHandler=0c100d67047322ca2f0d4058e486a240be5358fd; plat_env=prd; front_ver=20180118001; Handlers=%7B%22sess%22%3A%22sess_0c100d67047322ca2f0d4058e486a2400%22%2C%22expires%22%3A%222018-01-20T14%3A38%3A58.259Z%22%7D; wmShow=1; Udns_%E8%B4%A2%E7%A5%A8=1
origin:https://www.vgobets8.com
referer:https://www.vgobets8.com/
user-agent:Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36



===========Query String Parameters
view source
view URL encoded
controller:game
action:play
sess:sess_0c100d67047322ca2f0d4058e486a2400
curmid:302
source:web


===========Request Payload
view parsed
{"flag":"save","lt_project":[{"methodid":"363","times":1,"nums":1,"money":2,"codes":"01 02 03 04 05","contents":"01 02 03 04 05","wzcontents":[[]],"mode":"1","omodel":0,"desc":"五中五","methodname":"任选单式 - 五中五","type":"input"}],"lt_total_money":2,"lt_total_nums":1,"lotteryid":8,"lt_issue_start":"20180119-83"}
对于 Request Payload 的参数,我不知道应该如何处理,下面是我的代码,求助帮忙修正:
#PRE_UseX64=n

Local $url = 'https://www.vgobets8.com/indexnews.php?controller=game&action=play&sess=sess_0c100d67047322ca2f0d4058e486a2400&curmid=302&source=web'
Local $Cookies = '_ga=GA1.2.566223537.1515339372; _gid=GA1.2.640528653.1516340094; _sessionHandler=0c100d67047322ca2f0d4058e486a240be5358fd; plat_env=prd; front_ver=20180118001; Handlers=%7B%22sess%22%3A%22sess_0c100d67047322ca2f0d4058e486a2400%22%2C%22expires%22%3A%222018-01-20T14%3A38%3A58.259Z%22%7D; wmShow=1; Udns_%E8%B4%A2%E7%A5%A8=1'
Local $request_Payload = '{"flag":"save","lt_project":[{"methodid":"363","times":1,"nums":1,"money":2,"codes":"01 02 03 04 05","contents":"01 02 03 04 05","wzcontents":[[]],"mode":"1","omodel":0,"desc":"五中五","methodname":"任选单式 - 五中五","type":"input"}],"lt_total_money":2,"lt_total_nums":1,"lotteryid":8,"lt_issue_start":"20180119-83"}'


$oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1")
$oHTTP.Open("POST", $url, True)
$oHTTP.SetRequestHeader("accept",'July;Angular;version=3.0;')
$oHTTP.SetRequestHeader("accept-encoding",'gzip, deflate, br')
$oHTTP.SetRequestHeader("accept-language",'')
$oHTTP.SetRequestHeader("Cookie",'zh-CN,zh;q=0.9')
$oHTTP.SetRequestHeader("content-length",'327')
$oHTTP.SetRequestHeader("content-type",'text/plain;charset=UTF-8')
$oHTTP.SetRequestHeader("Cookie",$Cookies) 
$oHTTP.SetRequestHeader("origin",'https://www.vgobets8.com')
$oHTTP.SetRequestHeader("referer",'https://www.vgobets8.com/')
$oHTTP.SetRequestHeader("user-agent",'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36')
$oHTTP.Send($request_Payload)
$oHTTP.WaitForResponse(-1)
$res = $oHTTP.responsetext
ConsoleWrite($res)

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
发表于 2018-1-20 16:13:57 | 显示全部楼层
可以用fiddler
 楼主| 发表于 2018-1-21 15:57:54 | 显示全部楼层
回复 2# zch11230


    好建议。。。谢了
发表于 2019-7-17 16:54:01 | 显示全部楼层
lz 这个怎么引入jQuery?
发表于 2019-7-17 16:57:09 | 显示全部楼层
尴尬发错位置了
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-12-23 21:15 , Processed in 0.071864 second(s), 21 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表