GithubHelp home page GithubHelp logo

ariasmn / sysbotpy Goto Github PK

View Code? Open in Web Editor NEW
1.0 0.0 0.0 59 KB

Telegram bot implementation using socket programming for basic system monitoring and administration

Python 100.00%
bot information-retrieval linux monitoring process python telegram telegram-bot windows

sysbotpy's Introduction

SysBotpy

A Telegram Bot implementation for basic system monitoring and administration. Final project for my AD/HND in Software Engineering.

SYNOPSIS

It's an easy distributed application based in a client-server model, using the Telegram Bot API. You can get basic info like local IP, OS, logged user, and also shutdown/restart the host via a private Telegram Bot. It uses TCP socket programming for local network communication between the server and the hosts.

This is not a well-tested, neither a stable implementation, and it's only intended for home/personal use, since it was made mostly to learn about Python, socket programming, freezing tools and running Python scripts as services in Windows/Linux.

RESOURCES

Also, I used Nuitka to compile my client-side script for an easy cross-platform deployment and SrvStart for the service implementation in Windows.

HOW IT WORKS?

The project uses Telegram as the "front-end". It relies on the usage of Telegram Bots.

enter image description here

INSTALLATION

For the installation, you have the choice to run the script normally with Python 3 and installing the needed libraries using pip in both clients and the server:

pip install -r requirements.txt

It's up to you if you use virtualenv.

The implementation has been tested in Nuitka, and it's working with the client script without any problems (as far as I can tell). To compile it, I used the option standalone, so the host doesn't need to have any Python interpreter installed:

python -m nuitka --standalone --follow-imports main.py

Keep in mind that you need to compile in the OS you are willing to run the application in. A C Compiler is needed for Windows, but you can find all the information you need in the Nuitka user manual page.

In both the client and server you can find a config.ini file. In the client, you can set the port to use and the server IP address (better if you do it using a firewall). In the server, you can set the port, your Telegram Bot private token and the ID of the Telegram users that are whitelisted (only those whitelisted users are capable of using the bot).

In order to create your Telegram Bot, you need to use BotFather.

sysbotpy's People

Contributors

ariasmn avatar dependabot[bot] avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.