vicalloy/telegram-shell-bot
Acerca de
A telegram Bot to run shell commands
Herramientas de desarrolloCrecimiento de estrellas medido
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- Recopilando historial
Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.
README.md
OriginalTelegram Shell Bot
This is a Telegram Bot to run shell commands.

Requirments
- Python 3.8+
- Poetry
Install
Create a bot and get token from BotFather bot
Clone
Telegram Shell Botgit clone https://github.com/vicalloy/telegram-shell-bot.gitCopy
settings.py.sampletosettings.pyand config it.TOKENBot token generated by BotFatherENABLED_USERSYour telegram user id. Only enabled users can use this bot.-999999will disable authentication. Public bot is very danger for your server, dont's use root to run this bot. You must add settingsCMD_WHITE_LISTorONLY_SHORTCUT_CMD=True(recommend) for a public bot.
CMD_WHITE_LISTOnly command inCMD_WHITE_LISTcan be execute. Let it empty if no restriction.CMD_BLACK_LISTIgnore command inCMD_BLACK_LIST.CMD_BLACK_CHARSIgnore command contain char inCMD_BLACK_LIST.PROXY_URLProxy url.SC_MENU_ITEM_ROWSCommand shortcut config.ONLY_SHORTCUT_CMDRun command by shortcut menu only. Other commands will be ignored.
Create a virtual environment and install required packages
poetry install --only main poetry shell
Run
poetry shell
python bot.py
Run with pm2
pm2 is one of the best tools today for server production and make your bot for remote online 24/7 hours
install and doc for pm2 in https://pm2.keymetrics.io/
start bot with
pm2 start telegram-shell-bot.yml
pm2 save # save runing command
pm2 startup # for autostart on bot
Usage
Talk to the bot. Every message will be treated as a shell command.
/tasksto show all running tasks/killto kill a running task/downloadto download file from server.ex: /download README.mdThe file send to bot will upload to folder
./upload/./sudo_loginto call sudo/scriptto run scripts in ./scripts directoryThe bot sends first 3sec's output for every command. You can add
oain command to send all output. E.g.:oa;ping google.com /script oa;demo.py
Explorar proyectos relacionados
Cargando…