Last active
January 29, 2020 07:23
-
-
Save iydon/6c80ef657e8a1db3e22e636dee37feec to your computer and use it in GitHub Desktop.
配合 mitmproxy 工具使用下载 APP 数据
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mitmdump -s __file__ -p 8888 | |
from mitmproxy import http | |
idx = 1 | |
def request(flow): | |
pass | |
def response(flow): | |
global idx | |
url = 'https://aweme-lq.snssdk.com/aweme/v1/challenge/aweme/' | |
if flow.request.pretty_url.startswith(url): | |
with open(f'{idx}.json', 'w') as f: | |
# __import__('IPython').embed(colors='Linux') | |
f.write(flow.response.text) | |
idx += 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment