Reputation: 519
In Wireshark GUI, we can decode a UPD packet as RTP, and the same can be done in tshark using d <layer type>==<selector>,<decode-as protocol>
How can i do the same in PyShark ? I tried doing the following
import pyshark
cap = pyshark.FileCapture("Test.pcap", display filter='udp', decode_as='rtp')
for pkt in cap:
print(pkt)
But it shows the following error
AttributeError: 'str' object has no attribute 'items'
Upvotes: 1
Views: 3758
Reputation: 23815
decode_as argument should be a dict and not str Example:
decode_as={'udp.port==1234':'rtp'}
Upvotes: 6