A simple file encryption tool.
Install the needed modules
$ pip install -r requirements.txt
Then you can add the script to your enviroment variables to use it anywhere.
python pflock.py <operation> <targets> -r
- operation parameter:
encode
ore
to encrypt files.decode
ord
to decrypt files.
- targets parameter:
- you can use the wildcard syntax, you also can type in mutiple targets, you can understand more by the examples.
- recursive parameter:
- the default behavior is ignoring directories, so if you want to recurse through directories and operate on them,you can provide this optional parameter by typing
-r
anywhere after the operation parameter, it recurses throught directories if found.
- the default behavior is ignoring directories, so if you want to recurse through directories and operate on them,you can provide this optional parameter by typing
- encryption key
- on usage it asks you to fill in with your prefered key string, which can be treated as regular passwords, then this password is converted to a valid key.
-
encrypt all images in folder
pflock e *.jpg *.png
-
decrypt all pdf files in current direcroty recursively
pflock d *.pdf -r
-
encrypt specific files
pflock e private.txt secret.txt