PNGme is a command-line tool that allows you to hide secret messages inside PNG image files without changing how they look.
This project is an implementation of the "PNGme: An Intermediate Rust Project" tutorial, made for learning purposes.
This program can:
- Hide text messages inside PNG files
- Extract hidden messages from PNG files
- Remove hidden messages from PNG files
- Show all data chunks in a PNG file
The hidden messages are stored in the PNG file's metadata chunks, so the image looks exactly the same but contains your secret data.
-
Make sure you have Rust installed: https://rustup.rs/
-
Clone and build the project:
git clone https://github.com/yalperg/PNGme.git
cd PNGme
cargo build --release
Hide a secret message in a PNG file:
cargo run -- encode <PNG_FILE> <CHUNK_TYPE> "<MESSAGE>"
Example:
cargo run -- encode photo.png "ruSt" "This is my secret message"
You can also save to a different file:
cargo run -- encode photo.png "ruSt" "Secret text" --output-file new_photo.png
Get a hidden message from a PNG file:
cargo run -- decode <PNG_FILE> <CHUNK_TYPE>
Example:
cargo run -- decode photo.png "ruSt"
Remove a hidden message from a PNG file:
cargo run -- remove <PNG_FILE> <CHUNK_TYPE>
Example:
cargo run -- remove photo.png "ruSt"
Display all chunks in a PNG file:
cargo run -- print <PNG_FILE>
Example:
cargo run -- print photo.png