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.
Metadata
Release files for stegabot 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| stegabot-0.1.1.tar.gz | 4.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| stegabot-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.9 kB
Release files / stegabot-0.1.1.tar.gz
| Download URL | stegabot-0.1.1.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ee80de0ca9bce9a494bf79bdda47de1c43d6f1ca6733835d1f472952424b239c
|
|
BLAKE2b-256 checksum How to use checksums |
4c092217ee3358a98cb2298bed5f4c4ea62ce9f8e9ca2e030bd8b448ac750a08
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Release files / stegabot-0.1.1-py3-none-any.whl
| Download URL | stegabot-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dac7aad9f34d947442127acb48c02c5953e10697315edb074080da0f09629679
|
|
BLAKE2b-256 checksum How to use checksums |
37504ccaa1a9340e87c48ef7f94d9dd89f7da955129e7642f867d8a7cd56768f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|