https://github.com/e9cipher/g-encryptor
Python cryptography tool to encrypt/decrypt files in a specified directory
https://github.com/e9cipher/g-encryptor
cryptography cryptography-tools python3 shell
Last synced: 10 months ago
JSON representation
Python cryptography tool to encrypt/decrypt files in a specified directory
- Host: GitHub
- URL: https://github.com/e9cipher/g-encryptor
- Owner: E9cipher
- License: mit
- Created: 2025-08-20T12:20:30.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-08-20T12:21:16.000Z (10 months ago)
- Last Synced: 2025-08-20T14:30:55.120Z (10 months ago)
- Topics: cryptography, cryptography-tools, python3, shell
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# G-encryptor
## Overview
This project coded in python allows the user to encrypt/decrypt files in a specified directory.
## Modes
There are two modes, the user-friendly and the machine-friendly.
### User-friendly
Displays the menu, logo and options for user to select. Outputs every change it makes, including deletions, encryptions and decryptions
```bash
./g-encryptor.sh
```
and this will display the menu with its options

### Machine-friendly
This is a mode which a script can call the file, pass an argument (encrypt/decrypt) and the script will do the thing
```bash
./g-encryptor.sh encrypt
./g-encryptor.sh decrypt
```
that will encrypt/decrypt the specified directory (`TARGET_DIR`)
## Usage
If you are in user mode, run just `./g-encryptor.sh`. If it is running on machine mode, run `./g-encryptor `. 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.
## Options
1. **Install packages**: This allows to install the requried packages for the script to run properly. You should run it at least once. In the `bin` branch the files have been compiled to binary to prevent this.
2. **Encrypt**: This encrypts all files in the `target_dir` directory recursively except the ones with the `GNOENCRYPT` flag (see GNOENCRYPT flag below).
3. **Decrypt**: This decrypts all files in the `target_dir` directory recursively except the ones with the `GNOENCRYPT` flag.
4. **Change config directory path**: This allows to change the `target_dir` variable by directly writing to `$CONFIG_FILE` (defined in line 5 of `g-encryptor.sh`), normally `config/config.ini`.
5. **Exit**: Exits the script.
## GNOENCRYPT flag
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.
## Other requirements
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