jedie/python-ping — Issue #15: Fixes for most bugs and improvments
Author: l4m3rx
Created: 2012-01-27 09:16:37+00:00
State: open

First , sorry for posting this code outside github ...(i hate git :/ )
I think i've closed most of the bugs and added few improvments to the script, i'll be happy if any1 can take a look over the code and give any feedback .

You can check out the pacheted version here: http://pastebin.com/6fqpnT1L

Here's a short changelog of my changes:
January 26, 2012
----------------
* Fixing BUG #4 - competability with python 2.x [tested with 2.7]
- Packet data building is different for 2.x and 3.x.
'cose of the string/bytes difference.
* Fixing BUG #10 - the multiple resolv issue.
- When pinging domain names insted of hosts (for exmaple google.com)
you can get different IP every time you try to resolv it, we should
resolv the host only once and stick to that IP.
* Fixing BUGs #3 #10 - Doing hostname resolv only once.
* Fixing BUG #14 - Removing all 'global' stuff.
- You should not use globul! Its bad for you...and its not thread safe!
* Fix - forcing the use of different times on linux/windows for
more accurate mesurments. (time.time - linux/ time.clock - windows)
* Adding quiet_ping function - This way we'll be able to use this script
as external lib.
* Changing default timeout to 3s. (1second is not enought)
* Switching data syze to packet size. It's easyer for the user to ignore the
fact that the packet headr is 8b and the datasize 64 will make packet with
size 72.