在 Wireshark GUI 中,我们可以将 UPD 数据包解码为 RTP,同样可以在 tshark 中使用 d <layer type>==<selector>,<decode-as protocol>
我如何在 PyShark 中做同样的事情?我尝试执行以下操作
import pyshark
cap = pyshark.FileCapture("Test.pcap", display filter='udp', decode_as='rtp')
for pkt in cap:
print(pkt)
但它显示以下错误
AttributeError: 'str' object has no attribute 'items'