From b28798acc8e868723471e5cec26d1fb9b95f8bde Mon Sep 17 00:00:00 2001 From: luzhisheng Date: Tue, 7 Mar 2023 15:45:06 +0800 Subject: [PATCH] =?UTF-8?q?3js=E5=8A=A0=E5=AF=86js=E7=AC=AC=E5=85=AD?= =?UTF-8?q?=E8=8A=82=E5=AE=9E=E6=88=98=E4=BE=8B=E9=A2=98sojson=E8=A7=A3?= =?UTF-8?q?=E5=AF=86=EF=BC=8Cheaders=E6=A3=80=E6=B5=8B=EF=BC=8C=E5=8A=A8?= =?UTF-8?q?=E6=80=81cookie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../readme.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/猿人学练习/3js加密js第六节实战例题sojson解密,headers检测,动态cookie/readme.md b/猿人学练习/3js加密js第六节实战例题sojson解密,headers检测,动态cookie/readme.md index 873f874..15eb516 100644 --- a/猿人学练习/3js加密js第六节实战例题sojson解密,headers检测,动态cookie/readme.md +++ b/猿人学练习/3js加密js第六节实战例题sojson解密,headers检测,动态cookie/readme.md @@ -84,9 +84,20 @@ m = V(1678168607000); console.log(m); -得到了`m`值,就可以模拟请求,发现返回的数据是不变的,为什么? +得到了`m`值,就可以模拟请求, -用charles代理拦截,查看请求体,最后猜测是`header`问题 + def challenge3(page, m, timestamp): + url = "https://www.python-spider.com/api/challenge3" + payload = f"page={page}" + headers = { + 'cookie': f'm={m}|{timestamp}' + } + response = requests.request("POST", url, headers=headers, data=payload) + return response.text + +但发现返回的数据是不变的,为什么? + +用charles代理拦截,对比查看请求体,最后猜测是`header`问题 ![请求](./img/8.png)