A tool built with python and Pillow that uses the least significant bits of an image to encode a message
- Encode a message: encode a message into an image by modifying the least significant bits of the image's pixels.
- Decode a message: decode a message from an image.
- Python 3.x
- Pillow library for image manipulation
Install the required dependencies (just pillow):
pip install -r requirements.txt
python3 stego.py encode <message> <image_path> <output_path>
python3 stego.py decode <image_path>
<message>
: The text message to encode.<image_path>
: Path to the input image file.<output_path>
: Path to save the image with the encoded message.
python3 stego.py encode "Hello, World!" input.png output.png
- Doesn't work with jpeg images due to lossy compression
- Made to work with png images, but can probably work for others
- The image needs enough pixels to store the message. Since a pixel can store 3 bits of a message; (len(message) * 8) / 3 = #pixels needed
- The longer the message, the easier it will be to detect encoding
This tool is for educational purposes only. Use responsibly and ensure compliance with applicable laws and regulations.