Skip to content

A Stegonography tool made in Python that uses the least signifigant bit in the color data of an image to encode a message

Notifications You must be signed in to change notification settings

1jepps0/Python-LSB-Stego

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

LSB Steganography Tool

A tool built with python and Pillow that uses the least significant bits of an image to encode a message

Features

  • 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.

Requirements

  • Python 3.x
  • Pillow library for image manipulation

Installation

Install the required dependencies (just pillow):

pip install -r requirements.txt

Usage

Encoding:

python3 stego.py encode <message> <image_path> <output_path>

Decoding:

python3 stego.py decode <image_path>

Arguments:

  • <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.

Example:

python3 stego.py encode "Hello, World!" input.png output.png

Notes

  • 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

Disclaimer

This tool is for educational purposes only. Use responsibly and ensure compliance with applicable laws and regulations.

About

A Stegonography tool made in Python that uses the least signifigant bit in the color data of an image to encode a message

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages