This project is a Django web application that allows users to securely hide text messages or files within images using steganography. Users can upload a file or message, encode it into an image, and later decode the image to retrieve the hidden data.
- User Authentication: Users can log in to access the app's features.
- File Upload: Users can upload text files or other documents to be hidden inside an image.
- Steganography: The app encodes the uploaded file or message into an image using the Least Significant Bit (LSB) method.
- Image Download: After encoding, users can download the stego image that contains the hidden data.
- File Retrieval: Users can upload a stego image to decode and retrieve the hidden file or message.
- Python 3.12+
- Django 5.0+
- Pillow (Python Imaging Library)
-
Clone the repository:
git clone https://github.com/nyashachiza/python-steganography.git cd python-steganography
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the required packages:
pip install -r requirements.txt
-
Apply migrations:
python manage.py migrate
-
Run the development server:
python manage.py runserver
-
Access the app: Open your web browser and go to
http://127.0.0.1:8000/
.
- Log in to the application.
- Go to the "Hide File in Image" page.
- Upload the file or message you want to hide and select a cover image.
- Click "Encode" to generate the stego image.
- Download the generated stego image.
- Log in to the application.
- Go to the "Retrieve File from Image" page.
- Upload the stego image.
- Click "Decode" to retrieve and download the hidden file or message.
core/
- Main Django project directory.steganography/
- Django app handling the steganography functionality.models.py
- Optional database models (if needed).views.py
- Handles the encoding and decoding logic.forms.py
- Forms for file uploads.helpers.py
- Contains the steganography functions for encoding and decoding.templates/steganography/
- HTML templates for encoding and decoding pages.
static/
- Static files (CSS, JavaScript).media/
- Directory for uploaded files and images (if configured).
This project is licensed under the MIT License. See the LICENSE file for more details.
Contributions are welcome! Please fork the repository and create a pull request with your changes.
For any inquiries or support, please contact [email protected].