-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Expand file tree
/
Copy pathWeChatDecrypt.spec
More file actions
91 lines (84 loc) · 2.48 KB
/
WeChatDecrypt.spec
File metadata and controls
91 lines (84 loc) · 2.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# -*- mode: python ; coding: utf-8 -*-
# PyInstaller spec — 打包 monitor_web.py 为单 exe。
#
# 启动后:
# 1. 起 HTTP 服务 + 监听线程 (如 keys 已就绪)
# 2. 自动开浏览器到 http://localhost:5678
# 3. 用户在 Web UI 工具箱里操作 (解密 / 导出 / 朋友圈 / 企微 / 语音)
#
# (历史: 这个 spec 之前打包 tkinter app_gui.py, 现已删除 — 完全切到 Web UI)
from PyInstaller.utils.hooks import collect_all
# 所有子进程 (工具按钮触发) 需要的脚本, 打进 exe 同目录
datas = [
('main.py', '.'),
('config.py', '.'),
('config.example.json', '.'),
('decrypt_db.py', '.'),
('decode_image.py', '.'),
('decrypt_sns.py', '.'),
('export_sns.py', '.'),
('export_messages.py', '.'),
('export_all_chats.py', '.'),
('export_chat.py', '.'),
('chat_export_helpers.py', '.'),
('voice_to_mp3.py', '.'),
('transcribe_chat.py', '.'),
('find_all_keys.py', '.'),
('find_all_keys_windows.py', '.'),
('find_all_keys_linux.py', '.'),
('find_image_key.py', '.'),
('find_image_key_monitor.py', '.'),
('find_wxwork_keys.py', '.'),
('decrypt_wxwork_db.py', '.'),
('export_wxwork_messages.py', '.'),
('wxwork_crypto.py', '.'),
('key_scan_common.py', '.'),
('key_utils.py', '.'),
('batch_decrypt_images.py', '.'),
('monitor.py', '.'),
('mcp_server.py', '.'),
]
binaries = []
hiddenimports = [
# 显式列, 避免 PyInstaller 漏 detect 导致打包后 import 报错
'Crypto', 'Crypto.Cipher', 'Crypto.Cipher.AES',
'zstandard',
'pilk',
]
# pilk 是 SILK 解码扩展, 需要把它的资源全收
tmp_ret = collect_all('pilk')
datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2]
a = Analysis(
['monitor_web.py'], # ← 入口从 app_gui.py 改成 monitor_web.py
pathex=[],
binaries=binaries,
datas=datas,
hiddenimports=hiddenimports,
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
optimize=0,
)
pyz = PYZ(a.pure)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
[],
name='WeChatDecrypt',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True, # 保留 console 显示后端日志 + 错误
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)