All Projects → botgram → Shell Bot

botgram / Shell Bot

Licence: gpl-3.0
🤖 Telegram bot that executes commands and sends the live output

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Shell Bot

Telegram Action
GitHub Action that sends a Telegram message.
Stars: ✭ 318 (-32.34%)
Mutual labels:  telegram-bot, telegram
Tgbot Cpp
C++ library for Telegram bot API
Stars: ✭ 439 (-6.6%)
Mutual labels:  telegram-bot, telegram
Kotlin Telegram Bot
🤖 A wrapper for the Telegram Bot API written in Kotlin
Stars: ✭ 337 (-28.3%)
Mutual labels:  telegram-bot, telegram
Groupbutler
This bot can help you in managing your group with rules, anti-flood, description, custom triggers, and much more!
Stars: ✭ 399 (-15.11%)
Mutual labels:  telegram-bot, telegram
Telegram Bot
Ruby gem for building Telegram Bot with optional Rails integration
Stars: ✭ 433 (-7.87%)
Mutual labels:  telegram-bot, telegram
Laravel Social Auto Posting
🌈Laravel social auto posting
Stars: ✭ 306 (-34.89%)
Mutual labels:  telegram-bot, telegram
Webhook2telegram
🤖 A simple bot to translate JSON HTTP requests into Telegram push messages
Stars: ✭ 357 (-24.04%)
Mutual labels:  telegram-bot, telegram
checkmk-telegram-notify
Get alerted by Check_MK via Telegram bash script
Stars: ✭ 28 (-94.04%)
Mutual labels:  telegram, telegram-bot
Telegram Tutorial
Уроки по написанию своих Telegram-ботов
Stars: ✭ 409 (-12.98%)
Mutual labels:  telegram-bot, telegram
Pytg
Python package that wraps around Telegram messenger CLI. Send and receive messages, and more.
Stars: ✭ 365 (-22.34%)
Mutual labels:  telegram-bot, telegram
Pytelegrambotapi
Python Telegram bot api.
Stars: ✭ 4,986 (+960.85%)
Mutual labels:  telegram-bot, telegram
Trashemail
A hosted disposable email telegram bot; Extremely privacy friendly; Proudly hosted for community.
Stars: ✭ 408 (-13.19%)
Mutual labels:  telegram-bot, telegram
The Guard Bot
The Guard, a Telegram bot to moderate groups.
Stars: ✭ 299 (-36.38%)
Mutual labels:  telegram-bot, telegram
Telegram
Telegram Bot API Wrapper for Scala
Stars: ✭ 310 (-34.04%)
Mutual labels:  telegram-bot, telegram
remoteTelegramShell
control your Linux OS computer through Telegram
Stars: ✭ 73 (-84.47%)
Mutual labels:  telegram, telegram-bot
Shieldy
@shieldy_bot Telegram bot repository
Stars: ✭ 351 (-25.32%)
Mutual labels:  telegram-bot, telegram
teleGit
Telegram Bot in Python
Stars: ✭ 22 (-95.32%)
Mutual labels:  telegram, telegram-bot
nebula8
Open source bot to administer a telegram group with different functionalities and blacklist
Stars: ✭ 21 (-95.53%)
Mutual labels:  telegram, telegram-bot
Unifiedmessagerelay
Group Message Forward Framework (supports QQ Telegram Line Discord)
Stars: ✭ 363 (-22.77%)
Mutual labels:  telegram-bot, telegram
Userge
Userge, Durable as a Serge
Stars: ✭ 363 (-22.77%)
Mutual labels:  telegram-bot, telegram

shell-bot

This is a fully functional shellrunner Telegram bot. You tell it a command, it executes it and posts the live output. You can send input to the command by replying to the output messages.

It's a fairly complex example, because it actually appears to the command as a terminal, interprets escape sequences and it will update messages if their lines get touched. This means interactive programs such as wget should work naturally, you should see the status bar update.

The bot also allows files to be uploaded or downloaded, and also has a simple text editor available for convenience.

Here's an example of the bot running git to clone a repository:

Basic tasks

Here's an example of the bot running alsamixer:

Alsamixer with keypad

This bot demonstrates a great part of Botgram's API.

Note: Due to the tight integration, running this bot on Windows is currently not supported.

Install

First install node-pty dependencies. For example, if you're in Ubuntu/Debian:

sudo apt install -y make python build-essential

If you're using fedora instead:

sudo dnf install -y python
sudo dnf group install -y "C Development Tools and Libraries" 

Before using this, you should have obtained an auth token for your bot, and know your personal user's numeric ID. If you don't know what this means, check out the blog post for a full step-by-step guide.

git clone https://github.com/botgram/shell-bot.git && cd shell-bot
npm install

To start the bot:

node server

The first time you run it, it will ask you some questions and create the configuration file automatically: config.json. You can also write it manually, see config.example.json.

When started it will print a Bot ready. message when it's up and running. For convenience, you might want to talk to the BotFather and set the command list to the contents of commands.txt.

Authorization

When first started, the bot will just accept messages coming from your user. This is for security reasons: you don't want arbitrary people to issue commands to your computer!

If you want to allow another user to use the bot, use /token and give that user the resulting link. If you want to use this bot on a group, /token will give you a message to forward into the group.

Proxy server

shell-bot obeys the https_proxy or all_proxy environment variable to use a proxy, and supports HTTP/HTTPS/SOCKS4/SOCKS4A/SOCKS5 proxies. Examples:

export https_proxy="http://168.63.76.32:3128"
node server

export https_proxy="socks://127.0.0.1:9050"
node server

Warning: For SOCKS proxies, you need to use an IP address (not a DNS hostname).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].