A lightweight Electron app that extracts the WeChat SQLCipher database encryption key from a running WeChat session. No sync, no tray — just run it, copy your key, close it.
- Detects WeChat — waits for WeChat to be running on your PC
- Guides logout — asks you to reach the WeChat login screen
- Extracts the key — restarts WeChat with an injected hook via
wetrace.exe, captures the key the moment you log in - Copy to clipboard — displays the key (and database path if detected) with one-click copy buttons
The key can then be used with decrypt_sync.exe or any other SQLCipher-aware tool to read your WeChat message databases.
- Windows 10/11 x64
- WeChat (国际版) or Weixin (微信) installed
vendor/wetrace.exe— the hook backend (see Setup)
cp ..\wereadmsg\vendor\wetrace.exe vendor\./build.sh --wetraceRequires Go installed and the wetrace source at C:\cygwin64\home\dev\code\wetrace.
npm install
npm start./build.shProduces dist/WetraceTool-Setup-<version>.exe.
To rebuild wetrace.exe and the installer in one step:
./build.sh --wetrace- Launch WetraceTool
- Open WeChat if it isn't already running — the app will detect it automatically
- Log out of WeChat (or confirm you're already at the login screen)
- Click Start — I'm ready to log in
- WeChat will restart — log in within 60 seconds
- The key is captured automatically and shown on screen
- Click Copy Key to copy it to the clipboard
- Close the app when done
Note: The app requires administrator privileges so
wetrace.execan attach to the WeChat process.
wetrace_wrapper/
main.js — Electron main process (window + wetrace + IPC)
preload.js — contextBridge API exposed to renderer
renderer/
index.html — app shell
app.js — wizard UI (4 steps)
styles.css — dark theme
assets/
icon.ico
vendor/
wetrace.exe — WeChat hook backend (not committed, copy manually)
build.sh — build script
package.json
wetrace.exe is a small Go program that injects a DLL hook into the WeChat process.
When WeChat initialises its SQLCipher databases at login, the hook intercepts the key
derivation call and exposes it via a local HTTP API on 127.0.0.1:18888.
WetraceTool calls GET /api/v1/system/wxkey/db on that API with a 70-second timeout —
long enough for you to complete the WeChat login.
| Symptom | Fix |
|---|---|
| "wetrace.exe not found" | Copy wetrace.exe into vendor/ |
| Timer runs out, no key | Make sure you logged in after clicking Start |
| WeChat not detected | Check tasklist for Weixin.exe or WeChat.exe |
| App closes immediately | Run as Administrator |