Python Tracepath
This is a subset version of the tracepath command written in Python3. The program supports both IPv4 and IPv6.
One interesting point of this program is that it provides maximum continous failure count parameter to stop measurement when no response is received.
This program doesn't require root privilege.
Although this software is a pure Python3 code, it may not work on platforms other than Linux beacuse of lack of supported ancillary data types of the socket interface.
Installation
Install using pip, or type python setup.py install.
Usage
A command line tool pytracepath is available.
usage: pytracepath [-h] [-4] [-6] [-m MAX_HOPS] [-e MAX_CONTINUOUS_FAILS]
HOSTNAME
positional arguments:
HOSTNAME
optional arguments:
-h, --help show this help message and exit
-4 use IPv4
-6 use IPv6
-m MAX_HOPS maximum number of hops (TTL)
-e MAX_CONTINUOUS_FAILS
maximum number of repeated probe fails
Using as a module
import pytracepath
tp = pytracepath.Tracepath('target.example.org',
ipv6=True,
max_hops=15,
max_continous_fails=5)
print(tp.start())
The start() method will return the histrory of responders of the probe packets. IPv6 is used and the maximum Hop Limit is 15 in the aboe example. Also, if the program failed to receive any response 5 times continuously while measuring, it will stop the rest of the measurement even though the Hop Limit is smaller than 15.
Code
The code is available at Github.
Metadata
Release files for pytracepath-keiichishima 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pytracepath-keiichishima-0.1.1.tar.gz | 5.0 kB | Without provenance | Details for pytracepath-keiichishima-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pytracepath_keiichishima-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for pytracepath_keiichishima-0.1.1-py3-none-any.whl |
Total release size: 11.4 kB
Release files / pytracepath-keiichishima-0.1.1.tar.gz
| Download URL | pytracepath-keiichishima-0.1.1.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
62b6647a372a53f81ec782bcd310e04e0531c7e42d3c9a5967884eb11a75ac1c
|
|
BLAKE2b-256 checksum How to use checksums |
2e8bea5d46932bbc4912e5d7cc2f63f8172fff6ec9212ebf32e9dc40207bd239
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.7
|
Release files / pytracepath_keiichishima-0.1.1-py3-none-any.whl
| Download URL | pytracepath_keiichishima-0.1.1-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5925a5494f06866572bbd7a458b31650c5b0e874fba817d5dbff9b25384db9f5
|
|
BLAKE2b-256 checksum How to use checksums |
a1bbe4eed0ef24065e66047cb48650b43e1fca7157c2d2be6e85da1720e7fe83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.7
|
Security for pytracepath-keiichishima 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.