Skip to content

feat(macOS): fix V4 image decryption and HEVC transcoding#515

Open
qicai21 wants to merge 2 commits intohicccc77:mainfrom
qicai21:feature/macos-dat-v4-decryption
Open

feat(macOS): fix V4 image decryption and HEVC transcoding#515
qicai21 wants to merge 2 commits intohicccc77:mainfrom
qicai21:feature/macos-dat-v4-decryption

Conversation

@qicai21
Copy link
Copy Markdown

@qicai21 qicai21 commented Mar 21, 2026

修复了 macOS 4.17 版本微信 DAT 图片解密存在的几个关键问题:

密钥推演修正:修复了 macOS 特有的 MD5(Code + CleanedWxid) 逻辑,解决了解密报错问题。
字节序修复:将 bytesToInt32 修正为小端序 (Little Endian),解决了 4.17 版本高清图解密后花屏/损坏的问题。
4 字节严苛匹配:将签名校验提升至 4 字节,彻底解决了内存扫描时 1/65536 的误报概率(假阳性)。
WXGF 提取优化:改进了 HEVC NALU 提取逻辑,并增加了对 macOS 系统下 ffmpeg 路径的自动搜索支持。

非常感谢你的程序和思路!

- Implemented correct macOS-specific MD5 key derivation (Code + Cleaned Wxid).
- Improved kvcomm file discovery by including monitordata patterns.
- Enhanced wxid normalization for accounts like wxid_xxx_yyyy.
- Added robust ffmpeg path detection for macOS (Homebrew/System).
- Fixed HEVC bitstream extraction and transcoding flags (-f hevc).
@xunchahaha
Copy link
Copy Markdown
Collaborator

@codex

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@hicccc77
Copy link
Copy Markdown
Owner

你好!

关于你提到的解密错误,可否提供如下信息以辅助我验证

1.解密失败的图片的原始消息xml
2.修改后可以解密而修改前无法解密的图片示例
3.你使用的密钥是内存扫描取得的还是缓存计算取得的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants