Skip to content

A folder locker which encrypts and hides your data and can be unlocked only by 2fa

License

Notifications You must be signed in to change notification settings

fredrick273/folder-lock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Folder Lock

Folder Lock is a simple command-line tool that allows you to lock and unlock a folder using two-factor authentication (2FA) provided by Google Authenticator or a similar app. The tool uses the Time-based One-Time Password (TOTP) algorithm to generate temporary codes for authentication.

Requirements

  • Python 3.x
  • pyotp package (can be installed using pip install pyotp)
  • qrcode package (can be installed using pip install qrcode)
  • cryptography package (can be installed using pip install cryptography)

How it works

  1. When you run LockFolder.bat, it checks if key.py exists in the current directory.
  2. If key.py exists, it means the folder is not locked yet, and it prompts you to register the folder.
  3. During the registration process, the tool generates a secret key for 2FA and creates a QR code containing the provisioning URI. You can scan this QR code using Google Authenticator or a similar app on your mobile device.
  4. After successful registration, key.py and locker.py are deleted for security purposes.
  5. If key.py does not exist (i.e., the folder is already registered), the tool runs locker.py.
  6. If the folder is not locked yet, locker.py gives you the option to lock the folder.
  7. If you choose to lock the folder, it encrypts and renames the folder to Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D} and hides it by setting the attributes to +h (hidden) and +s (system).
  8. If the folder is already locked, locker.py prompts you to enter the 2FA code generated by your authentication app.
  9. If the code is correct, the folder is unlocked, and the attributes are reset to show the folder again.

Usage

  1. Clone or download this repository to your local machine.
  2. Install the required packages by running:
    pip install pyotp qrcode cryptography pyarmor
    
  3. Run LockFolder.bat to lock/unlock the folder.
  4. Follow the on-screen instructions to register the folder for the first time or lock/unlock the folder using 2FA.

Security Note

  • The tool is intended for personal use and is not a substitute for robust encryption methods for highly sensitive data.

Contribution

Contributions to the Folder Lock project are welcome! If you find a bug, have a suggestion, or want to add a new feature, please feel free to open an issue or submit a pull request.

Disclaimer

This project is for educational and demonstrational purposes only. Use it at your own risk.

License

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

About

A folder locker which encrypts and hides your data and can be unlocked only by 2fa

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published