Skip to main content

A CLI tool for LSB image steganography

Project description

Stegabot

PyPI version License: MIT Python Versions

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 .png and .bmp formats.

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.

  1. Encoding (Hiding a message)
stegabot encode input_image.png "Your secret message here" encoded_output.png
  1. Decoding (Extracting a message)
stegabot decode encoded_output.png
  1. 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.

  1. Fork the Project

  2. Create your Feature Branch (git checkout -b feature/NewFeature)

  3. Commit your Changes (git commit -m 'Add some NewFeature')

  4. Push to the Branch (git push origin feature/NewFeature)

  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stegabot-0.1.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stegabot-0.1.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file stegabot-0.1.0.tar.gz.

File metadata

  • Download URL: stegabot-0.1.0.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

Hashes for stegabot-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7bbc90fb46e35fb4862c4e6a22eb5e0a8319e4be6c48245d13106960b55b6747
MD5 16061c7788e30debca1bfcbd8be5e4bb
BLAKE2b-256 c659e74bfe0929a0ee91c335c8f41b69014538a33b873dbe0906b9357a83d44c

See more details on using hashes here.

File details

Details for the file stegabot-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: stegabot-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for stegabot-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 29e8dd07e55afeabe33b9bdecd4f4ddc15b947f8dc12c91752fcf119ace771c7
MD5 cf230f0af20e4209098136b65f9fa296
BLAKE2b-256 aa4eca72712e4e8f51da2cccd9c1af44748f6f18b560976269aeb6074a7d85ae

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page