Ping hosts using tcp syn packets
Project description
synping
Ping hosts using tcp syn packets.
Please note that full tcp handshake is used, we want the program to behave nicely and to explicit close the connection after each "ping".
Simple example:
$ synping example.org
Pinging example.org 4 times on port 80:
Reply from 93.184.215.14:80 time=126.17 ms
Reply from 93.184.215.14:80 time=126.54 ms
Reply from 93.184.215.14:80 time=129.27 ms
Reply from 93.184.215.14:80 time=133.44 ms
Statistics:
--------------------------
Host: example.org
Sent: 4 packets
Received: 4 packets
Lost: 0 packets (0.00)%
Min time: 126.17 ms
Max time: 133.44 ms
Average time: 128.85 ms
Notes
- Works on Python 3.7+, for older Python (2.7, 3.4...) use synping 0.9
- Uses only standard library for maximum compatibility
Install
Install using pip:
pip install synping
Or download and set executable permission on the script file:
chmod +x synping.py
Or download and run using the python interpreter:
python synping.py
Usage
usage: synping host [options]
ping hosts using tcp syn packets
positional arguments:
host host to ping
options:
-h, --help show this help message and exit
-t ping host until stopped with 'control-c'
-n COUNT number of requests to send (default: 4)
-p PORT port to ping (default: 80)
-w TIMEOUT timeout in seconds to wait for reply (default: 3)
-v, --version show program's version number and exit
e.g.: synping example.org
Examples
Ping host on port 80 (default):
synping host
Ping host on port 22:
synping host -p 22
Ping host 10 times with 1 second timeout:
synping host -n 10 -w 1
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
synping-1.1.tar.gz
(6.8 kB
view details)
Built Distribution
synping-1.1-py3-none-any.whl
(5.3 kB
view details)
File details
Details for the file synping-1.1.tar.gz
.
File metadata
- Download URL: synping-1.1.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e21b329d2c5b3733bd9b7021ba25e20285eafc00c57bf48d5121698e5884f86c |
|
MD5 | c5e8ed05a86761ca2b31ce0d0e83b193 |
|
BLAKE2b-256 | 0bdc975f287adf61573263d3aa1cb93bd73b5d6aa675a7918103280353551641 |
File details
Details for the file synping-1.1-py3-none-any.whl
.
File metadata
- Download URL: synping-1.1-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5dab7aebbce16ec9e1dc09fa53d8635143b11af4837c25407ad38b1f2de8af6 |
|
MD5 | 100a30c00cac83464cfccfddfbe6dda3 |
|
BLAKE2b-256 | f345a89a4b5af3210786bbc65e4b42232de6aa9273b2b7596ecfbb68121d94ea |