A fast, cross-platform command-line utility built with Rust for managing (encrypting and decrypting) user data files from the game Bad Piggies.
This tool enables users to modify game progress (Progress.dat) and facilitate the sharing or editing of vehicle blueprints (.contraption) by reliably converting files between the game's encrypted binary format and a human-readable XML format.
- Decrypt Game Progress: Convert the encrypted
Progress.datfile into editable XML format. - Encrypt Game Progress: Convert an edited XML file back into the encrypted binary
Progress.datthat the game can read. - Contraption Blueprint Support: Encrypt and decrypt individual vehicle blueprint files (
.contraption). - Generate Template: Quickly create a template
Progress.dat.xmlfile for starting new saves or testing. - Cross-Platform: Compatible with Windows, macOS, and Linux.
Pre-compiled executables for various platforms are available on the Releases page.
If you have the Rust toolchain installed, you can build the project yourself:
git clone https://github.com/LambdaEd1th/badpiggies-cryptor-cli.git
cd badpiggies-cryptor-cli
cargo build --releaseThe compiled executable will be located in the target/release/ directory.
The application uses a standard COMMAND [OPTIONS] <FILE_TYPE> structure.
badpiggies-cryptor-cli <COMMAND> [OPTIONS]| Command | Description |
|---|---|
decrypt |
Decrypts a binary file (Binary -> XML). |
encrypt |
Encrypts a source file (XML -> Binary). |
generate |
Generates a sample Progress.dat.xml file. |
| Argument | Description |
|---|---|
-i, --input <PATH> |
The source file path for processing. |
-o, --output <PATH> |
The destination path for the result (optional). |
<FILE_TYPE> |
The file format being processed. Must be either progress or contraption. |
| File Type | Description |
|---|---|
progress |
For the main game save file (Progress.dat). |
contraption |
For individual vehicle blueprints (.contraption). |
Convert an encrypted Progress.dat into Progress.dat.xml for editing coins, power-ups, or unlocked levels.
badpiggies-cryptor-cli decrypt -i Progress.dat -o Progress.dat.xml progressRe-encrypt the edited XML file back to Progress.dat for use in the game.
badpiggies-cryptor-cli encrypt -i Progress.dat.xml -o Progress.dat progressConvert a .contraption file into an XML format.
badpiggies-cryptor-cli decrypt -i my_vehicle.contraption -o my_vehicle.xml contraptionCreate a default template save file named Progress.dat.xml in the current directory.
badpiggies-cryptor-cli generateThe tool accurately implements the custom encryption scheme used by Bad Piggies:
- Algorithm: AES-256-CBC with PKCS7 padding.
- Key Derivation: PBKDF2-HMAC-SHA1 with 1000 iterations.
- Data Integrity:
Progress.datfiles include a 20-byte SHA1 checksum header placed before the AES ciphertext to ensure file integrity and detect tampering.
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for the full text.
Disclaimer: This tool is an unofficial utility and is neither affiliated with nor endorsed by Rovio Entertainment. Use it at your own risk. Always back up your save files before modification.