xlog-decoder
High-performance, pure-Rust command-line decoder for Tencent Mars xlog files, batch log directories, and Feedback diagnostic ZIP archives.
Provides both xlog-decoder and mars-xlog binary aliases for full drop-in compatibility.
Installation
Or run via cargo:
Features
- Single file decoding: Decrypt and unpack Tencent Mars
.xlogfiles to.log. - Directory batch processing: Recursively traverse folder trees, decode all
.xlogfiles while mirroring directory structure. - Feedback ZIP unpacking: Automatically extract feedback diagnostic
.zippackages, decode all nested.xlogfiles, and clean up extraction artifacts. - ECDH Cryptography: Support ECDH secp256k1 private keys via CLI flags (
-k,-p,--key) or environment variable (MARS_XLOG_KEY). - Flexible CLI ergonomics: Direct file arguments without subcommands (
xlog-decoder input.xlog output.log) as well as explicit flags (-i,-o). - Key pair generator: Built-in
gen-keysubcommand to generate compatible ECDH public/private key pairs.
Usage Examples
1. Direct Single-File Decoding
# Decrypt encrypted xlog file
# Plaintext non-encrypted xlog file
You can also use flag syntax or the mars-xlog alias:
2. Batch Directory Processing
Recursively decode all .xlog files in a folder into a target directory:
3. Feedback ZIP Archive Extraction & Decoding
Automatically unpack user diagnostic ZIP files and decode all internal .xlog files:
4. Key Pair Generation
Generate a secp256k1 public/private key pair suitable for Tencent Mars log encryption:
Outputs:
Public key (hex): 04...
Private key (hex): ...
License
MIT