A tool to inspect, strip metadata, and hide messages in PNG files.
Reason this release was yanked:
Early unstable release — use 0.3.0 instead
Project description
PNG Parser
A high-performance steganography tool built with Rust and Python. This library allows you to hide, read, and delete secret messages within PNG images using custom data chunks without affecting the visual quality of the image.
Features
- Blazing Fast: Core logic implemented in Rust for maximum speed.
- Stealthy: Uses custom PNG chunks (
stEg) that are ignored by standard image viewers. - Easy to Use: Simple Pythonic API.
- Safe: Includes a
deletefunction to strip hidden data and restore original file integrity.
Installation
Once the package is uploaded to PyPI, you can install it using pip:
pip install png-parser
Usage
1. Hiding a Message
Embed a secret string into any PNG file. This adds the data safely before the end of the file.
import png_parser
# This appends a hidden 'stEg' chunk to the image
status = png_parser.hide("my_image.png", "hello world")
print(status)
# Output: Success: Message hidden!
2. Reading a Message
Extract the hidden data from the image. If no message is found, it returns a helpful error string.
import png_parser
secret = png_parser.read("my_image.png")
print(f"Secret message: {secret}")
# Output: Secret message: hello world
3. Deleting the Secret
Remove the hidden chunks and restore the PNG to its original state (cleaning up the file size).
import png_parser
status = png_parser.delete("my_image.png")
print(status)
# Output: Success: Secret message deleted!
Technical Details
This tool manipulates the PNG Chunk Structure.
Every PNG consists of a series of chunks. This library inserts an "Ancillary Chunk" (optional data) named stEg. Standard image viewers are programmed to skip chunks they don't recognize. By placing our data before the IEND (End of Image) marker, the file remains a valid, viewable image while carrying your hidden payload.
Development
If you want to build this project from source, you will need:
- Rust (Cargo)
- Python 3.7+
- Maturin (
pip install maturin)
To build locally:
maturin develop
License
This project is licensed under the MIT License.
Author
Pranjal Panging
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file png_parser-0.1.1-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: png_parser-0.1.1-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 105.2 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4de5da525fdacfa29a7da2587aab992e6b55dba7c7fce351e1303e77b29a599
|
|
| MD5 |
c7131d36d602cafe59633e4fa05f2315
|
|
| BLAKE2b-256 |
2316c973c2ba8a0ca7a22f68ae3c41cb4c1f7af1abb52385922c5b8241139702
|