声明
本文章中所有内容仅供学习交流使用,不用于其他任何目的,抓包内容、敏感网址、数据接口 等均已做脱敏处理,严禁用于商业用途和非法用途,否则由此产生的一切后果均与作者无关!
有相关问题请第一时间点击头像看简介或私信联系我删除博客!
部分python
def request(method, path, params=None, json_body=None): .............................. headers = dict(BASE) headers.update({ "v": V, "ct": CT, "p": P, "sv": SV, "x-mcd-gw-v": XMCDGWV, "token": TOKEN, "mcdtoken": TOKEN, "sid": "", "st": st, "nonce": nonce, "d": D_HEADER, "x-hmac-digest": b64encode( hmac.new(SIGN_KEY.encode(), body, hashlib.sha256).digest() ).decode(), }) authorization = make_authorization(method, path, params, headers, date) headers["authorization"] = authorization if method == "GET": return requests.get(url, headers=headers) else: headers["Content-Type"] = "application/json" return requests.post(url, headers=headers, data=body) if __name__ == "__main__": r = request("GET", "/bff/spc/menu", { "storeCode": "1400422", "orderType": "1", "beCode": "140042211", "beType": "4", "orderMode": "0", "pinId": "", "dayPartCode": "2", }) print(r.status_code) print(r.text[:800])
结果
![]()
总结
1.出于安全考虑,本章未提供完整流程,调试环节省略较多,只提供大致思路,具体细节要你自己还原,相信你也能调试出来。