qrex

Crates.ioqrex
lib.rsqrex
version0.3.1
sourcesrc
created_at2024-10-25 20:47:11.514848
updated_at2024-10-27 10:38:29.700475
descriptionQt Resource Extractor
homepage
repositoryhttps://github.com/mb1986/qrex
max_upload_size
id1423143
size37,497
MichaƂ Blinkiewicz (mb1986)

documentation

README

Qt Resource Extractor (qrex)

Current Crates.io Version

Installation

The minimum supported rust version is: 1.74.1.

Install from crates.io:

cargo install qrex

or directly from GitHub:

cargo install --git https://github.com/mb1986/qrex

Configuration

binary_path: binary                # Path to the Qt application binary
output_path: output/directory      # Directory for extracted resources

base_address: 0x10000              # (optional) Address offset to be subtracted from all resource addresses

resources:                         # Container for resource entries
    - version: 3                   # Qt resource version (only version 3 is supported)
      addresses: { tree: 0xb34bd8, names: 0xb34a28, data: 0xb369d8 } # Addresses pointing to resource structures
      calls: [0x61b30, 0x64228]    # (optional) Addresses where the resource is registered

    - version: 3
      addresses: { tree: 0xa962e0, names: 0xa96170, data: 0xa95f98 }
      calls: [0x632e4, 0x64330]

    - version: 3
      addresses: { tree: 0x7811a8, names: 0x7810f8, data: 0x780c48 }
      calls: [0x63a88]
binary_path = "binary"             # Path to the Qt application binary
output_path = "output/directory"   # Directory for extracted resources

base_address = 0x10000             # (optional) Address offset to be subtracted from all resource addresses

[[resource]]                       # Resource entry
version = 3                        # Qt resource version (only version 3 is supported)
addresses = { tree = 0xb34bd8, names = 0xb34a28, data = 0xb369d8 } # Addresses pointing to resource structures
calls = [0x61b30, 0x64228]         # (optional) Addresses where the resource is registered

[[resource]]
version = 3
addresses = { tree = 0xa962e0, names = 0xa96170, data = 0xa95f98 }
calls = [0x632e4, 0x64330]

[[resource]]
version = 3
addresses = { tree = 0x7811a8, names = 0x7810f8, data = 0x780c48 }
calls = [0x63a88]

Usage

Usage: qrex [OPTIONS] <CONFIG>

Arguments:
  <CONFIG>  Path to the YAML or TOML configuration file

Options:
  -e, --extract    Extract resources
  -s, --skip-dirs  Skip creating separate directories for each resource
  -m, --metadata   Save resources' metadata
  -d, --debug      Enable debug messages
  -h, --help       Print help
  -V, --version    Print version

Todo

  • Documentation
  • Format metadata as TOML
  • Error handling (at least anyhow)
  • Better error handling
  • Tests
Commit count: 20

cargo fmt