ScareCrypt is a professional-grade command-line tool developed for educational purposes that enables users to secure their data through the use of symmetric encryption. This tool employs a secure symmetric encryption algorithm that ensures data privacy, and the encryption key is only accessible by authorized users via email. ScareCrypt's approach to encryption makes it an ideal tool for those concerned with cyber security as it provides an additional layer of protection for sensitive data. Moreover, ScareCrypt is not intended for any malicious activities such as ransomware attacks, and it only supports data security. With ScareCrypt, users can encrypt their data quickly and easily, and keep it safe from unauthorized access.
ScareCrypt is developed and tested on Python 3.11
and uses Fernet
as it's Cryptography Library to achieve Symmetric Encryption. The tool encrypts all the data stored in a specific path (which will be asked by the tool at the runtime) using a Secret Key which is generated everytime you run the script.
The Secret Key is not stored locally on the machine for Security Reasons but is sent directly to the mail address configured in SECRETS/mailcreds.py
.
Taking one step further on the Security part, the mail module uses SSL SMTP to make the connection to the e-mail account. Once the connection is made, you'll be provided both the Encoded and Decoded key on your mail which you can use to decrypt the data. The tool can be used on a local machine as well as on a remote machine as well.
Language: Python
Libraries Used: Fernet
, pathlib
, smtplib
, datetime
Platform: Linux & Windows
git clone https://github.com/ajayagrawalgit/ScareCrypt.git
2. Go Inside the Cloned Repository and Change some Permissions (Changing permissions are required for some OS Types)
cd ScareCrypt
chmod -R 755 *
# This file contains all the details about the E-Mail
# SMTP Details
smtp_server = "smtp.gmail.com"
smtp_port_no = 465
# Make sure you have the SMTP-SSL Mode Setup on your mail for your account
sender_email_id = "sendermailid@gmail.com"
sender_email_password = "SenderPassw0rd@123456789"
receiver_email_id = "recievermailid@gmail.com"
./install.sh
Note: Make sure that GIT Works and you have Python 3 installed on your machine. If not, please download and install git from here and Python from here. Once downloaded and Installed, Please follow the steps below:
git clone https://github.com/ajayagrawalgit/ScareCrypt.git
cd /d ScareCrypt
pip3 install -r requirements.txt
We recommend using
pip3
because we are usingpython3
for executing this tool. If you don't have pip3 installed on your machine, Please install it first and for which I find this link quite useful.
# This file contains all the details about the E-Mail
# SMTP Details
smtp_server = "smtp.gmail.com"
smtp_port_no = 465
# Make sure you have the SMTP-SSL Mode Setup on your mail for your account
sender_email_id = "sendermailid@gmail.com"
sender_email_password = "SenderPassw0rd@123456789"
receiver_email_id = "recievermailid@gmail.com"
python3 scarecrypt.py -h
Above Command will display the help message for the tool.
There are 2 ways using which you can use this tool.
- By Local Installation (Works only on Linux Distros) ๐
- By Python Script Directly ๐ฅ
No Method listed above is good or bad. It's just your preference. So, Please feel free to use any of the methods. Both are the recommended methods.
We do recommend you to use the testmail
feature befoe using the encrypt
or decrypt
feature of the tool though. Doing this, you will make sure that the mailmodule is working correctly and you will recieve the Secret Key to your mail as expected.
Please read the instructions below according to your OS and according to what method you want to use in order to use ScareCrypt:๏ธ
For help:
$> scarecrypt -h
OR
$> scarecrypt --help
Test Mail:
You can use this command to test if you're able to send the mail properly using the credentials stored in
ScareCrypt/src/SECRETS/mailcreds.py
scarecrypt testmail
You should recieve the mail with the Secret Key (Encryption Key) once this command is executed successfully. If not, you will have to welcome the error on your terminal and well, check either the credentials you have entered or the mail settings from your e-mail account.
To Encrypt the files:
$> scarecrypt encrypt
You will be prompted to enter the path under which the files are stored which you want to encrypt. This will encrypt all the files stored under that path including the files of the sub-directories.
To Decrypt the files:
$> scarecrypt decrypt
By this command, you will be prompted to enter the path under which the files are stored which you want to decrypt. This will decrypt all the files stored under that path including the files of the sub-directories.
You need to be inside the Repository for this. Once you are, use git pull
to have the latest code and then, you can use any of the commands below.
For help:
$> python3 scarecrypt.py -h
OR
$> python3 scarecrypt.py --help
Test Mail:
You can use this command to test if you're able to send the mail properly using the credentials stored in
ScareCrypt/src/SECRETS/mailcreds.py
$> python3 scarecrypt.py testmail
You should recieve the mail with the Secret Key (Encryption Key) once this command is executed successfully. If not, you will have to welcome the error on your terminal and well, check either the credentials you have entered or the mail settings from your e-mail account.
To Encrypt the files:
$> python3 scarecrypt.py encrypt
You will be prompted to enter the path under which the files are stored which you want to encrypt. This will encrypt all the files stored under that path including the files of the sub-directories.
To Decrypt the files:
$> python3 scarecrypt.py decrypt
By this command, you will be prompted to enter the path under which the files are stored which you want to decrypt. This will decrypt all the files stored under that path including the files of the sub-directories.
You need to be inside the Repository for this. Once you are, use git pull
to have the latest code and then, you can use any of the commands below (Remains the same as we ran the file directly in the case of Linux Distros).
For help:
\ScarreCrypt\> python3 scarecrypt.py -h
OR
\ScarreCrypt\> python3 scarecrypt.py --help
Test Mail:
You can use this command to test if you're able to send the mail properly using the credentials stored in
ScareCrypt/src/SECRETS/mailcreds.py
\ScarreCrypt\> python3 scarecrypt.py testmail
You should recieve the mail with the Secret Key (Encryption Key) once this command is executed successfully. If not, you will have to welcome the error on your terminal and well, check either the credentials you have entered or the mail settings from your e-mail account.
To Encrypt the files:
\ScarreCrypt\> python3 scarecrypt.py encrypt
You will be prompted to enter the path under which the files are stored which you want to encrypt. This will encrypt all the files stored under that path including the files of the sub-directories.
To Decrypt the files:
\ScarreCrypt\> python3 scarecrypt.py decrypt
By this command, you will be prompted to enter the path under which the files are stored which you want to decrypt. This will decrypt all the files stored under that path including the files of the sub-directories.
Developer - Ajay Agrawal
- ๐ Profile
- ๐ฎ Email
- ๐ฆ Twitter Bot (@mickbotsays)