A Python-based Telegram bot that:
- Stores credentials, tokens, logs, and pre-stored commands in SQLite databases.
- Executes shell commands remotely via Telegram (
cmd <command>). - Sends back the command output to your Telegram chat.
-
Database storage:
credentials.db→ Stores the Telegram bot token securely.commands.db→ Stores pre-defined reusable commands.logs.db→ Stores logs of all executed commands, including outputs and timestamps.
-
Command Execution:
- Prefix messages with
cmdto run commands. - Example:
cmd dir cmd echo Hello World - Supports both custom shell commands and pre-stored commands.
- Prefix messages with
-
Pre-defined Commands:
- Add new commands:
addcmd <name> | <shell command> - List all stored commands:
listcmd
- Add new commands:
-
Logging:
- Every command execution is logged with:
- Command name (if pre-stored)
- Actual shell command
- Output
- Timestamp
- Every command execution is logged with:
-
Auto Setup:
- Databases are created automatically on first run if missing.
- Prompts for Telegram bot token if none is stored.
- Python 3.10+
- Install dependencies:
pip install python-telegram-bot==20.7
-
Clone the repository:
git clone https://github.com/rhshourav/CryoCore.git cd CryoCore -
Run the bot:
python CryoCoreBot.py
-
Use Telegram commands:
- Run a shell command:
cmd <command> - Add a pre-defined command:
addcmd <name> | <command> - List pre-defined commands:
listcmd
- Run a shell command:
