A Telegram bot for encrypting and decrypting messages using Base64 encoding.
- Text Encryption: Convert plain text to Base64 encoded format with a custom prefix
- Text Decryption: Convert encoded text back to readable format
- Auto-Detection: Automatically recognize and decrypt messages that look encrypted
- Inline Mode: Use the bot in any chat by typing its username and your text
- Interactive Buttons: Easy-to-use inline buttons for encryption/decryption actions
- Message Pinning: Welcome message is automatically pinned in chat
- Rich Formatting: Uses Markdown formatting for better readability
/start- Start the bot and display welcome message🔒 Encrypt- Switch to encryption mode🔓 Decrypt- Switch to decryption mode👤 About Me- Display developer information📢 Channels- Show related Telegram channels
The bot uses Base64 encoding and adds a custom prefix (VX_ENCRYPTED:) to identify encrypted messages:
Input: echo "hello how are you";
Output: VX_ENCRYPTED:ZWNobyAiaGVsbG8gaG93IGFyZSB5b3UiOw==
The bot removes the prefix (if present) and decodes the Base64 string:
Input: VX_ENCRYPTED:ZWNobyAiaGVsbG8gaG93IGFyZSB5b3UiOw==
Output: echo "hello how are you";
You can use the bot in any chat by typing @your_bot_username followed by text to encrypt or decrypt:
- Type
@your_bot_username text_to_process - Select whether to encrypt or decrypt (if the text appears to be encrypted)
- The bot will send the processed text with an option to reverse the operation
- Clone this repository
- Install requirements:
pip install aiogram>=3.0.0 python-dotenv==1.0.0 - Set your bot token in
coder.py:API_TOKEN = 'YOUR_BOT_TOKEN'
- Run the bot:
python coder.py
- Framework: Aiogram 3.x
- State management: FSM (Finite State Machine)
- Encryption: Base64 with custom prefix
- Keyboard types: Reply keyboard and inline keyboard