Pypinger
A python module for pinging hosts as well as an entire subnet. This module can be used to return a list of hosts that are detected alive as well as print the output of up and down hosts
Install / Use
/learn @DataKnox/PypingerREADME
A Quick Way to Ping in Python
Install
Currently in Test
pip install pypinger==2.0.3
From the CLI
You can use Pyping from the CLI like so
pyping -s 10.10.10.1
Or ping a whole subnet with
pyping -s 10.10.10.0/24
Specify ping count
pyping -s 10.15.0.0/28 -c 1
Suppress Printed Output
pyping -s 10.15.0.0/28 -c 2 -p False
Programmatically
The pypinger function will not only print the output to the console but also will return a list of hosts that had successful pings
from pypinger import pyping
hosts = pyping('10.10.21.0/24')
print(hosts)
Or you can be prompted at runtime for the hosts/subnet
from pypinger import pyping
hosts = pyping()
print(hosts)
Specify counts and print suppression - Note that Printer is string!
from pypinger import pyping
hosts = pyping(subnet="10.15.0.0/28", count=2, printer="False")
print(hosts)
Contact
- https://twitter.com/data_knox
- https://youtube.com/c/dataknox
Related Skills
node-connect
354.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
112.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
354.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
354.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
