Skip to content

codewithgaani/Steganography-Tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Steganography-Tool

Hide files or text inside images and extract them later โ€” with optional password encryption and a simple Python GUI.

โš ๏ธ For learning and personal use only. Steganography is not a substitute for strong cryptographic protocols in high-risk scenarios.

โœจ Features

๐Ÿ”’ Optional encryption for hidden data (password-based)

๐Ÿ–ผ๏ธ Lossless image support (PNG recommended)

๐Ÿงฐ Hide & Extract modes in a single GUI

๐Ÿ“ฆ Works with arbitrary files (audio, docs, zips, etc.) or plain text

๐Ÿงฎ Capacity check to avoid truncation (explained below)

๐Ÿ“ธ Screenshots / Outputs

The repo includes example outputs like stego_output.png. Add your own GUI screenshots here if youโ€™d like:

/stego_output.png /stego_output (1).png

๐Ÿš€ Getting Started Prerequisites

Python 3.8+

Pip

Install

(optional) create a virtual environment

python -m venv .venv

Windows: .venv\Scripts\activate

macOS/Linux: source .venv/bin/activate

install dependencies

pip install pillow cryptography

If your code uses a different crypto lib (e.g., PyCryptodome), replace cryptography above with the actual dependency.

Run python tool.py

This launches the GUI.

๐Ÿ–ฑ๏ธ How to Use (GUI) Hide (Embed)

Open cover image (PNG recommended).

Choose payload: either select a file to hide (e.g., WhatsApp Audioโ€ฆ) or type a secret message.

Set password (optional) for encryption.

Choose output filename (e.g., stego_output.png).

Click Hide / Embed.

Extract (Reveal)

Open stego image (e.g., stego_output.png).

Enter the password (if you used one).

Choose where to save the revealed file / copy revealed text.

Click Extract / Reveal.

๐Ÿง  How It Works (High-Level)

The payload (file or text) is converted to bytes.

If a password is provided, the bytes are encrypted (e.g., using a symmetric cipher via cryptography).

A small header (e.g., payload length, mode, maybe filename) is prepended.

Bits are embedded into the least significant bits (LSB) of the image pixels.

On extraction, the header is read first, then the payload is reconstructed and decrypted if needed.

Why PNG? PNG is lossless. JPEG is lossy and can corrupt embedded bits, so donโ€™t use JPG/JPEG for steganography.

๐Ÿ“ Capacity & Limits

Rough capacity for RGB PNGs:

capacity_bytes โ‰ˆ (width * height * 3) / 8 - overhead

3 channels per pixel (R, G, B), ~1 bit used per channel

overhead includes header and (if enabled) encryption IV/tag

If the payload is too large for the cover image, use a bigger image or compress/zip your file first.

๐Ÿ” Security Notes

Steganography hides that data exists; encryption protects what it says.

Use a strong password. Without a password, hidden data is only obscured, not protected.

This project is for educational use; donโ€™t rely on it for high-stakes secrecy.

๐Ÿ—‚๏ธ Project Structure . โ”œโ”€โ”€ tool.py # main app (GUI + logic) โ”œโ”€โ”€ stego_output.png # example stego image โ”œโ”€โ”€ stego_output (1).png # another example โ””โ”€โ”€ README.md # you are here

(There is also a sample payload file in the repo you can use for testing.)

๐Ÿงช Quick Test

Run python tool.py.

Choose a PNG cover image.

Hide a small .txt file (or type a short message).

Save to stego_output.png.

Extract from stego_output.png and verify the contents match.

๐Ÿงญ Roadmap (Nice-to-haves)

Drag-and-drop for files/images

Batch embedding/extraction

JPEG-compatible strategy (DCT-based stego) with warnings

Built-in compressor for large payloads

Dark/light theme toggle

CLI flags for headless use

๐Ÿค Contributing

Issues and PRs are welcome! If you change dependencies, please update the README and add a requirements.txt.

๐Ÿ“„ License

MIT License โ€” Copyright (c) 2025

๐Ÿ™Œ Acknowledgements

Python community & docs

Pillow for image processing

cryptography for encryption

๐Ÿ“ฌ Contact

Author: @codewithgaani

Project: Steganography-Tool

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages