Tryduck is a Python tool to shuffle and restore images with added encryption. This utility allows you to split an image into blocks, shuffle them randomly, and encrypt the shuffle pattern. You can later restore the image using the provided password.
- Shuffle Images: Split an image into a grid of blocks, shuffle the blocks, and save the shuffled image.
- Encrypt Shuffle Pattern: Secure the shuffle pattern using a password with PBKDF2 and AES encryption.
- Restore Images: Decrypt and reconstruct the original image using the correct password.
- Support for Local and URL Images: Shuffle images from local files or directly from URLs.
- Clone this repository:
git clone https://github.com/yourusername/tryduck.git
cd tryduck- Install the dependencies:
pip install -r requirements.txt- To test the restoration functionality, a sample shuffled image is provided with this repository.
- The password for the provided image is: 123
- You can use the following command to restore the test image
python tryduck.py restore -i test_shuffled_image.jpg -o restored_test_image.jpg -p 123- The script provides two main commands: shuffle and restore.
Important
- When the file gets edited, secure contents of the file are lost.
- There is no recovery option if you forget the password.
- Split an image into blocks, shuffle them, and save the encrypted shuffled image.
python tryduck.py shuffle -i image.jpg -o shuffled_image.jpg -p mypassword -r 30 -c 30python tryduck.py shuffle -i <input_image_path/URL> -o <output_image_path> -p <password> [-u <image_url>] [-r <rows>] [-c <columns>]-iFile path or URL of the input image.-oPath to save the shuffled image (required).-pPassword for encryption (required).-rNumber of rows to split the image (default: 50).-cNumber of columns to split the image (default: 50).
- Decrypt and restore the original image from a shuffled image.
python tryduck.py restore -i shuffled_image.jpg -o restored_image.jpg -p mypasswordpython tryduck.py restore -i <shuffled_image_path> -o <output_image_path> -p <password>-iPath to the shuffled image (required).-oPath to save the restored image (required).-pPassword to decrypt the shuffle order (required).
