diff --git a/auto-analysis/utils.py b/auto-analysis/utils.py index 4318c7f..382270a 100644 --- a/auto-analysis/utils.py +++ b/auto-analysis/utils.py @@ -45,12 +45,12 @@ def extract_file(from_path, to_path): def patch_file(_key, _iv, to_dir): - exports_path = os.path.join(BASE_DIR, "../exports") + exports_file_path = os.path.join(BASE_DIR, "../exports.tar.gz") save_dir = os.path.join(to_dir, "build") if not os.path.exists(save_dir): os.makedirs(save_dir) - subprocess.call(["cp", "-r", f"{exports_path}/*", save_dir]) + subprocess.check_call(["tar", "-zxvf", exports_file_path, save_dir]) patch_file_path = os.path.join(save_dir, "typora.py") content = open(patch_file_path, "r").read() content = content.replace("{AES_KEY}", f"b''.fromhex('{_key}')") diff --git a/exports.tar.gz b/exports.tar.gz new file mode 100644 index 0000000..3ac50b7 Binary files /dev/null and b/exports.tar.gz differ