Skip to content

The console encrypter and decrypter from heaven, inshallah

License

Notifications You must be signed in to change notification settings

itsbumblebeecode/mr-crypter

 
 

Repository files navigation

Project Logo

Mr Crypter is a command-line tool built using Python's Typer framework to provide encryption and decryption functionalities. With Mr Crypter, users can securely encrypt and decrypt files using a password-based approach, as well as manage encrypted files conveniently.

Features

  • File Encryption: Encrypt files with a password for added security.
  • File Decryption: Decrypt encrypted files with the same password.
  • Read Encrypted Files: Temporarily decrypt and view file content without altering the original
  • List Encrypted Files: Display a list of all files encrypted by Mr Crypter.
  • Search Encrypted Files: Search through encrypted files by filename or shortcut.
  • Built-in Help: Comprehensive help system with detailed command information.

Installation: PIP

  1. Clone the repository or copy the main.py file to your project directory.

  2. Install the required dependencies by running:

    pip install -r requirements.txt
  3. Make sure to have Python 3.7 or above installed.

Installation: Unix & Windows

For unix based systems

Use the install.sh script if you want easy installation. And make it available from anywhere.

./install.sh

For windows based systems

Use the install.py script if you want easy installation. And make it available from anywhere.

python install.py

After installation, you can use mr-crypter [COMMAND] from anywhere.

Usage

Initial Setup

Certain commands require a password to be set before they can be used like the clear-log command. Run mr-crypter clear-log to set it up, the first time you run it you will be asked to set a password.

Getting Help

Mr Crypter includes a comprehensive help system. You can access it in two ways:

# Show all available commands and general help
mr-crypter help

# Get detailed help for a specific command
mr-crypter help COMMAND

For example:

mr-crypter help encrypt

Commands

Below are the commands available with Mr Crypter:


Encrypt a File

Encrypt a specified file and log its details.

mr-crypter encrypt FILE_PATH

Decrypt a File

Decrypt a previously encrypted file.

mr-crypter decrypt FILE_PATH

or

mr-crypter decrypt SHORTCUT

Temporarily Read Encrypted File

Read and display the content of an encrypted file without modifying it.

mr-crypter view FILE_PATH [--lines NUMBER]

or

mr-crypter view SHORTCUT [--lines NUMBER]

Options:

  • --lines, -n: Number of lines to display (optional)

Examples:

# View entire file
mr-crypter view document.txt

# View first 10 lines only
mr-crypter view document.txt --lines 10

# View first 5 lines using shortcut
mr-crypter view doc_shortcut -n 5

Temporarily Opens Encrypted File & Inserts Text

mr-crypter insert FILE_PATH "New content to add"

or

mr-crypter insert SHORTCUT "New content to add"

List Encrypted Files

Display all files encrypted using Mr Crypter.

mr-crypter list-files

Clears The Log Of Encrypted Files & Shortcut

mr-crypter clear-log

Search Encrypted Files

Search through encrypted files by filename or shortcut.

mr-crypter search SEARCH_TERM

Options:

  • --shortcuts/--no-shortcuts: Include or exclude shortcuts in search (default: include)
  • --case-sensitive: Make search case-sensitive (default: case-insensitive)

Examples:

# Basic search
mr-crypter search document

# Case-sensitive search
mr-crypter search PDF --case-sensitive

# Search only in filenames (exclude shortcuts)
mr-crypter search report --no-shortcuts

Configuration Files

Mr Crypter uses the following configuration files and directories to manage encryption:

  • Configuration Directory: ~/.file_encryptor/
  • Salt File: salt.key - Stores the salt used for key derivation
  • Encrypted Files Log: encrypted_files.csv - Logs all encrypted files
  • Log File: file_encryptor.log - Stores error logs

Security Notes

  • Your password is never stored; only a salt for key derivation is kept
  • Each file has its own verification tag for integrity checking
  • Keys are derived on-demand and immediately cleared from memory
  • Use a strong password to enhance security

Example

Encrypt a file:

mr-crypter encrypt ~/Documents/sample.txt

Decrypt the same file:

mr-crypter decrypt ~/Documents/sample.txt

Get help on encryption:

mr-crypter help encrypt

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

The console encrypter and decrypter from heaven, inshallah

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 96.9%
  • Shell 3.1%