我需要编辑一个PACP文件中的2个RTP头字段。在
我想编辑RTP timestamp
字段和SSRC
字段。为了测试终端设备,我可以使用tcpreplay
操作一些用于回放的捕获,原因有两个。在
使用Python REPL,我可以加载文件:
from scapy.all import rdpcap
pkts_list = rdpcap("foo.pcap")
我得到了文件的长度
^{pr2}$然后我可以检查包裹
pkts_list[xxx].show()
如何/我可以解码/查看RTP头信息?抱歉,斯帕伊医生在这件事上有点为我着想。在
提前谢谢
尼尔
您可以使用此命令编写rtp头数据包。但当你想把这个包写进pcap的时候。您将看到以下错误:
所以你在写封包前一定要换货/数据包.py解放军。此链接可以更好地解释:
https://github.com/CJTozer/scapy/commit/d0367f2efa86e65fa2b0a82a864b7fe89222f153
RTP(pkts_list[xxx]['UDP'].payload).timestamp
做这项工作时有点反复尝试我的另一个问题与python有关,我会在其他地方问这个问题。在
更新:
张贴我的完整代码,以处理RTP标题,因为它需要大量的试验和错误,非常小的信息来排序它。。。这是一个黑客,但它有效,可能会帮助其他人。在
相关问题 更多 >
编程相关推荐