From 6cc1c9ecc320412a502671542076fa14cd6dd7de Mon Sep 17 00:00:00 2001 From: Bigsk Date: Thu, 10 Oct 2024 22:06:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=BA=86=E4=B8=80=E4=BA=9Bpr?= =?UTF-8?q?int=E8=AF=AD=E5=8F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 篡改答案/main.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/篡改答案/main.py b/篡改答案/main.py index 466c2dc..62b6e8c 100644 --- a/篡改答案/main.py +++ b/篡改答案/main.py @@ -9,7 +9,7 @@ import adbutils from mitmproxy import http from mitmproxy.tools.main import mitmdump -auto_jump = False +auto_jump = True # 拦截 HTTP 响应,检查 URL 并逐个字段替换 def response(flow: http.HTTPFlow): @@ -22,7 +22,6 @@ def response(flow: http.HTTPFlow): if "application/json" in flow.response.headers.get("Content-Type", ""): # 读取原始响应体 response_text = flow.response.text - print(response_text) # 使用正则表达式逐个替换字段 response_text = re.sub(r'"answer":"[^"]+"', '"answer":"1"', response_text) @@ -56,7 +55,6 @@ def swipe_screen(): device = adbutils.adb.device() device.shell(command) - print(command) def answer_write(answer): time.sleep(13)