Added Readme and License
Signed-off-by: devoalda <linuxes_mojoworld@aleeas.com>
This commit is contained in:
parent
850b26c4ca
commit
b42adbd0ec
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2023 Devoalda
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -0,0 +1,129 @@
|
|||
# LSB Replacement with Python
|
||||
This is an LSB Replacement project built with python and flask.
|
||||
|
||||
## Installation
|
||||
```bash
|
||||
# Create a virtual environment
|
||||
python -m venv venv
|
||||
source venv/bin/activate
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
## Usage
|
||||
```bash
|
||||
python lsb_rep.py
|
||||
```
|
||||
# Supported File Types
|
||||
## Image
|
||||
- PNG
|
||||
- BMP
|
||||
|
||||
These are the only two image types that are tested and supported.
|
||||
|
||||
## Audio-Visual
|
||||
- WAV
|
||||
- MP3
|
||||
- MP4
|
||||
|
||||
WAV uses the `wav_steg` module in `lib/steganography` and MP3 and MP4 uses the general `file_steg` module in `lib/steganography`.
|
||||
|
||||
## Document
|
||||
### Text Files
|
||||
- TXT
|
||||
- PY
|
||||
- MD
|
||||
- ETC.
|
||||
|
||||
These files are supported by the `txt_steg` module in `lib/`.
|
||||
|
||||
### Others
|
||||
- PDF
|
||||
- DOCX
|
||||
- PPTX
|
||||
- ETC.
|
||||
|
||||
These files are supported by the `file_steg` module in `lib/steganography`.
|
||||
|
||||
# Modules
|
||||
All modules are located in the `lib/steganography` folder.
|
||||
|
||||
## `img_steg`
|
||||
This module is used to hide and extract data from images using the opencv and numpy libraries for bit manipulation.
|
||||
|
||||
Usage:
|
||||
```python
|
||||
from lib.steganography import img_steg
|
||||
|
||||
encoded_data = img_steg("/path/to/image.png", bits_to_hide=[1,2,3]).encode("Hello World!")
|
||||
decoded_data = img_steg("/path/to/encoded_image.png", bits_to_hide=[1,2,3]).decode()
|
||||
```
|
||||
|
||||
## `wav_steg`
|
||||
This module is used to hide and extract data from WAV files using the wave library for wav file manipulation.
|
||||
|
||||
Usage:
|
||||
```python
|
||||
from lib.steganography import wav_steg
|
||||
|
||||
encoded_data = wav_steg("/path/to/audio.wav", bits_to_hide=[1,2,3]).encode("Hello World!")
|
||||
decoded_data = wav_steg("/path/to/encoded_audio.wav", bits_to_hide=[1,2,3]).decode()
|
||||
```
|
||||
|
||||
## `txt_steg`
|
||||
This module is used to hide and extract data from text files with python's built in file reading and writing.
|
||||
|
||||
Usage:
|
||||
```python
|
||||
from lib.steganography import txt_steg
|
||||
|
||||
encoded_data = txt_steg("/path/to/text.txt", bits_to_hide=[1,2,3]).encode("Hello World!")
|
||||
decoded_data = txt_steg("/path/to/encoded_text.txt", bits_to_hide=[1,2,3]).decode()
|
||||
```
|
||||
|
||||
## `file_steg`
|
||||
This module is used to hide and extract data from any file type with python's built in file reading and writing as bytes.
|
||||
|
||||
Usage:
|
||||
```python
|
||||
from lib.steganography import file_steg
|
||||
|
||||
encoded_data = file_steg("/path/to/file.txt", bits_to_hide=[1,2,3]).encode("Hello World!")
|
||||
decoded_data = file_steg("/path/to/encoded_file.txt", bits_to_hide=[1,2,3]).decode()
|
||||
```
|
||||
|
||||
# Web Interface
|
||||
The web interface is built with flask and located at project root. The web interface is used as a front end to hide and extract data from files.
|
||||
|
||||
## Views
|
||||
Views (HTML) are located in the `views` folder.
|
||||
|
||||
## Routes
|
||||
```
|
||||
/ - Home page
|
||||
/encode - Encode page
|
||||
/decode - Decode page
|
||||
```
|
||||
|
||||
## Encode
|
||||
The encode page is used to encode data into a file.
|
||||
|
||||
User is able to:
|
||||
- Select a file to encode data into (Drag and drop supported)
|
||||
- Select the bits to hide the data in
|
||||
- Enter the data to hide
|
||||
- Submit the form
|
||||
- Download the encoded file
|
||||
- View the encoded file
|
||||
- View the original file
|
||||
|
||||
## Decode
|
||||
The decode page is used to decode data from a file.
|
||||
|
||||
User is able to:
|
||||
- Select a file to decode data from
|
||||
- Select the bits to decode the data from
|
||||
- Submit the form
|
||||
- View the decoded data
|
||||
|
||||
## Sample files for testing
|
||||
Sample files are in the `upload` folder, these files are used for testing the web interface and the individual modules.
|
|
@ -0,0 +1,9 @@
|
|||
blinker==1.6.2
|
||||
click==8.1.3
|
||||
Flask==2.3.2
|
||||
itsdangerous==2.1.2
|
||||
Jinja2==3.1.2
|
||||
MarkupSafe==2.1.3
|
||||
numpy==1.24.3
|
||||
opencv-python==4.7.0.72
|
||||
Werkzeug==2.3.4
|
Loading…
Reference in New Issue