Decode RTP over UDP with Scapy

前端 未结 1 874
无人及你
无人及你 2021-01-23 06:22

How can I decode (and manipulate) RTP over UDP with Scapy 2.3.2?

I have a capture file called rtp.pcap which contains an RTP audiostream to 224.0.1.11:5016. Wireshark c

相关标签:
1条回答
  • 2021-01-23 06:58

    The following code forces the UDP Payload to be interpreted as RTP:

    from scapy.all import RTP
    for pkt in pkts:
        if pkt["UDP"].dport==5016: # Make sure its actually RTP
            pkt["UDP"].payload = RTP(pkt["Raw"].load)
    
    0 讨论(0)
提交回复
热议问题