A CLI tool for LSB image steganography
Project description
Stegabot
Stegabot is a lightweight Python CLI tool and library for LSB (Least Significant Bit) Image Steganography. It allows you to hide secret text messages inside digital images without altering their visual appearance.
Features
- Invisible Data Hiding: Uses LSB encoding to ensure the message is undetectable to the human eye.
- CLI Support: Run encoding and decoding directly from your terminal.
- Developer Friendly: Simple API for integration into other Python projects.
- Lossless Support: Optimized for
.pngand.bmpformats.
Installation
Install Stegabot directly from PyPI:
pip install stegabot
UsageCommand Line Interface (CLI)
Once installed, you can use the stegabot command anywhere in your terminal.
- Encoding (Hiding a message)
stegabot encode input_image.png "Your secret message here" encoded_output.png
- Decoding (Extracting a message)
stegabot decode encoded_output.png
- Using as a Python Library
You can also import Stegabot into your own Python scripts:
from stegabot import encode_image, decode_image
# Hide a message
success = encode_image("photo.png", "Meet me at midnight", "secret.png")
if success:
print("Message hidden successfully!")
# Extract a message
message = decode_image("secret.png")
print(f"The hidden message is: {message}")
How it Works
Stegabot uses the Least Significant Bit (LSB) method.
It modifies the last bit of the Red, Green, and Blue color
channels for each pixel. Since the change only alters
the color value by 1/255th, the difference is mathematically
present but visually invisible.
Important Considerations
-
Image Format: Always use PNG or BMP. JPEG uses lossy compression which will "smear" the pixels and destroy the hidden data bits.
-
Message Size: The maximum message length depends on the total number of pixels in your image (
Width*Height). -
Security: This tool provides steganography (hiding), not encryption. For high-security needs, encrypt your text before encoding it with Stegabot.
Contributing
Contributions are welcome! If you have suggestions for improvements or find bugs, please open an issue or submit a pull request on GitHub.
-
Fork the Project
-
Create your Feature Branch (git checkout -b feature/NewFeature)
-
Commit your Changes (git commit -m 'Add some NewFeature')
-
Push to the Branch (git push origin feature/NewFeature)
-
Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
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 Distribution
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 stegabot-0.1.1.tar.gz.
File metadata
- Download URL: stegabot-0.1.1.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee80de0ca9bce9a494bf79bdda47de1c43d6f1ca6733835d1f472952424b239c
|
|
| MD5 |
c500a9b712d2faeec0f7b386c21a1039
|
|
| BLAKE2b-256 |
4c092217ee3358a98cb2298bed5f4c4ea62ce9f8e9ca2e030bd8b448ac750a08
|
File details
Details for the file stegabot-0.1.1-py3-none-any.whl.
File metadata
- Download URL: stegabot-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dac7aad9f34d947442127acb48c02c5953e10697315edb074080da0f09629679
|
|
| MD5 |
9b76965f0f8759bcfb91b75804eb06c7
|
|
| BLAKE2b-256 |
37504ccaa1a9340e87c48ef7f94d9dd89f7da955129e7642f867d8a7cd56768f
|