A Telegram Bot to execute Linux & Windows OS commands remotely using Telegram Messenger.
python3 -m pip install python-telegram-bot
- Search and select @BotFather in your Telegram Messenger App.
- Type /help for a list of available commands.
- Type /newbot and set a name and username for this bot.
- A API Token will be generated. Replace the 'YOUR_TELEGRAM_TOKEN' in telegramShell.py with the API Token generated in the app.
- Click on the link of your new bot and Click on Start.
- Send a message to your bot.
- Visit https://api.telegram.org/botAPITOKEN/getUpdates on your browser and find the 'id' value and replace 'YOUR_TELEGRAM_USERID' in telegramShell.py
Server:
python3 telegramShell.py
Commands:
- /h - Help
- /s - Shell
- /q - Quit
Example:
- /s ifconfig
- /s ipconfig