我试图在这里模拟代码:Scapy and tcpreplay: bypass temporary file for performance
当我尝试运行该代码时,此行出现 Python 错误:
f = subprocess.Popen(argv, stdin=subprocess.PIPE)
错误说
Failed: Error opening pcap file: truncated dump file; tried to read 4 file header bytes, only got 0
我认为我收到了该错误,因为子进程在将任何内容写入标准输入之前尝试从标准输入读取。
有什么建议么?