A secure, async Telegram password manager with end-to-end encryption
CryptoLockerBot is a powerful and secure password management solution that runs entirely within Telegram. Your credentials are encrypted with a passphrase-derived key before touching disk, while an intuitive Telegram UI lets you add, search, edit, remove, and display entries in both English and Persian (Farsi).
- π End-to-End Encryption: PBKDF2-HMAC (SHA256, 240k iterations) + Fernet encryption
- π Modern Python: Built with Python 3.12 and
python-telegram-botv21 (async Application API) - πΎ SQLite Storage: WAL mode enabled with per-user language preferences (
enorfa) - π¨ Intuitive UI: Reply keyboard driven UX with inline keyboards for seamless navigation
- π Comprehensive Logging: Rotating file logs (no plaintext passwords logged)
- π Easy Deployment: Systemd unit & guided installer for Ubuntu deployments
- π Multilingual: Full support for English and Persian languages
git clone https://github.com/zZedix/CryptoLockerBot.git && cd CryptoLockerBot && bash installer/install.shThe installer will:
- π Prompt for the Telegram bot token, admin user ID, and encryption passphrase
- π οΈ Install Python 3.12 + build tooling, create a project virtualenv, and install dependencies
- π Create
~/.cryptolocker/(chmod700), generate a random salt, and writeconfig.env(chmod600) - ποΈ Initialize the SQLite database, write systemd service, and enable the service
# Start the bot
sudo systemctl start cryptolocker
# Follow logs
journalctl -u cryptolocker -f
β οΈ Security Warning: Keep your passphrase,salt, andconfig.envsafe. Losing any of them makes stored data unrecoverable.
- Python 3.12+
- Ubuntu Linux (for systemd service)
-
Clone the repository
git clone https://github.com/zZedix/CryptoLockerBot.git cd CryptoLockerBot -
Create virtual environment
python3.12 -m venv .venv .venv/bin/pip install --upgrade pip .venv/bin/pip install -r requirements.txt
-
Set up configuration
# Create config directory mkdir -p ~/.cryptolocker chmod 700 ~/.cryptolocker # Generate random salt python3.12 -c "import secrets; open('~/.cryptolocker/salt', 'wb').write(secrets.token_bytes(16))" chmod 600 ~/.cryptolocker/salt
-
Configure environment
cp .env.example ~/.cryptolocker/config.env # Edit ~/.cryptolocker/config.env with your settings
-
Initialize database
PYTHONPATH=$(pwd) python3.12 -c " import asyncio from db import Database db = Database('~/.cryptolocker/cryptolocker.db') asyncio.run(db.init()) "
-
Run the bot
.venv/bin/python bot.py
/start,/menuβ Show welcome message and main keyboard/lang en,/lang faβ Switch between English and Persian
- β Add: Add new credentials with name, username, and password
- π Search: Search through your stored credentials
- βοΈ Edit: Modify existing usernames or passwords
- ποΈ Remove: Delete credentials with confirmation
- ποΈ Show: Display credentials with secure inline buttons
- All credentials are encrypted before storage
- Inline buttons for secure credential display
- Automatic message deletion after viewing
- No plaintext logging of sensitive data
Run the comprehensive test suite:
python -m unittest discover testsTests cover:
- Encryption/decryption functionality
- Database operations
- User state management
- Error handling
~/.cryptolocker/cryptolocker.db(encrypted database)~/.cryptolocker/salt(encryption salt)~/.cryptolocker/config.env(configuration)
- Restore files with original permissions:
config.env&saltβ600- Directory β
700
- Start the service:
sudo systemctl start cryptolocker
Important: Without the original passphrase AND salt, decryption is impossible.
# Follow real-time logs
journalctl -u cryptolocker -f
# View recent logs
journalctl -u cryptolocker --since "1 hour ago"# Follow log file
tail -f ~/.cryptolocker/cryptolocker.log
# View recent entries
tail -n 100 ~/.cryptolocker/cryptolocker.logWe welcome contributions! Please follow these guidelines:
- π Keep new strings in
i18n.pytranslated for both English and Persian - π Never log sensitive data (usernames, passwords, etc.)
- ποΈ Extend the
StateManagerfor new interaction flows - β Add tests for new functionality
- π Update documentation for new features
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
If you find CryptoLockerBot useful and want to support its development, consider making a donation:
- Bitcoin (BTC):
bc1q637gahjssmv9g3903j88tn6uyy0w2pwuvsp5k0 - Ethereum (ETH):
0x5B2eE8970E3B233F79D8c765E75f0705278098a0 - Tron (TRX):
TSAsosG9oHMAjAr3JxPQStj32uAgAUmMp3 - USDT (BEP20):
0x5B2eE8970E3B233F79D8c765E75f0705278098a0 - TON:
UQA-95WAUn_8pig7rsA9mqnuM5juEswKONSlu-jkbUBUhku6
- β Star the repository if you find it useful
- π Report bugs and suggest improvements
- π Improve documentation and translations
- π Share with others who might benefit
This project is licensed under the MIT License - see the LICENSE file for details.
- Repository: https://github.com/zZedix/CryptoLockerBot
- Issues: Report a bug or request a feature
Made with β€οΈ by zZedix
Securing the digital world, one line of code at a time!