Kashif Ahmad
Kashif Ahmad

Reputation: 486

scapy: Timestamps lacking float precision on sniffed packets

While capturing packets on Windows 7 x64, timestamps don't seem to have float precision. the code is given below.

from scapy.all import sniff
pkts = sniff(count=10)
pkts[0].time
-> for higher precision output
print('%.6f'%pkts[0].time)

output

1506009934
1506009934.000000

any ideas how to get precise values for timestamps?

Upvotes: 1

Views: 445

Answers (1)

Pierre
Pierre

Reputation: 6237

This has been fixed in Scapy's development version. Get it from the official repository and your code should give the results you expect.

Upvotes: 1

Related Questions