# WeChat：恢复 macOS 聊天数据库并导出 HTML

> WeChat export 项目从 macOS 微信 4.x 的本地数据库中恢复聊天记录。Frida 脚本截取传入 CommonCrypto 的 CCCryptorCreate 函数的密钥；Python 脚本将各数据库的密钥与 SQLCipher 文件匹配，解密文件、解析联系人和消息表，并生成可在浏览器查看的 HTML。文档还记录了数据库路径和消息格式差异。

- 类型：案例
- 目标：应用
- 类别：独立重建案例
- 关联：独立重建项目
- 来源复核于：2026-11-06
- 收录于：2026-11-08
- 原始资源：<https://github.com/patients760/wechat-export>
- 一手来源：<https://github.com/patients760/wechat-export/blob/783b4a5cd4f71ffa4c36604e9f4a49b219fa3ad9/README.md>
- 目录页面：<https://awesomerea.org/zh/resources/wechat-export-case/>
- 记录 JSON：<https://awesomerea.org/resources/wechat-export-case/record.json>
- 英文版：[English](https://awesomerea.org/resources/wechat-export-case/index.md)

## 使用条件与局限

- **前提条件：**需要在 macOS 13 或更新版本上运行微信 4.x，并能访问本人本地数据库。
- **前提条件：**需要 Python 3.10 或更新版本、Frida 和 sqlcipher 命令行工具；Frida 注入可能需要调整 SIP 或取得签名授权。
- **范围：**项目指定用于对本人聊天数据进行个人学习、研究和备份。
- **许可：**仓库中没有许可证文件。

## 一手来源

1. <https://github.com/patients760/wechat-export/blob/783b4a5cd4f71ffa4c36604e9f4a49b219fa3ad9/README.md>
2. <https://github.com/patients760/wechat-export/blob/783b4a5cd4f71ffa4c36604e9f4a49b219fa3ad9/article_reddit.md>

## 同分区更多条目：应用

- [led-hue-cycle：重建 LEDDMX 灯带的 BLE 控制](https://awesomerea.org/zh/resources/led-hue-cycle-case/index.md) · 案例
- [OPPO 移动电源助手：在 macOS 上重建移动电源控制功能](https://awesomerea.org/zh/resources/oppo-powerbank-mac-case/index.md) · 案例
- [LaMetric TIME Recovery Toolkit：还原时钟配网接口](https://awesomerea.org/zh/resources/lametric-time-recovery-case/index.md) · 案例
- [AvellSucks：还原 Avell 笔记本的 EC 控制接口](https://awesomerea.org/zh/resources/avellsucks-case/index.md) · 案例
- [PodFlick：重建 iPod Video 媒体库编辑方式](https://awesomerea.org/zh/resources/podflick-case/index.md) · 案例
- [Vcf-compiler：重建 VCutWorks VCF 文件格式](https://awesomerea.org/zh/resources/vcf-compiler-case/index.md) · 案例

## 关于此条目

说明已依据一手来源复核。
原创说明采用 MIT 许可；外部项目、论文与素材保留各自的权利和许可。
