朴朴超市小程序 sign-v2 分析

声明

本文章中所有内容仅供学习交流使用,不用于其他任何目的,抓包内容、敏感网址、数据接口等均已做脱敏处理,严禁用于商业用途和非法用途,否则由此产生的一切后果均与作者无关!

部分python代码

复制代码
cp = execjs.compile(open('run.js','r',encoding='utf-8').read())
result = cp.call('getSign',unique_id)
print(result)
headers = {
    "accept": "application/json",
    "accept-language": "zh-CN,zh;q=0.9",
    "cache-control": "no-cache",
    "chart_ab": "4",
    "content-type": "application/json",
    "is_show_classification_word": "1",
    "label_assembly_ab": "1",
    "open-id": "",
    "pp-os": "0",
    "pp-placeid": unique_id,
    "pp-suid": unique_id,
    "pp_storeid": unique_id,
    "pragma": "no-cache",
    "priority": "u=1, i",
    "sec-fetch-dest": "empty",
    "sec-fetch-mode": "cors",
    "sec-fetch-site": "cross-site",
    "shopping_car_hint_banner_module": "1",
    "sign-v2": result['sign'],
    "spu_shopping_guide_link_ab": "1",
    "timestamp": str(result["timestamp"]),
}
url = "product/recall"
data = {
    "card_line": 1,
    "page": 1,
    "size": 20,
    "area_list": [],
    "area_second_id": "",
    "is_top": 0
}
data = json.dumps(data, separators=(',', ':'))
response = requests.post(url, headers=headers, data=data)

print(response.text)
print(response)
复制代码
cp = execjs.compile(open('run.js','r',encoding='utf-8').read())
result = cp.call('getSign',unique_id)
print(result)
headers = {
    "accept": "application/json",
    "accept-language": "zh-CN,zh;q=0.9",
    "cache-control": "no-cache",
    "chart_ab": "4",
    "content-type": "application/json",
    "is_show_classification_word": "1",
    "label_assembly_ab": "1",
    "open-id": "",
    "pp-os": "0",
    "pp-placeid": unique_id,
    "pp-suid": unique_id,
    "pp_storeid": unique_id,
    "pragma": "no-cache",
    "priority": "u=1, i",
    "sec-fetch-dest": "empty",
    "sec-fetch-mode": "cors",
    "sec-fetch-site": "cross-site",
    "shopping_car_hint_banner_module": "1",
    "sign-v2": result['sign'],
    "spu_shopping_guide_link_ab": "1",
    "timestamp": str(result["timestamp"]),
}
url = "product/recall"
data = {
    "card_line": 1,
    "page": 1,
    "size": 20,
    "area_list": [],
    "area_second_id": "",
    "is_top": 0
}
data = json.dumps(data, separators=(',', ':'))
response = requests.post(url, headers=headers, data=data)

print(response.text)
print(response)

结果

总结

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

相关推荐
likuolei25 分钟前
XML DOM 节点类型
xml·java·服务器
ZHE|张恒2 小时前
Spring Bean 生命周期
java·spring
二川bro2 小时前
量子计算入门:Python量子编程基础
python
夏天的味道٥3 小时前
@JsonIgnore对Date类型不生效
开发语言·python
tsumikistep3 小时前
【前后端】接口文档与导入
前端·后端·python·硬件架构
q***38514 小时前
SpringCloud实战十三:Gateway之 Spring Cloud Gateway 动态路由
java·spring cloud·gateway
小白学大数据4 小时前
Python爬虫伪装策略:如何模拟浏览器正常访问JSP站点
java·开发语言·爬虫·python
程序员西西5 小时前
SpringBoot接口安全:APIKey保护指南
java·spring boot·计算机·程序员·编程·编程开发
summer_west_fish5 小时前
单体VS微服务:架构选择实战指南
java·微服务·架构
v***8575 小时前
Ubuntu介绍、与centos的区别、基于VMware安装Ubuntu Server 22.04、配置远程连接、安装jdk+Tomcat
java·ubuntu·centos