wuwa-pak
wuwa-pak 是一个用于解析和提取鸣潮 Pak 文件的 Python 工具包。
面向离线研究、数据整理和脚本化处理场景。需要显式提供自己的 Pak 文件和 AES key;工具本身不会尝试获取密钥、发现游戏进程或自动操作游戏客户端。
功能
- 读取 Pak footer 和索引信息。
- 支持加密索引解密。
- 解析 Pak 条目、文件名和压缩方法。
- 提取未压缩或 Zlib 压缩的条目。
- 处理鸣潮 Pak 条目的部分加密行为。
- 提供 CLI,用于查看 Pak 信息、列出条目、提取文件和扫描 SQLite 文件。
- 提供 Python API,便于集成到自己的离线脚本中。
安装
从 PyPI 安装:
pip install wuwa-pak
从源码安装开发环境:
git clone https://github.com/lyqgzbl/wuwa-pak.git
cd wuwa-pak
uv sync --all-groups
CLI 用法
查看 Pak 基本信息:
wuwa-pak info --pak path/to/file.pak --key HEX_KEY
列出 Pak 内文件:
wuwa-pak list --pak path/to/file.pak --key HEX_KEY
wuwa-pak list --pak path/to/file.pak --key HEX_KEY --filter .db
提取文件:
wuwa-pak extract --pak path/to/file.pak --key HEX_KEY --out out/
wuwa-pak extract --pak path/to/file.pak --key HEX_KEY --filter .db --out out/
扫描可能的 SQLite 条目:
wuwa-pak scan-sqlite --pak path/to/file.pak --key HEX_KEY
所有命令都必须显式传入 --pak 和 --key。extract 还必须显式传入 --out 输出目录。
Python API
from wuwa_pak.pak import PakArchive
archive = PakArchive.open("path/to/file.pak", "HEX_KEY")
for entry in archive.entries:
print(entry.name, entry.uncompressed_size, entry.encrypted)
data = archive.extract_entry(archive.entries[0])
支持范围
当前实现专注于鸣潮 Pak 的离线解析和提取,主要覆盖:
- Pak footer 解析。
- Pak index 解析。
- full directory index 文件名解析。
- AES-ECB 解密。
- 未压缩条目提取。
- Zlib 压缩条目提取。
- 鸣潮条目编码和部分加密长度处理。
不保证支持所有 Unreal Engine Pak 版本、所有压缩算法或所有游戏的自定义 Pak 变体。
开发与测试
uv sync --all-groups
uv run ruff format --check .
uv run ruff check .
uv run pytest
uv build
归因
鸣潮 Pak 条目解码和部分加密行为的实现参考了 CUE4Parse。CUE4Parse 是 Apache-2.0 许可的 Unreal Engine 归档解析库。
wuwa-pak 是独立的 Python 实现,面向离线脚本化处理场景。更多归因细节见 NOTICE。
许可证
wuwa-pak 使用 Apache 许可证 2.0 版。详见 LICENSE 和 NOTICE。
Metadata
Release files for wuwa-pak 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| wuwa_pak-0.1.0.tar.gz | 22.0 kB | Without provenance | Details for wuwa_pak-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wuwa_pak-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for wuwa_pak-0.1.0-py3-none-any.whl |
Total release size: 36.1 kB
Release files / wuwa_pak-0.1.0.tar.gz
| Download URL | wuwa_pak-0.1.0.tar.gz |
|---|---|
| Size | 22.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e3c45305282bccf3c8a5b5475877ad0eeda2ecbdd5b8172e6845f3edd6319ec0
|
|
BLAKE2b-256 checksum How to use checksums |
4a961c22ec66942458952b82ecfa25fea823f6882a5bb9d30d8965fbb7e40e85
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.5 {"installer":{"name":"uv","version":"0.11.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / wuwa_pak-0.1.0-py3-none-any.whl
| Download URL | wuwa_pak-0.1.0-py3-none-any.whl |
|---|---|
| Size | 14.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5568dc905d58b6c6057dc8db570d2dfb1a7d1ca7ccc7c9436044e8791a90ce6b
|
|
BLAKE2b-256 checksum How to use checksums |
511bad5a99fa9de51a16d34faf0f51e1b3e7bdfbbb0c7a3115d19159226d441f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.5 {"installer":{"name":"uv","version":"0.11.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for wuwa-pak 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.