手机数据包和电脑上访问显示不一样怎么办

现象

这是应该返回的数据包

afdafadfafaa

结果给我返回个hello world??

adfadfadasfasdfa

原因

数据包不同

这是手机上的数据包

POST /w1/api/index.php?apiv=w23&PhoneOSNew=1 HTTP/1.1
Host: hq.kaipanla.com
Connection: close
Content-Length: 94
Accept: application/json, text/javascript, */*; q=0.01
Origin: https://page.kaipanla.com
User-Agent: Mozilla/5.0 (Linux; Android 7.1.2; VOG-AL00 Build/N2G48H; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.158 Mobile Safari/537.36;kaipanla 4.8.2.4
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: https://page.kaipanla.com/w23/web/index.html?channel=4&refreshKey=1608369948206
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,en-US;q=0.9
X-Requested-With: com.aiyu.kaipanla

c=Index&a=GetInfo&View=1%2C2%2C3%2C4%2C5%2C6%2C7&DeviceID=ffffffff-d791-2a98-ffff-ffffdc319828

这是电脑上的数据包

GET /w1/api/index.php?apiv=w23&PhoneOSNew=1 HTTP/1.1
Host: lhb.kaipanla.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
Accept-Encoding: gzip, deflate
Connection: close
Upgrade-Insecure-Requests: 1
Pragma: no-cache
Cache-Control: no-cache

少了这么多参数,肯定返回结果不一样呀。

解决

将数据包复制返回给电脑上

adfafasfascedxd

数据一致,测试完成

最后修改:2021 年 08 月 17 日 10 : 46 PM
如果觉得我的文章对你有用,请随意赞赏