agentic-os
AFaffaan-m/ECC279k3,369 new stars in the last 7 days
Read, decrypt, query, search, and export local WeCom/企业微信 5.x desktop databases on macOS into a private read-only vault. Use when the user asks to parse 企业微信本地数据、企微聊天记录、WeCom/WXWork contacts, sessions, groups, customers, message history, local database backup, structured export, or a Mac enterprise-WeChat data analysis workflow.
只读取 Mac 企业微信5.x本地数据库,生成新的私密明文快照,再从快照查询联系人、会话和消息。把它与个人微信 yichen-wechat-local-vault 分开使用;两者的容器、加密算法和表结构不兼容。
/Applications/企业微信.app,也绝不发送企业微信消息。--confirm-attach 的捕获命令;系统拒绝 attach 时优先改用签名副本路线。SKILL_DIR="${CODEX_HOME:-$HOME/.codex}/skills/yichen-wecom-local-vault"
python3 "$SKILL_DIR/scripts/vault_cli.py" status
依赖:日常发现与查询只需要 Python 3;解密需要 pycryptodome;Mac 被动捕获 key 另外需要 frida。不要自动安装依赖,先报告缺项。
status,只检查数据库,不附加进程。decrypt 创建新快照;默认合并已提交的 WAL 帧。task_for_pid,再使用重签副本捕获。sessions、contacts、history、search、export,不要重新解密。python3 "$SKILL_DIR/scripts/vault_cli.py" discover
python3 "$SKILL_DIR/scripts/vault_cli.py" status
python3 "$SKILL_DIR/scripts/vault_cli.py" status --show-paths
python3 "$SKILL_DIR/scripts/capture_key_macos.py" list
python3 "$SKILL_DIR/scripts/capture_key_macos.py" doctor
python3 "$SKILL_DIR/scripts/scan_dbkey_manager_macos.py" scan
只有用户明确需要看真实路径时才使用 --show-paths。多账号时用 --data-dir 指定包含 message.db、session.db、user.db 的数据集。
此步骤只被动附加已经运行的进程,不启动或操作客户端。必须获得用户当轮明确授权:
python3 "$SKILL_DIR/scripts/capture_key_macos.py" capture \
--confirm-attach \
--duration 60
捕获器监听 CommonCrypto AES/MD5 调用,将候选16字节 key 与本地加密库第一页逐一验证;只有验证成功才以 0600 写入私密 Vault,终端不显示 key。若超时,报告“未捕获”,不要让用户在客户端里进行点击操作,也不要自行重签应用。
doctor 只读检查 Python、Frida、Developer Tools、SIP 和数据库格式。若 macOS 拒绝 task_for_pid,停止捕获并报告权限边界;不要自动关闭 SIP、放宽系统 taskport 或重签企业微信。参考 Frida macOS 官方说明和官方故障排查。
当原始企业微信 attach 被 macOS 拒绝,且用户明确允许修改边界时,可以复制并 ad-hoc 重签企业微信副本。脚本会通过 Frida 启动副本并等待 key;如果副本要求登录,只提示用户手动登录,不点击 UI、不发送消息、不关闭原始企业微信。若原始企业微信仍在运行导致副本被单实例机制拉起后退出,必须让用户自己退出原始客户端后再重试。
python3 "$SKILL_DIR/scripts/capture_key_macos.py" capture \
--mode spawn-signed-copy \
--confirm-signed-copy \
--duration 240
副本默认写入:
~/Library/Application Support/wecom-local-vault/apps/WeComSigned-<timestamp>.app
该路线会额外 hook DbKeyManager::UpdateKey、GetAllLocalEncryptKey 回调和内部 wxSQLite3 页加解密函数。当前 5.0.x macOS 客户端里,内部页加解密函数会复制 args[3][0..15],再拼接页码和 sAlT 派生每页 AES key;捕获器将这个 16 字节 raw key 候选与当前本地数据库第一页逐一验证,只有验证成功才会保存。
Frida 被系统拒绝时,可改用只读 Mach VM 扫描 DbKeyManager;它不注入代码、不重启或重签客户端、不操作 UI,但需要用户在本机终端输入管理员密码:
python3 "$SKILL_DIR/scripts/scan_dbkey_manager_macos.py" scan --confirm-sudo
该扫描器根据当前进程 load address 定位 DbKeyManager vtable,并只读取 this+0x68 的 Apple libc++ std::string 候选 key;候选通过数据库第一页验证后才写入私密 Vault,终端不显示 raw key。
python3 "$SKILL_DIR/scripts/vault_cli.py" decrypt
python3 "$SKILL_DIR/scripts/vault_cli.py" decrypt --key-file "/private/path/keys-时间戳.json"
快照默认写入:
~/Library/Application Support/wecom-local-vault/snapshots/<timestamp>-<dataset_id>/
每个快照包含 manifest.json,并标记 contains_plaintext_wecom_data: true。脚本把 WAL 中 header salt 匹配、且在最后一次已提交事务以前的页面解密并合并到新快照,不改源 WAL。
python3 "$SKILL_DIR/scripts/vault_cli.py" sessions --limit 50
python3 "$SKILL_DIR/scripts/vault_cli.py" contacts --query "关键词"
python3 "$SKILL_DIR/scripts/vault_cli.py" history "群名或conversation_id" \
--start "2026-07-01" --end "2026-07-13" --limit 500
python3 "$SKILL_DIR/scripts/vault_cli.py" search "关键词" \
--chat "群名" --start "2026-07-01" --limit 200
python3 "$SKILL_DIR/scripts/vault_cli.py" export "群名" \
--start "2026-07-01" --format markdown
默认读取最新快照;需要固定证据版本时传 --snapshot。导出默认写入私密 Vault 的 exports/,文件权限为 0600,已有目标文件一律拒绝覆盖。
status 再处理真实数据。数据库格式、表结构和 WAL 说明见 references/database-notes.md。
cd "$SKILL_DIR/scripts"
python3 test_wecom_local_vault.py
python3 -m py_compile *.py
python3 "$HOME/.codex/skills/.system/skill-creator/scripts/quick_validate.py" "$SKILL_DIR"
mode=ro&immutable=1 打开;不把 immutable 用于运行中的源库。python3 -c "import Crypto" 检查解释器依赖;缺少时报告,不自动安装。--data-dir 接受数据库目录路径,不接受发现结果中的 dataset_id。多个数据集时明确选择,不能猜测账号。AFaffaan-m/ECC279k3,369 new stars in the last 7 days
GAgarrytan/gstack136k718 new stars in the last 7 days
ADaddyosmani/agent-skills106k2,803 new stars in the last 7 days
NEnexu-io/open-design101k951 new stars in the last 7 days
NEnexu-io/open-design101k951 new stars in the last 7 days
THthedotmack/claude-mem100k2,386 new stars in the last 7 days