Skip to content

skidqs/pinger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Python IP Pinger

A lightweight, cross-platform network utility for checking reachability and collecting response metrics from IP addresses and hostnames. Designed for network engineers, sysadmins, and automation workflows.


About

Python IP Pinger performs fast reachability checks using ICMP and provides optional TCP/UDP port checks and HTTP(S) probe support. It reports round-trip time (RTT), Time-to-Live (TTL), and simple service availability results. The tool is intentionally minimal, scriptable, and extensible for integration into monitoring and automation pipelines.


Key Features

  • ICMP Reachability Checks: Measure round-trip time (RTT) and Time-to-Live (TTL).
  • Optional TCP/UDP Port Checks: Verify open ports on the target.
  • Asynchronous HTTP(S) Probes: Check web service availability.
  • JSON Output Mode: Ideal for automation and integrations.
  • Customizable Timeouts and Concurrency: Tailor the tool to your needs.
  • Cross-Platform Compatibility: Works on Linux, macOS, and Windows.
  • Minimal Dependencies: Easy to deploy and integrate.

Usage

Run the script with the target IP/hostname followed by optional port(s):
usage <target> <port>
for example 192.168.1.1 80


Requirements

  • Python 3.7+
  • aiohttp (for asynchronous HTTP(S) probes)
  • Other dependencies listed in requirements.txt

Installation

Clone the repo and set up the environment:

git clone https://github.com/skidqs/pinger.git
cd pinger

Option 1: Run with a virtual environment (recommended)

macOS / Linux / Termux / iSH Shell

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python3 main.py

Windows (PowerShell or CMD)

python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
python main.py

Option 2: Run directly (quick setup)

If you don’t want to use a virtual environment:

pip install -r requirements.txt
python main.py

Notes

  • Termux users may need to install Python first:
    pkg install python git
  • iSH shell users may need to install dependencies before running:
    apk add python3 py3-pip git
  • If python doesn’t work, try python3.
  • Dependencies will be installed from requirements.txt if available.

About

a simple python tool to check if an ip is online or offline

Topics

Resources

License

Stars

Watchers

Forks

Languages