Skip to content

A Cross-Platform Professional-Grade Python Command-line tool for Data Encryption

License

Notifications You must be signed in to change notification settings

ajayagrawalgit/ScareCrypt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

11 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

ScareCryptHeaderBMAC

ScareCrypt License ScareCrypt Forks ScareCrypt Stars ScareCrypt Issues ScareCrypt Pull Requests ScareCrypt Repo Size

๐Ÿฆ  ScareCrypt ๐Ÿฆ 

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.



Overview ๐Ÿ“บ

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


๐Ÿ› ๏ธ Installation Steps (Linux Distros and MacOS) ๐Ÿ–ฅ๏ธ

1. Clone the Repository

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 *

3. Now from ScareCrypt/src/SECRETS and edit mailcreds.py with your credentials. Example Below:

# 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 = "[email protected]"
sender_email_password = "SenderPassw0rd@123456789"
receiver_email_id = "[email protected]"

4. Just run the Install Script

./install.sh



๐Ÿ› ๏ธ Installation Steps (Windows) ๐Ÿ’ฝ

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:

1. Clone the Repository

git clone https://github.com/ajayagrawalgit/ScareCrypt.git

3. Go inside the Repository and Install all the Dependencies from requirements.txt:

cd /d ScareCrypt
pip3 install -r requirements.txt

We recommend using pip3 because we are using python3 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.


2. Go Inside src/SECRETS and edit mailcreds.py with your credentials. Example Below:

# 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 = "[email protected]"
sender_email_password = "SenderPassw0rd@123456789"
receiver_email_id = "[email protected]"

3. Run the Python File directly using the command below:

python3 scarecrypt.py -h

Above Command will display the help message for the tool.



โ— How to Use ? ๐Ÿค“

There are 2 ways using which you can use this tool.

  1. By Local Installation (Works only on Linux Distros) ๐Ÿ˜Ž
  2. 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:๏ธ



๐Ÿ“Ÿ Linux Distros and MacOS ๐Ÿ“Ÿ

By Local Installation ๐Ÿ”‹


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.





By Python Script Directly ๐Ÿ

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.





โš™๏ธ Windows Machines โš™๏ธ

The tool don't have a functionality where the `scarecrypt` command is available accross terminal. So, a direct method works flawlessly on Windows.

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.





๐Ÿง‘๐Ÿป Know Me More

Developer - Ajay Agrawal



๐Ÿค Support Me ๐Ÿค

Buy me a Coffee




Made with โ™ฅ๏ธ in India


About

A Cross-Platform Professional-Grade Python Command-line tool for Data Encryption

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published