Myson is Telegram bot, to helps teams to get notifications and execute various shell commands. Following are few usecases for which Myson was built:
- Get notification of different events from a remote server
- Allow execution of various shell commands from Telegram application
- Notify: Send notification on a myson bot
- Photo: Send a linked photo to user or group
- Document: Send a document to user or group
- Group Management: Create telegram groups or add member to existing group
- Linux Shell: Access linux server from telegram personal chat window (Interactive commands are not implemented for example
top
command)
- Clone the repository
git clone git@bitbucket.org:fafadiatech/myson.git
- Create virtualenv
mkvirtualenv myson
workon myson
- Install required dependencies and start the server
- Create telegram bot, {You want to check #6 specifically}
- Create telegram app id
- Update settings.py
cd myson pip install -r requirements.txt python api.py python bot.py
Myson uses following libraries
- Telegram python bot - Pythonic interface to Telegram Bot API
- Telethon - Telethon is Telegram client implementation in Python 3
- Flask - Flask is a microframework for Python
- Paramiko - Paramiko is a Python implementation of the SSHv2 protocol
Verify the deployment by navigating to your server address in your preferred browser.
127.0.0.1:5000
- Create frontend
- Implement ssh session storage