
xscanzm/wechat-4x-decrypt
Developer toolsThis page was translated automatically. Technical details may differ from the original. View the original
WeChat 4.x Local Chat Record Decryption and Retrieval Skill (Windows / Zero Third-Party Dependencies). Produced by: Skill · Monday · Pipi Future
Overview
A skill for AI Agents such as WorkBuddy / Claude Code / Codex is used to decrypt and retrieve (Weixin.exe / xwechat_files / db_storage) local chat databases on **, thereby exporting, searching, and summarizing your own chat records. WeChat 4.x stores chat records in the locally encrypted SQLite database (WCDB / SQLCipher variant). This skill provides a pure scripting workflow (using only Windows' built-in bcrypt.dll + Python standard library), enabling AI Agents to: 1. Automatically detects the currently running WeChat version, process, data directory, and active accounts; 2. Extracts decryption keys from **; 3. Batch decrypts encryption databases into plaintext SQLite; 4. Searches, exports, and summarizes chat content by keyword + timeframe. ⚠️ 。 For WeChat 3.x (WeChat.exe), please switch to pywxdump. ⚠️ 。 Key extraction depends on Windows CNG (bcrypt.dll). : Only operate on the user's local machine, the user's own account, and when the user specifically requests it; Do not read conversations unrelated to tasks, do not send chat content to third-party services, and do not retain unrelated personal privacy information in output. - WeChat 4.1+ process memory**, only one WCDB passphrase object; - Key tool locates com. Tencent.WCDB.Config.Cipher string object → Retrieve blob → XOR along the object chain to decode (27-byte mask) → obtain x'' → HMAC-SHA512 validation; - Decryption algorithm is SQLCipher 4 variant (AES-256-CBC + HMAC-SHA512, page_size=4096, reserve=80); - After decryption, the acontent column in the message_fts_v4_* table of message_fts.db is already the decoded text; using the name2id table can restore the speaker and session name. Therefore, any old scheme that relies on "searching for x'...' in memory or 'taking salt adjacent 32 bytes'" (pywxdump / NTLx-wechat-decrypt / ZedeX scripts) will inevitably hit zero on version 4.1+—this skill is not included. Copy the entire directory of this repository to the skills directory of the agent (directory name is the skill name):
Overview (machine translated)
Produced by skill · Monday · Pipi Future
A skill for AI Agents such as WorkBuddy, Claude Code, Codex, etc., used to decrypt and retrieve the local chat database of WeChat 4.x (Weixin.exe / xwechat_files / db_storage) on Windows native, thereby exporting, searching, and summarizing your own chat records.
1. What is this?
WeChat 4.x stores chat records in the locally encrypted SQLite database (WCDB / SQLCipher variants). This skill provides a pure scripting workflow with zero third-party dependencies (using only Windows’ built-in bcrypt.dll + Python standard library), enabling AI Agents to:
- Automatically detects the currently running WeChat version, processes, data directory, and active accounts;
- Extract the decryption key from the memory of the running WeChat process;
- Batch decrypt the encryption library into plaintext SQLite;
- Search, export, and summarize chat content by keyword + time window.
⚠️ > Only supports WeChat 4.x (Weixin.exe). For WeChat 3.x (WeChat.exe), please switch to pywxdump.
⚠️ > Supports Windows only. Key extraction depends on Windows CNG(bcrypt.dll).
2. Applicable / Not Applicable
| Applicable scenarios | Not applicable |
|---|---|
| Export your WeChat chat history for backup | WeChat 3.x (using pywxdump) |
| Locally retrieve a specific conversation or group | Non-Windows system |
| Let AI help you summarize/summarize what you talked about during a certain period | Read other people’s accounts and your logged-in status |
| Analyze recent discussion hotspots in a certain group | Online/cloud WeChat data |
Compliance: Only operate on the user’s local machine, the user’s own account, and when explicitly requested by the user; Do not read conversations unrelated to the task, do not transmit chat content to third-party services, and do not retain unrelated personal privacy information in output.
3. Working Principle (30-Second Version)
- WeChat 4.1+ process memory does not have a plaintext key, only a WCDB passphrase object;
- Key tool locates
com.Tencent.WCDB.Config.Cipherstring object → Retrieves blob → XOR along the object chain to decode (27-byte mask) → obtainx' '→ HMAC-SHA512 validation; - The decryption algorithm is a variant of SQLCipher 4 (AES-256-CBC + HMAC-SHA512, page_size=4096, reserve=80);
- After decryption, the
acontentcolumn in themessage_fts_v4_*table ofmessage_fts.dbis already the decoded text; using thename2idtable can restore the speaker and session name.
This page was translated automatically. Technical details may differ from the original.
Recommended Tools
Try a different keyword or remove a filter.
Install
npx skillfish add xscanzm/wechat-4x-decrypt