/kapak

A simple-to-use file encryption script

Primary LanguagePythonApache License 2.0Apache-2.0

KapaK script

A simple-to-use file encryption script

kapak-screenshot

Description

This script encrypts a file or files whithin a directory recursively by
a given password using AES symmetric encryption method.

If you are wondering what kapak means, it means mold.
As moldy food is not eatable, kapaky files are not readable.

Installation

Make sure Python 3 is installed. Then run

pip install -r requirements.txt

If you are using Kali Linux then I got you covered.

Just simply run install.sh and it will install the script and add it to PATH so you can run it from anywhere in your system.

$ cd kapak
$ chmod +x ./install.sh
$ ./install.sh

I've only tested this on Kali Linux. Read the installation script before running it on other distros.

Usage

$ kapak [-e -d] <path> -r
$ kapak -e ./test.txt -r

The positions of path argument and flags are not important.

For help use -h or --help flag.
For encryption mode use -e or --encrypt flag.
For decryption mode use -d or --decrypt flag.
If you want to remove the target files after the process then use -r or --remove flag.

Examples

Windows
C:\> cd kapak
C:\kapak> python kapak.py -e "C:\New folder"
C:\kapak> python kapak.py -e "C:\movie.mp4" -r

There is a problem with Windows that you might face with it.
Do NOT leave \" or \' at the end of the path, like "C:\New folder\" .

Mac
$ cd kapak
$ python3 kapak.py -e ~/new-dir
$ python3 kapak.py -e ~/movie.mp4 -r
Linux
$ cd kapak
$ python3 kapak.py -e ~/new-dir
$ python3 kapak.py -e ~/movie.mp4 -r
If you installed the script with "install.sh"
$ kapak -e ~/new-dir
$ kapak -e ~/movie.mp4 -r

Password

Password length:

  • min: 3 characters
  • max: 1024 characters

After you run the script, it will prompt you to enter password.

Make sure to choose a strong password otherwise encryption loses its meaning.

Kapak script uses Scrypt key derivation methods.


There is an alternative way to provide the script with a password.

Create a file and name it password.txt whithin the kapak directory and put your password in it.

$ cd kapak
$ echo 'My$tr0n9P@ssw0rD' > password.txt

After you run the script, it will consume the password.txt file and will remove it after the operation is completed.

Contribute

Feel free to contribute however you want.