更新 files_utils.py

master
wangsiyuan 2023-10-18 15:13:04 +08:00
parent 054d36b04d
commit e358abc840
1 changed files with 8 additions and 0 deletions

View File

@ -13,3 +13,11 @@ def read_javascript(script_path):
with open(script_path, "r") as file: with open(script_path, "r") as file:
script_code = file.read() script_code = file.read()
return script_code 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")