Skip to content
This repository has been archived by the owner on Dec 17, 2023. It is now read-only.
/ PingBot Public archive

A Telegram bot to ping any server with ICMP or TCP

License

Notifications You must be signed in to change notification settings

chitang233/PingBot

Repository files navigation

PingBot

Important

Check KimmyXYC/PingBot instead.

A simple Telegram bot to ping a server over ICMP or TCP protocol.

Docker Image CI

Installation

Docker

docker run -d \
  -e API_TOKEN= \
  -e PROXY_URL= \
  -e SHOW_PUBLIC_IP=1 \
  -e ALICLOUD_APPCODE= \
  --name pingbot \
  chitang233/pingbot

To learn about the environment variables, see Configuration.

Local

First, you need to install these packages in your system:

  • Python 3.6+
  • Python pip

Then, clone the repo and install the requirements:

git clone https://github.com/chitang233/PingBot
cd PingBot
pip3 install -r requirements.txt
cp .env.example .env

After configuration, run it:

python3 main.py

Configuration

Edit .env

  • API_TOKEN - Your Telegram Bot token.(Get it from @BotFather)
  • PROXY_URL - Optional. Your proxy URL. Support HTTP and SOCKS5. e.g. http://host:port, socks5://host:port
  • ALICLOUD_APPCODE - Optional. Your AlibabaCloud AppCode.
  • SHOW_PUBLIC_IP - Show your machine's public IP address and country in /start command if set to 1.

Commands

help - Show help message
icmp - Ping a server over ICMP protocol
tcp - Ping a server over TCP protocol, port required
trace - Show the route to a server
dns - Resolve a domain name
whois - Get whois information of a domain
ip - Get IP address of a domain
ip_alicloud - Get IP information using AlibabaCloud API

About

A Telegram bot to ping any server with ICMP or TCP

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 4

  •  
  •  
  •  
  •