声明
本文章中所有内容仅供学习交流使用,不用于其他任何目的,抓包内容、敏感网址、数据接口等均已做脱敏处理,严禁用于商业用途和非法用途,否则由此产生的一切后果均与作者无关!
部分Python代码
部分python代码
url = "h5/mtop.wdk.classify.queryclassifyitemv3.ext/1.0/2.0/"
# 请求头
headers = {
"sec-fetch-mode": "cors",
"sec-fetch-dest": "empty",
"accept-encoding": "gzip, deflate, br",
"accept-language": "zh-CN,zh;q=0.9",
"priority": "u=1, i"
}
data1 = {
"renderChannelCode": "SG_WX_B2C_HESUAN_APPLETS",
"channelSource": "wechat",
"channelScenarioGroup": "HM",
"channelTerminal": "hesuan_wx_applet",
"ttid": "wap_SG_HMHS_H5@hswxhmxs_iPhone_6.29.0",
}
cp = execjs.compile(open('run.js','r',encoding='utf-8').read())
token = ''
c = str(int(time.time()*1000))
a = '12574478'
sign = cp.call('pre',data1,token,c,a)
params = {
"jsv": "2.4.12",
"appKey": "12574478",
"t": c,
"sign": sign,
"c": "",
"api": "",
"alipay": "[object Object]",
"v": "1.0",
"type": "originaljson",
"ttid": "wap_SG_HMHS_H5@hswxhmxs_iPhone_6.29.0",
"dataType": "json",
"_bx-m": "1"
}
# 发送POST请求
response = requests.post(
url,
params=params,
headers=headers,
data=data
)
print("\nResponse Body:")
data = response.json()
print(data)
url = "h5/mtop.wdk.classify.queryclassifyitemv3.ext/1.0/2.0/"
# 请求头
headers = {
"sec-fetch-mode": "cors",
"sec-fetch-dest": "empty",
"accept-encoding": "gzip, deflate, br",
"accept-language": "zh-CN,zh;q=0.9",
"priority": "u=1, i"
}
data1 = {
"renderChannelCode": "SG_WX_B2C_HESUAN_APPLETS",
"channelSource": "wechat",
"channelScenarioGroup": "HM",
"channelTerminal": "hesuan_wx_applet",
"ttid": "wap_SG_HMHS_H5@hswxhmxs_iPhone_6.29.0",
}
cp = execjs.compile(open('run.js','r',encoding='utf-8').read())
token = ''
c = str(int(time.time()*1000))
a = '12574478'
sign = cp.call('pre',data1,token,c,a)
params = {
"jsv": "2.4.12",
"appKey": "12574478",
"t": c,
"sign": sign,
"c": "",
"api": "",
"alipay": "[object Object]",
"v": "1.0",
"type": "originaljson",
"ttid": "wap_SG_HMHS_H5@hswxhmxs_iPhone_6.29.0",
"dataType": "json",
"_bx-m": "1"
}
# 发送POST请求
response = requests.post(
url,
params=params,
headers=headers,
data=data
)
print("\nResponse Body:")
data = response.json()
print(data)
结果

总结
1.出于安全考虑,本章未提供完整流程,调试环节省略较多,只提供大致思路,具体细节要你自己还原,相信你也能调试出来。