From e358abc84022d49847afd2204bd04cb0f8bf0a9b Mon Sep 17 00:00:00 2001 From: wangsiyuan <2392948297@qq.com> Date: Wed, 18 Oct 2023 15:13:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20files=5Futils.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/files_utils.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/files_utils.py b/modules/files_utils.py index 3ac313a..9fcf567 100644 --- a/modules/files_utils.py +++ b/modules/files_utils.py @@ -13,3 +13,11 @@ def read_javascript(script_path): with open(script_path, "r") as file: script_code = file.read() return script_code +def write_log(messages): + global FIRST_WRITE + print(f"FIRST_WRITE: {FIRST_WRITE}") + with open("frida_log.log", "a") as log_file: + if FIRST_WRITE: # 如果是首次写入 + log_file.write("\n\n\n") # 空出三行 + FIRST_WRITE = False # 更新状态,表明已经写过了 + log_file.write(str(messages) + "\n") \ No newline at end of file