This script (en|de)crypts directories/files by using AES (CBC) algorithm. It also generates a new VI for each encryption.
~ $ pcrypt -h
usage: pcrypt [-h] [-d DIRECTORY] [-f FILE] [-D] [-E] [--show-password]
[--no-color]
Simple encryption utility for files/directories
optional arguments:
-h, --help show this help message and exit
-d DIRECTORY In decryption mode it should be directory name that
contains the encrypted file andin encryption mode it should
be the directory that you want to encrypt all or one of its
files. Note that in encryption mode if -f is not set, it
encrypt all internal directories too. Its default value is
current working directory or /p/test/A.
-f FILE The filename to (en|de)crypt.
-D Switches to decryption mode. If -f is not set, It tries to
decrypt its default encrypted file name or
'b1gs3cr3t.pcrypt'
-E Switches to encryption mode (which is the default
behaviour). The default encrypted file name for folders is
'b1gs3cr3t.pcrypt'
--show-password Shows your password when you type/paste it.
--no-color Makes it print plain text instead of colorized text.
You must have python3
installed.
~/path/to/cloned/ppg $ chmod a+x pcrypt.py && sudo ln -sf $PWD/pcrypt.py /usr/local/bin/pcrypt
or
$ curl -sSf https://raw.githubusercontent.com/pouriya/pcrypt/21.6.15/pcrypt.py > pcrypt && chmod a+x pcrypt && ./pcrypt -v && sudo cp pcrypt /usr/local/bin/pcrypt