Commit Graph

18 Commits (5f1a6a52bb8151c93265e86ce2f0c55840c38d22)

Author SHA1 Message Date
jackwener 739b66a4b1 chore(release): bump version to 0.3.0 2026-05-16 02:23:46 +08:00
jackwener 52cc39a55c chore(release): bump version to 0.2.0
主要新增:
- `wx attachments` / `wx extract`:从本地 chat 数据解密提取 V2 图片附件(macOS / Windows)
- `DbCache` WAL 增量复用:daemon 请求路径从每次 ~120s 全量解密压到 < 1s(典型 WAL)

完整 changelog 见 #57 / #58。
2026-05-14 21:38:05 +08:00
jackwener 14fdfde1d3 feat(attachment): scaffold module + V1 decoders + resource resolver
Lays down the skeleton for聊天附件 (chat attachment) extraction. This commit
introduces the `attachment` module with:

- `attachment_id`: opaque base64url(json) round-trip handle for CLI/IPC. Carries
  `(chat, local_id, create_time, kind)` — `local_id` alone is not unique
  (实测同 chat 内最多 7 条同 local_id 的记录), so create_time is required for
  disambiguation.
- `decoder/`: dispatch by 6B header magic. Three branches:
  - `V2_MAGIC` → AES-128-ECB + raw + XOR (need image AES key)
  - `V1_MAGIC` → AES-128-ECB with fixed key `cfcd208495d565ef` (= md5("0")[:16])
  - else → legacy single-byte XOR with magic auto-detect
  Manual ECB + PKCS7 unpad to avoid pulling in another crate.
- `resolver`: `message_resource.db` lookup chain
  `username → ChatName2Id.rowid → MessageResourceInfo.packed_info → md5`
  + on-disk `.dat` selection (full > _h > _t) under
  `<wxchat_base>/msg/attach/<md5(chat)>/<YYYY-MM>/Img/<md5>[_t|_h].dat`.
  Honors `message_local_type % 2^32` to strip the high flag bits, and orders by
  `message_create_time DESC` to handle local_id reuse.
- `image_key/`: stub trait + macOS / Windows placeholders. To be filled by
  codex with the V2 image key extraction (kvcomm + brute-force on macOS, memory
  scan on Windows).

V1 decoder ships with 6 unit tests covering every supported magic + the BMP
extra validation; resolver ships with packed_info parser + dat-file selection
tests; v2 decoder ships with header validation tests. 21 tests pass.

`cargo check` and `cargo check --target x86_64-pc-windows-gnu` both clean.
2026-05-14 18:25:32 +08:00
jackwener 5c001b18be chore(release): bump version to 0.1.11 2026-05-14 17:26:20 +08:00
jackwener 6659f48984 chore: bump version to 0.1.10 2026-04-19 21:27:59 +08:00
郭立lee 2b5d872f0b
feat(sns): sns-feed / sns-search 输出完整 media[] 字段 (#15)
#14 之上增量:把 sns-feed / sns-search 的 media_count 升级成完整 media[] 数组(含 url/thumb/key/token/md5/enc_idx/size + video_md5/duration),下游可直接做图片代理或离线渲染。

- 用 roxmltree(pure Rust,无 C 依赖)替代 regex 抽属性
- 字段命名对齐 artifacts 仓库 Python _parse_media,跨实现 diff 友好
- 14 个 sns 单测:作者新增 6 个 fixture(单图/三图/视频/纯文字/malformed/缺 totalSize)+ 已有 8 个保持
- 与之前 PR #14 的 --user XML fallback 修复 / SNS_MAX_LIMIT / SNS_MAX_SCAN / escape_like_pattern 完全兼容

Author: leeguooooo <guoli@zhihu.com>
Co-fixed-by: wx-cli-coder (rebase + 冲突解决 + 测试模块合并 + media_count 语义文档补充)
2026-04-19 02:22:55 +08:00
jackwener 697d3fc720 chore: bump version to 0.1.9 2026-04-18 02:11:28 +08:00
jackwener c564438994 chore: bump version to 0.1.8 2026-04-18 01:50:25 +08:00
jackwener 4e6907c5cc chore: bump version to 0.1.7 2026-04-17 16:42:02 +08:00
jackwener fe71f1e9f8 chore: bump version to 0.1.6 2026-04-17 15:05:44 +08:00
jackwener 0e2711dcf8 chore: bump to 0.1.5, fix publish to skip already-published versions 2026-04-17 09:25:04 +08:00
jackwener a5de749f0a chore: bump version to 0.1.4 2026-04-17 00:41:01 +08:00
jackwener 6931dfc4cc chore: update Cargo.lock for v0.1.3 2026-04-16 23:25:02 +08:00
jackwener 65c98e9736 chore: bump version to 0.1.2 2026-04-16 22:43:28 +08:00
jackwener 6cdc806642 chore: Apache-2.0 license, Windows support, install.ps1 2026-04-16 22:30:45 +08:00
jackwener a6fa82adb3 chore: bump version to 0.1.1 2026-04-16 16:18:04 +08:00
jackwener 6e599dbe33 docs: README 安装方式增加 cargo install wx-cli 2026-04-16 15:29:39 +08:00
jackwener d475f6219b feat: Rust 完整重写 wx-cli(单一二进制,支持 macOS/Linux/Windows)
实现所有核心模块:
- src/crypto/: SQLCipher 4 页解密 + WAL 应用(AES-256-CBC)
- src/scanner/: 三平台内存扫描(macOS Mach VM / Linux /proc/mem / Windows ReadProcessMemory)
- src/daemon/: tokio 异步 daemon,Unix socket IPC,mtime-aware DB 缓存,WAL 监听推送
- src/cli/: clap CLI,自动启动 daemon,完整命令实现
- src/config.rs: 跨平台配置加载,兼容 Python 版 config.json 格式
- src/ipc.rs: 换行符分隔 JSON 协议,与 Python 版兼容
- .github/workflows/release.yml: 四平台自动构建发布

cargo build --release 验证通过,生成 4.8MB macOS arm64 单一二进制
2026-04-16 14:37:10 +08:00