Professional Telegram Account Manager with Military-Grade Security
Manage multiple Telegram accounts with advanced security features, automated workflows, and real-time protection against unauthorized access.
- OTP Destroyer - Automatically invalidates login codes in real-time to prevent unauthorized access
- 2FA Management - Encrypted storage and management of two-factor authentication passwords
- Session Guardian - Monitor and terminate suspicious login sessions instantly
- Proxy Support - MTProto/SOCKS5/HTTP with automatic bridge for Telethon compatibility
- Multi-Account Support - Manage up to 10 Telegram accounts from one interface
- Profile Manager - Update names, usernames, bios, and profile photos
- Universal Session Import - Import sessions from Telethon, Pyrogram, and TData formats
- Session Export - Export session strings with DC information
- Bulk Import - Import 50+ accounts at once from ZIP files
- Unified DM Management - Centralized inbox with forum topics for all accounts
- Auto-Reply System - Keyword-based automatic responses
- Bulk Messaging - Send messages to multiple users simultaneously
- Message Templates - Create and reuse message templates
- Channel Manager - Join, leave, create, and delete channels
- Bulk Operations - Mass join/leave channels across accounts
- Channel Statistics - Track engagement and activity metrics
- Smart Chat Cleanup - Remove personal, bot, and spam chats
- Mass Exit - Leave multiple channels and groups at once
- Spam Appeal - Automated spam restriction appeal system
- Activity Simulator - Human-like behavior to avoid detection
- Online Maker - Keep accounts online automatically
- Contact Export - Export contacts to CSV with full details
Python 3.9+
MongoDB 4.4+
Telegram API Credentials (api_id, api_hash)# Clone repository
git clone https://github.com/yourusername/teleguard.git
cd teleguard
# Create virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Setup configuration
cp config/.env.example config/.envEdit config/.env:
# Telegram API (get from https://my.telegram.org)
API_ID=12345678
API_HASH=your_api_hash_here
BOT_TOKEN=your_bot_token_here
# Database
MONGO_URI=mongodb://localhost:27017
DB_NAME=teleguard
# Security
ENCRYPTION_KEY=your_32_byte_key_here
ADMIN_IDS=123456789,987654321
# Optional
MAX_ACCOUNTS=10
SESSION_BACKUP_ENABLED=true# Start bot
python main.py
# Or use start script
python start_bot.py| Command | Description |
|---|---|
/start |
Initialize bot and show main menu |
/add |
Add new Telegram account |
/accs |
List all managed accounts |
/otp |
Toggle OTP Destroyer protection |
/help |
Show comprehensive help |
Access features through inline keyboard:
📱 Account Settings → Manage accounts, profiles, sessions
🛡️ OTP Manager → Security features and protection
💬 Messaging → DM management, auto-reply, bulk send
📢 Channels → Channel operations and management
👥 Contacts → Contact export and synchronization
🧹 Cleanup → Account cleanup and spam appeals
Method 1: Phone Login
- Click 📱 Account Settings or use
/add - Send phone number with country code:
+1234567890 - Enter OTP code with hyphens:
1-2-3-4-5 - If 2FA enabled, enter password
- Account added successfully! ✅
Method 2: Session Import
- Click 📱 Account Settings → Session Login
- Choose import method:
- 📁 Session File - Upload .session file (Telethon/Pyrogram)
- 📝 Session String - Paste session string
- 📦 Bulk Import - Upload ZIP with multiple sessions
- 📂 TData Import - Upload Telegram Desktop TData folder
- Upload/paste your session data
- Automatic format detection and conversion
- Account imported successfully! ✅
- Go to 🛡️ OTP Manager
- Select OTP Destroyer
- Choose account to protect
- Click Enable Destroyer
- Your account is now protected from unauthorized logins! 🛡️
teleguard/
├── teleguard/ # Core application
│ ├── core/ # Business logic
│ │ ├── bot_manager.py
│ │ ├── otp_manager.py
│ │ └── mongo_database.py
│ ├── handlers/ # Event handlers
│ │ ├── command_handlers.py
│ │ ├── menu_system.py
│ │ └── callback handlers
│ ├── utils/ # Utilities
│ └── workers/ # Background workers
│
├── teleguard_modular/ # Modular features
│ ├── account_settings/ # Account management
│ ├── otp_manager/ # OTP features
│ ├── messaging/ # Messaging tools
│ ├── channels/ # Channel operations
│ ├── cleanup/ # Cleanup tools
│ └── spam_master/ # Advanced tools
│
├── config/ # Configuration files
├── sessions/ # Session storage
├── logs/ # Application logs
└── main.py # Entry point
- Fernet Encryption - Military-grade symmetric encryption for all sensitive data
- Double Encryption - Session strings are encrypted twice for maximum security
- Secure Storage - 2FA passwords stored with AES-256 encryption
- Real-time Protection - Automatically invalidates login codes as they arrive
- Zero False Positives - Only triggers on actual unauthorized login attempts
- Instant Alerts - Notifies you immediately when attacks are blocked
- 99.9% Effective - Blocks virtually all unauthorized access attempts
- Active Monitoring - View all active login sessions in real-time
- Instant Termination - End suspicious sessions with one click
- Location Tracking - See login locations and device information
- Session Alerts - Get notified of new login attempts
python main.py# Using koyeb.toml configuration
koyeb deploy
# Or manual deployment
koyeb app create teleguard \
--git github.com/yourusername/teleguard \
--git-branch main \
--env API_ID=xxx \
--env API_HASH=xxx \
--env BOT_TOKEN=xxx# Build image
docker build -t teleguard .
# Run container
docker run -d \
--name teleguard \
--env-file config/.env \
-v $(pwd)/sessions:/app/sessions \
-v $(pwd)/logs:/app/logs \
teleguard| Variable | Required | Description |
|---|---|---|
API_ID |
✅ | Telegram API ID |
API_HASH |
✅ | Telegram API Hash |
BOT_TOKEN |
✅ | Bot token from @BotFather |
MONGO_URI |
✅ | MongoDB connection string |
ADMIN_IDS |
✅ | Comma-separated admin user IDs |
ENCRYPTION_KEY |
32-byte encryption key (auto-generated if not set) | |
MAX_ACCOUNTS |
❌ | Max accounts per user (default: 10) |
# Clone and setup
git clone https://github.com/yourusername/teleguard.git
cd teleguard
python -m venv venv
source venv/bin/activate
# Install dev dependencies
pip install -r requirements.txt
pip install black flake8 pytest
# Setup pre-commit hooks
pre-commit install# Format code
black teleguard/
# Lint code
flake8 teleguard/
# Type checking
mypy teleguard/# Run all tests
pytest
# Run with coverage
pytest --cov=teleguard
# Run specific test
pytest tests/test_otp_manager.py- Fork the repository
- Create feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open Pull Request
- 3,281 lines of production code
- 42% reduction from original codebase through optimization
- 10 accounts maximum per user
- 99.9% uptime on production deployments
- <100ms average response time
- 📧 Email Support: Contact via @ContactXYZrobot
- 🐛 Bug Reports: GitHub Issues
- 💬 Community: Telegram Group
- 📚 Documentation: Wiki
- Critical security issues: 1-2 hours
- Bug reports: 24-48 hours
- Feature requests: 3-7 days
- General questions: 12-24 hours
Developed by:
- @Meher_Mankar - Lead Developer & Architecture
- @Gutkesh - Core Developer & Security
Special Thanks:
- Telethon library developers
- MongoDB team
- Python community
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2024 TeleGuard
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction...
Important Legal Notice:
This tool is provided for educational and research purposes only. Users are responsible for:
- ✅ Complying with Telegram's Terms of Service
- ✅ Respecting privacy laws and regulations
- ✅ Using the tool ethically and responsibly
- ✅ Not engaging in spam or abuse
The developers are not responsible for misuse of this software.
- Web dashboard interface
- Advanced analytics and reporting
- Multi-language support
- Scheduled messaging
- AI-powered auto-reply
- Advanced spam detection
- Group management tools
- API for third-party integrations
- Complete UI redesign
- Mobile app companion
- Cloud sync features
- Enterprise features
- 🔄 Universal session import (Telethon, Pyrogram, TData)
- 📦 Bulk session import from ZIP files
- 🐛 Fixed session conflict tracking bug
- ⚡ Performance optimization with account caching (60-80% faster)
- 🪟 Improved Windows console emoji handling
- ⏱️ Optimized timeout values for better reliability
- 🔧 Refactored session utilities (DRY principles)
- ✨ Complete codebase refactor (42% reduction)
- 🛡️ Enhanced OTP Destroyer with temp bypass
- 💬 Unified DM management system
- 🧹 Advanced cleanup tools
- 🎭 Activity simulator
- 📤 Session export/import
- 👥 Contact management
- 🔐 Enhanced 2FA management
- 🚀 Initial release
- 📱 Multi-account support
- 🛡️ Basic OTP protection
- 💬 Simple messaging tools
Made with ❤️ by the TeleGuard Team