Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 scapy + Python,我需要找到数据包的往返时间。我怎样才能做到这一点?我到处都看过,所以不要告诉我那里有关于这个主题的信息。期待您的回答!
为简单起见,我们假设传出和传入数据包都在“tmp.pcap”中捕获,并且它们是该文件中唯一捕获的两个数据包。然后:
pkts = rdpcap("tmp.pcap") roundTripTime = pkts[1].time - pkts[0].time