Pythonping

Latest version: v1.1.4

Safety actively analyzes 613649 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 4

1.1.4

This release improves documentation and code maintenance in the app and removes the 16-bit limit from the count parameter:

- `count` parameter can now go beyond 16-bit (thanks to dabell-cc)
- `README.md` is updated to describe how the module works in detail (thanks to AleksaZatezalo), and requirements.txt has been added
- Linting issues have been fixed (thaks to marksmayo)

Additionally, contributing guidelines have slightly changed to ensure all merges go through dev. All PR will now have to be set to merge into the dev branch (not master) and without increasing version number. Version number will be increased when merging dev into master.

1.1.3

This release addresses issue 82 and adds new statistics to the `ResponseList` class.

* `self.stats_packets_sent` = Total packets sent
* `self.stats_packets_returned` = Total packet sent for which we have received a reply
* `self.stats_packets_lost` = stats_packet_sent - stats_packets_returned (computed)
* ` self.stats_success_ratio` = stats_packet_returned / stats_packets_sent (computed)
* `self.stats_lost_ratio` = 1 - stats_success_ratio (computed)

Thanks to ilyapashuk for providing both code and tests to this release!

1.1.2

I am pleased to annouce we are introducing one of the most sought after features, specifying the source interface. This works by specifying which socket we want to bind pythonping to, and at the moment we can consider this experimental. The default behaviour remains specifying no source, and let the OS figure out what interface to use.

We are also improving the quality of our code by running tests on every push in GitHub. And, we are also slightly tweaked tests to consider RFC8244 for local domains.

Thanks to aryzach for the specify-source-interface code, to stephengroat for the tests.

1.1.1

This release allows you to correctly detect the size of packets sent and received and addresses issue 74.

Backward Compatibility Mode
For backward compatibility, we continue to output in the same format, but now with correct packet size referring to the ICMP reply. Consider the following code snippet:
py
from pythonping import ping

ping('8.8.8.8', count=1, verbose=True)

This piece of code will continue to generate the following output, now with the packet size which correspond to the IP packet total length of the *ICMP reply*.

Reply from 8.8.8.8, 29 bytes in 5.28ms


New Implementation
The output format defaults to `legacy` and this will change in subsequent releases. You can change it right now be forcing it to `None` as follows:
py
from pythonping import ping

ping('8.8.8.8', count=1, verbose=True, out_format=None)

This will yield the results in the new output format, showing size of both request and response:

status=OK from=8.8.8.8 ms=5.14 bytes snt=29 rcv=29


A special thanks to s1198576 for having spotted the issue and doing some analysis with WireShark!

1.1.0

Add a linux-like interval option to set the time to wait between pings, in seconds. Thanks to deltronzero for the PR and the idea!

**This is a BREAKING change** to some extent. If you are using positional parameters, the `interval` option was added BEFORE some existing parameters, so you would end up filling the wrong parameter with your data. Specifically:

- If you are calling `ping()` and providing `payload`, `sweep_start` or `sweep_end` positionally, you need to update your code to provide `interval` first (default value is zero).
- If you are instantiating the `Communicator` class and providing either `socket_options`, `seed_id`, `verbose`, or `output` positionally, then you need to update your code to include `interval first` (also here, default value is None but zero is fine as well).

1.0.17

Fix packet loss calculation when succesful requests are mixed with failed requests. Thanks to HandyMenny for the PR!

Page 1 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.