This project coded in python allows the user to encrypt/decrypt files in a specified directory.
There are two modes, the user-friendly and the machine-friendly.
Displays the menu, logo and options for user to select. Outputs every change it makes, including deletions, encryptions and decryptions
./g-encryptor.shand this will display the menu with its options
This is a mode which a script can call the file, pass an argument (encrypt/decrypt) and the script will do the thing
./g-encryptor.sh encrypt
./g-encryptor.sh decryptthat will encrypt/decrypt the specified directory (TARGET_DIR)
If you are in user mode, run just ./g-encryptor.sh. If it is running on machine mode, run ./g-encryptor <encrypt|decrypt>. Make sure that the configuration file (config.ini) has the target_dir variable set and does not finish with a final /. This is important as the script won't be able to handle paths with an ending slash. I've added filters to strip the slash when the target_dir changes.
- Install packages: This allows to install the requried packages for the script to run properly. You should run it at least once. In the
binbranch the files have been compiled to binary to prevent this. - Encrypt: This encrypts all files in the
target_dirdirectory recursively except the ones with theGNOENCRYPTflag (see GNOENCRYPT flag below). - Decrypt: This decrypts all files in the
target_dirdirectory recursively except the ones with theGNOENCRYPTflag. - Change config directory path: This allows to change the
target_dirvariable by directly writing to$CONFIG_FILE(defined in line 5 ofg-encryptor.sh), normallyconfig/config.ini. - Exit: Exits the script.
The text "GNOENCRYPT" has been introduced in all files required by this program. This prevents encrypt.py or decrypt.py to touch or corrupt the files.
File server.php must be avaliable in $seed_url (defined in encrypt.py line 13) for the decryption of the files. The current url is localhost:80/banana/index.php and the hash_pass with the now flag ending must be passed through for the proper decryption. Else, decrypt.py will crash.
I'll finish README.md soon
