rpfixer/readme.md

58 lines
1.8 KiB
Markdown
Raw Normal View History

2024-12-15 17:20:27 +00:00
# rpfixer (formerly respack-decrypter)
2024-12-03 23:29:50 +00:00
2024-12-15 17:20:27 +00:00
This tool allows you to fix corrupted images' metadata in a resource pack, where the images have been corrupted to be protected.
2024-12-08 22:13:19 +00:00
This tool will not overcome any protection to the zip archive itself. See a program such as [MCRPX](https://github.com/Speedy11CZ/mcrpx) for that.
2024-12-03 23:29:50 +00:00
2024-12-04 00:26:25 +00:00
# Usage
2024-12-08 22:13:19 +00:00
## CLI
2024-12-16 00:43:47 +00:00
#### Premade package (easiest)
- Go to the releases tab
- Download for your system and unzip it
- (Step for linux users only) run `chmod +x` on the executable
2024-12-16 00:45:48 +00:00
- Open a command prompt (windows) and run rpfixer.exe
- Open a terminal / terminal emulator (linux) and run rpfixer.exe
2024-12-16 00:43:47 +00:00
#### Cargo
- Download the Rust-Lang for your system (WARNING: THIS IS LIKE 10GIGABYTES ON WINDOWS)
- run `cargo install rpfixer`
- Then run the `rpfixer` command
#### Manual clone
2024-12-16 00:43:47 +00:00
- You really should not do this
- download the Rust-Lang for your system (WARNING: THIS IS LIKE 10GIGABYTES ON WINDOWS)
2024-12-04 00:26:25 +00:00
- download this repository
- run `cargo build --release` in the directory
- check `./target/release`
2024-12-08 22:13:19 +00:00
- run
2024-12-15 17:20:27 +00:00
- `rpfixer` if you are on linux/mac (RUN `chmod +x rpfixer` ON IT FIRST)
- `rpfixer` if you are on windows
2024-12-16 00:45:48 +00:00
## Syntax for CLI
Check `--help` for syntax.
Example syntax: `rpfixer --path ./filepath/`
## Function library
- The library has one function: `rpfixer::fix`. Use a `Vec<u8>` in it.
#### Example code
```rust
use std::fs;
fn main() {
2024-12-15 17:20:27 +00:00
let frfr: Vec<u8> = fs::read("filepath.png").expect("wtf the path doesnt exist");
let mut fr: Vec<u8> = rpfixer::fix(frfr);
2024-12-15 17:14:17 +00:00
fs::write("filepath.png", fr).expect("file could not write btw");
}
```
2024-12-08 22:13:19 +00:00
2024-12-04 00:26:25 +00:00
2024-12-03 23:29:50 +00:00
# License
2024-12-15 17:20:27 +00:00
It's all MIT, except the example corrupted inventory.png and inventory-fix.png which is courtesy of Wynncraft.
2024-12-04 00:26:25 +00:00
2024-12-15 17:20:27 +00:00
Zeer you better not come after me for this one, you guys still haven't answered my gdpr req yet