|
|
|
@ -385,12 +385,14 @@ class Pinger():
|
|
|
|
|
|
|
|
|
|
# Handle bytes in pairs (decoding as short ints)
|
|
|
|
|
while count < countTo:
|
|
|
|
|
#note: no need for ord(bytes[i]) in py3, bytes already
|
|
|
|
|
# return int values when accessed via indeces
|
|
|
|
|
if sys.byteorder == "little":
|
|
|
|
|
loByte = ord(source_string[count])
|
|
|
|
|
hiByte = ord(source_string[count + 1])
|
|
|
|
|
loByte = source_string[count]
|
|
|
|
|
hiByte = source_string[count + 1]
|
|
|
|
|
else:
|
|
|
|
|
loByte = ord(source_string[count + 1])
|
|
|
|
|
hiByte = ord(source_string[count])
|
|
|
|
|
loByte = source_string[count + 1]
|
|
|
|
|
hiByte = source_string[count]
|
|
|
|
|
sum += hiByte * 256 + loByte
|
|
|
|
|
count += 2
|
|
|
|
|
|
|
|
|
|