python工具-解析wireshark的rtp抓包

这篇具有很好参考价值的文章主要介绍了python工具-解析wireshark的rtp抓包。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

python工具-解析wireshark的rtp抓包

  • python工具-解析wireshark的rtp抓包
    • 抓包
    • 代码
    • 执行结果

抓包

将 rtp 包数据,使用 python 解析,然后根据需要,再进一步分析

  • 使用 tcpdump 或 wireshark 抓 rtp 包
  • 过滤 rtp 包,然后 ctrl+A 全选, ctrl+C 复制, ctrl+V 粘贴,得到下边这样内容的文件
2777	2023-10-11 18:13:39.870534	34.203.218.59	10.221.136.184	RTP	230	PT=DynamicRTP-Type-96, SSRC=0x211ADEDA, Seq=6140, Time=2892404731
2780	2023-10-11 18:13:39.870724	34.203.218.59	192.168.68.165	RTP	226	PT=DynamicRTP-Type-96, SSRC=0x211ADEDA, Seq=6140, Time=2892404731
2781	2023-10-11 18:13:39.874006	192.168.68.165	34.203.218.59	RTP	84	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=0, Time=140163930
2789	2023-10-11 18:13:39.876967	192.168.68.165	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=2, Time=140163930[Malformed Packet]
2797	2023-10-11 18:13:39.877428	192.168.68.165	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=4, Time=140163930
2833	2023-10-11 18:13:39.886494	192.168.68.165	34.203.218.59	RTP	259	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=12, Time=140163930, Mark[Malformed Packet]
2837	2023-10-11 18:13:39.886700	192.168.68.165	34.203.218.59	RTP	160	PT=DynamicRTP-Type-96, SSRC=0x1891074E, Seq=0, Time=74781072, Mark
2841	2023-10-11 18:13:39.887322	192.168.68.165	34.203.218.59	RTP	604	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=13, Time=140168430, Mark[Malformed Packet]
2845	2023-10-11 18:13:39.891111	34.203.218.59	10.221.136.184	RTP	230	PT=DynamicRTP-Type-96, SSRC=0x211ADEDA, Seq=6141, Time=2892405691
2849	2023-10-11 18:13:39.892721	192.168.68.165	34.203.218.59	RTP	160	PT=DynamicRTP-Type-96, SSRC=0x1891074E, Seq=1, Time=74781072, Mark
2853	2023-10-11 18:13:39.893076	192.168.68.165	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=14, Time=140172930
2857	2023-10-11 18:13:39.893225	192.168.68.165	34.203.218.59	RTP	765	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=15, Time=140172930, Mark
2861	2023-10-11 18:13:39.900053	192.168.68.165	34.203.218.59	RTP	1197	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=16, Time=140177430, Mark
2865	2023-10-11 18:13:39.912624	34.203.218.59	10.221.136.184	RTP	230	PT=DynamicRTP-Type-96, SSRC=0x211ADEDA, Seq=6142, Time=2892406651
2869	2023-10-11 18:13:39.914207	192.168.68.165	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=17, Time=140181930
2881	2023-10-11 18:13:39.914877	192.168.68.165	34.203.218.59	RTP	364	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=20, Time=140181930, Mark[Malformed Packet]
2887	2023-10-11 18:13:39.933842	34.203.218.59	10.221.136.184	RTP	230	PT=DynamicRTP-Type-96, SSRC=0x211ADEDA, Seq=6143, Time=2892407611
2891	2023-10-11 18:13:39.950241	192.168.68.165	34.203.218.59	RTP	752	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=21, Time=140186430, Mark[Malformed Packet]
2895	2023-10-11 18:13:39.950409	192.168.68.165	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=22, Time=140190930
2899	2023-10-11 18:13:39.950592	192.168.68.165	34.203.218.59	RTP	121	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=23, Time=140190930, Mark[Malformed Packet]
2903	2023-10-11 18:13:39.950805	192.168.68.165	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=24, Time=140195430
2907	2023-10-11 18:13:39.951002	192.168.68.165	34.203.218.59	RTP	643	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=25, Time=140195430, Mark

代码

import sys
import os
import re
from datetime import datetime

# 定义 rtp 结构
class rtp_info:
    def __init__(self) -> None:
        self.seq = -1
        self.ts = 0  # timestamp
        self.st = None  # send time
        self.ssrc = ""
        self.pt = 0
        self.src_ip = None
        self.dst_ip = None
        self.len = 0
        self.protocol=""
        self.no=""

    def __str__(self):
        return f"seq: {self.seq}" \
        + f", ts: {self.ts}" \
        + f", st: {self.st}" \
        + f", ssrc: {self.ssrc}" \
        + f", pt: {self.pt}" \
        + f", src_ip: {self.src_ip}" \
        + f", dst_ip: {self.dst_ip}" \
        + f", len: {self.len}" \
        + f", protocol: {self.protocol}" \
        + f", no: {self.no}"

    def is_valid(self):
        if self.seq >= 0 and self.ts >= 0 and self.ssrc != "" and self.pt >= 0 and self.src_ip != "" and \
            self.dst_ip != "" and self.len > 0:
            return True
        return False

    def is_same_stream(self, info):
        if self.ssrc == info.ssrc and self.src_ip == info.src_ip and self.dst_ip == info.dst_ip and self.pt == info.pt:
            return True
        return False

# 构造 rtp 结构
def gen_rtp_info(linebits):
    info = rtp_info()
    info.seq = int(linebits["seq"])
    info.ts = int(linebits["time"])
    info.st = datetime.strptime(linebits["stime"], "%Y-%m-%d %H:%M:%S.%f")
    info.ssrc = linebits["ssrc"]
    info.pt = int(linebits["pt"])
    info.src_ip = linebits["src_ip"]
    info.dst_ip = linebits["dst_ip"]
    info.len = int(linebits["len"])
    info.protocol = linebits["protocol"]
    info.no = linebits["no"]
    if info.is_valid():
        return info
    return None

# 解析 rtp 数据
def get_cap_info(file_path):
    infos = []  # seq,time,datas
    line_count = 0
    for line in open(file_path): 
        line_count += 1
        # No.   Time                        Source          Destination     Protocol
        #                                                                       length  Info
        # 6309	2023-10-11 10:55:03.049429	192.168.68.34	54.197.199.30	RTP	1264	PT=DynamicRTP-Type-99, SSRC=0x4AF40405, Seq=913, Time=4447350
        # ([0-9]+)\t(.*\.[0-9]{6})\t(.*)\t(.*)\t(.*)\t([0-9]+)\tPT=DynamicRTP-Type-([0-9]+), SSRC=(.*), Seq=([0-9]+), Time=([0-9]+).*
        reg = re.compile('(?P<no>[0-9]+)\t(?P<stime>.*\.[0-9]{6})\t(?P<src_ip>.*)\t(?P<dst_ip>.*)\t(?P<protocol>.*)\t(?P<len>[0-9]+)\tPT=DynamicRTP-Type-(?P<pt>[0-9]+), SSRC=(?P<ssrc>.*), Seq=(?P<seq>[0-9]+), Time=(?P<time>[0-9]+).*')
        regMatch = reg.match(line)
        if regMatch:
            linebits = regMatch.groupdict()
            info = gen_rtp_info(linebits)
            if info != None:
                infos.append(info)
            else:
                print(f"not right rtp: {line}")
        else:
            print(f"not filter: {line}", end="")
    return infos

# asset 分组正确
def assert_same_stream(infos):
    if len(infos) == 1:
        return
    for info in infos:
        if ~info.is_same_stream(infos[0]):
            assert("is not stream")

# 按照指定字段对 rtp 进行分组,默认是按照 pt 分组,也可以指定为 ssrc
def filter_rtp(infos, pt=True, ssrc=None, protocol=None):
    result = {}
    for info in infos:
        key = info.pt
        if ssrc:
            key = info.ssrc
        elif protocol:
            key = info.protocol
        if key in result:
            result[key].append(info)
        else:
            result[key] = [info]

    for k,v in result.items():
        print(f"check pt: {k}")
        assert_same_stream(v)
    
    return result

# 获取抓包数据
def get_cap_data(file_path):
    infos = get_cap_info(file_path)
    print(len(infos))
    if len(infos) < 2:
        print("only have one item data")
        return

    result = filter_rtp(infos)
    for k,v in result.items():
        print(f"==========================: {k}, {len(v)}")
        # for val in v:
        #     print(val)

    result = filter_rtp(infos, ssrc=True)
    for k,v in result.items():
        print(f"==========================: {k}, {len(v)}")
    
    result = filter_rtp(infos, protocol=True)
    for k,v in result.items():
        print(f"==========================: {k}, {len(v)}")

if __name__ == "__main__":
    cur_path = os.path.dirname(os.path.realpath(__file__))
    for file_path in sys.argv[1:]:
        print(f"======= {file_path} ==========")
        get_cap_data(os.path.join(cur_path, file_path))

执行结果

>> python3 parse-rtp.py rtp.data
======= rtp.data ==========
not filter: 575 2023-10-12 13:37:56.931789      192.168.68.34   18.234.241.117  MPEG-1  1264    MPEG-1 message
not filter: 590 2023-10-12 13:37:56.962260      192.168.68.34   18.234.241.117  JPEG    1264    JPEG message
not filter: 598 2023-10-12 13:37:56.975779      192.168.68.34   18.234.241.117  MPEG-1  1264    MPEG-1 message[Malformed Packet]
not filter: 1581        2023-10-12 13:38:02.594095      192.168.68.34   18.234.241.117  MPEG TS 1264    Scrambled TS payload[Malformed Packet]
not filter: 1571        2023-10-12 13:38:02.562176      192.168.68.34   18.234.241.117  MPEG TS 1264    Scrambled TS payload
not filter: 1637        2023-10-12 13:38:03.107120      192.168.68.34   18.234.241.117  RTP EVENT       1264    Payload type=RTP Event, DTMF Eight 8
not filter: 1701        2023-10-12 13:38:03.650000      192.168.68.34   18.234.241.117  RTP EVENT       1264    Payload type=RTP Event, DTMF D
not filter: 1706        2023-10-12 13:38:03.667186      192.168.68.34   18.234.241.117  H.261   1264    H.261 message
102
check pt: 96
check pt: 99
==========================: 96, 22
==========================: 99, 80
check pt: 0x211ADEDA
check pt: 0x587068D1
check pt: 0x1891074E
check pt: 0x6246AE6A
==========================: 0x211ADEDA, 16
==========================: 0x587068D1, 78
==========================: 0x1891074E, 6
==========================: 0x6246AE6A, 2
check pt: RTP
check pt: G.723.1
==========================: RTP, 100
==========================: G.723.1, 2

rtp.data 内容如下文章来源地址https://www.toymoban.com/news/detail-726330.html

2777	2023-10-11 18:13:39.870534	34.203.218.59	10.221.136.184	RTP	230	PT=DynamicRTP-Type-96, SSRC=0x211ADEDA, Seq=6140, Time=2892404731
2778	2023-10-11 18:13:39.870534	34.203.218.59	10.221.136.184	RTP	226	PT=DynamicRTP-Type-96, SSRC=0x211ADEDA, Seq=6140, Time=2892404731
2779	2023-10-11 18:13:39.870694	34.203.218.59	192.168.68.165	RTP	226	PT=DynamicRTP-Type-96, SSRC=0x211ADEDA, Seq=6140, Time=2892404731
2780	2023-10-11 18:13:39.870724	34.203.218.59	192.168.68.165	RTP	226	PT=DynamicRTP-Type-96, SSRC=0x211ADEDA, Seq=6140, Time=2892404731
2781	2023-10-11 18:13:39.874006	192.168.68.165	34.203.218.59	RTP	84	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=0, Time=140163930
2782	2023-10-11 18:13:39.874006	192.168.68.165	34.203.218.59	RTP	84	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=0, Time=140163930
2783	2023-10-11 18:13:39.874272	10.221.136.184	34.203.218.59	RTP	84	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=0, Time=140163930
2785	2023-10-11 18:13:39.874382	192.168.68.165	34.203.218.59	RTP	70	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=1, Time=140163930
2786	2023-10-11 18:13:39.874382	192.168.68.165	34.203.218.59	RTP	70	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=1, Time=140163930
2787	2023-10-11 18:13:39.874515	10.221.136.184	34.203.218.59	RTP	70	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=1, Time=140163930
2789	2023-10-11 18:13:39.876967	192.168.68.165	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=2, Time=140163930[Malformed Packet]
2790	2023-10-11 18:13:39.876967	192.168.68.165	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=2, Time=140163930[Malformed Packet]
2791	2023-10-11 18:13:39.877059	10.221.136.184	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=2, Time=140163930[Malformed Packet]
2793	2023-10-11 18:13:39.877265	192.168.68.165	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=3, Time=140163930[Malformed Packet]
2794	2023-10-11 18:13:39.877265	192.168.68.165	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=3, Time=140163930[Malformed Packet]
2795	2023-10-11 18:13:39.877378	10.221.136.184	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=3, Time=140163930[Malformed Packet]
2797	2023-10-11 18:13:39.877428	192.168.68.165	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=4, Time=140163930
2798	2023-10-11 18:13:39.877428	192.168.68.165	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=4, Time=140163930
2799	2023-10-11 18:13:39.877494	10.221.136.184	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=4, Time=140163930
2801	2023-10-11 18:13:39.880152	192.168.68.165	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=5, Time=140163930
2802	2023-10-11 18:13:39.880152	192.168.68.165	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=5, Time=140163930
2803	2023-10-11 18:13:39.880370	10.221.136.184	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=5, Time=140163930
2805	2023-10-11 18:13:39.880445	192.168.68.165	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=6, Time=140163930
2806	2023-10-11 18:13:39.880445	192.168.68.165	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=6, Time=140163930
2807	2023-10-11 18:13:39.880523	10.221.136.184	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=6, Time=140163930
2813	2023-10-11 18:13:39.884747	192.168.68.165	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=7, Time=140163930
2814	2023-10-11 18:13:39.884747	192.168.68.165	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=7, Time=140163930
2815	2023-10-11 18:13:39.884930	10.221.136.184	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=7, Time=140163930
2817	2023-10-11 18:13:39.885123	192.168.68.165	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=8, Time=140163930
2818	2023-10-11 18:13:39.885123	192.168.68.165	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=8, Time=140163930
2819	2023-10-11 18:13:39.885262	10.221.136.184	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=8, Time=140163930
2821	2023-10-11 18:13:39.885525	192.168.68.165	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=9, Time=140163930
2822	2023-10-11 18:13:39.885525	192.168.68.165	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=9, Time=140163930
2823	2023-10-11 18:13:39.885630	10.221.136.184	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=9, Time=140163930
2825	2023-10-11 18:13:39.885880	192.168.68.165	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=10, Time=140163930
2826	2023-10-11 18:13:39.885880	192.168.68.165	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=10, Time=140163930
2827	2023-10-11 18:13:39.885966	10.221.136.184	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=10, Time=140163930
2829	2023-10-11 18:13:39.886283	192.168.68.165	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=11, Time=140163930[Malformed Packet]
2830	2023-10-11 18:13:39.886283	192.168.68.165	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=11, Time=140163930[Malformed Packet]
2831	2023-10-11 18:13:39.886420	10.221.136.184	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=11, Time=140163930[Malformed Packet]
2833	2023-10-11 18:13:39.886494	192.168.68.165	34.203.218.59	RTP	259	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=12, Time=140163930, Mark[Malformed Packet]
2834	2023-10-11 18:13:39.886494	192.168.68.165	34.203.218.59	RTP	259	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=12, Time=140163930, Mark[Malformed Packet]
2835	2023-10-11 18:13:39.886646	10.221.136.184	34.203.218.59	RTP	259	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=12, Time=140163930, Mark[Malformed Packet]
2837	2023-10-11 18:13:39.886700	192.168.68.165	34.203.218.59	RTP	160	PT=DynamicRTP-Type-96, SSRC=0x1891074E, Seq=0, Time=74781072, Mark
2838	2023-10-11 18:13:39.886700	192.168.68.165	34.203.218.59	RTP	160	PT=DynamicRTP-Type-96, SSRC=0x1891074E, Seq=0, Time=74781072, Mark
2839	2023-10-11 18:13:39.886754	10.221.136.184	34.203.218.59	RTP	160	PT=DynamicRTP-Type-96, SSRC=0x1891074E, Seq=0, Time=74781072, Mark
2841	2023-10-11 18:13:39.887322	192.168.68.165	34.203.218.59	RTP	604	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=13, Time=140168430, Mark[Malformed Packet]
2842	2023-10-11 18:13:39.887322	192.168.68.165	34.203.218.59	RTP	604	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=13, Time=140168430, Mark[Malformed Packet]
2843	2023-10-11 18:13:39.887411	10.221.136.184	34.203.218.59	RTP	604	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=13, Time=140168430, Mark[Malformed Packet]
2845	2023-10-11 18:13:39.891111	34.203.218.59	10.221.136.184	RTP	230	PT=DynamicRTP-Type-96, SSRC=0x211ADEDA, Seq=6141, Time=2892405691
2846	2023-10-11 18:13:39.891111	34.203.218.59	10.221.136.184	RTP	226	PT=DynamicRTP-Type-96, SSRC=0x211ADEDA, Seq=6141, Time=2892405691
2847	2023-10-11 18:13:39.891159	34.203.218.59	192.168.68.165	RTP	226	PT=DynamicRTP-Type-96, SSRC=0x211ADEDA, Seq=6141, Time=2892405691
2848	2023-10-11 18:13:39.891183	34.203.218.59	192.168.68.165	RTP	226	PT=DynamicRTP-Type-96, SSRC=0x211ADEDA, Seq=6141, Time=2892405691
2849	2023-10-11 18:13:39.892721	192.168.68.165	34.203.218.59	RTP	160	PT=DynamicRTP-Type-96, SSRC=0x1891074E, Seq=1, Time=74781072, Mark
2850	2023-10-11 18:13:39.892721	192.168.68.165	34.203.218.59	RTP	160	PT=DynamicRTP-Type-96, SSRC=0x1891074E, Seq=1, Time=74781072, Mark
2851	2023-10-11 18:13:39.892926	10.221.136.184	34.203.218.59	RTP	160	PT=DynamicRTP-Type-96, SSRC=0x1891074E, Seq=1, Time=74781072, Mark
2853	2023-10-11 18:13:39.893076	192.168.68.165	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=14, Time=140172930
2854	2023-10-11 18:13:39.893076	192.168.68.165	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=14, Time=140172930
2855	2023-10-11 18:13:39.893174	10.221.136.184	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=14, Time=140172930
2857	2023-10-11 18:13:39.893225	192.168.68.165	34.203.218.59	RTP	765	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=15, Time=140172930, Mark
2858	2023-10-11 18:13:39.893225	192.168.68.165	34.203.218.59	RTP	765	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=15, Time=140172930, Mark
2859	2023-10-11 18:13:39.893290	10.221.136.184	34.203.218.59	RTP	765	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=15, Time=140172930, Mark
2861	2023-10-11 18:13:39.900053	192.168.68.165	34.203.218.59	RTP	1197	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=16, Time=140177430, Mark
2862	2023-10-11 18:13:39.900053	192.168.68.165	34.203.218.59	RTP	1197	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=16, Time=140177430, Mark
2863	2023-10-11 18:13:39.900228	10.221.136.184	34.203.218.59	RTP	1197	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=16, Time=140177430, Mark
2865	2023-10-11 18:13:39.912624	34.203.218.59	10.221.136.184	RTP	230	PT=DynamicRTP-Type-96, SSRC=0x211ADEDA, Seq=6142, Time=2892406651
2866	2023-10-11 18:13:39.912624	34.203.218.59	10.221.136.184	RTP	226	PT=DynamicRTP-Type-96, SSRC=0x211ADEDA, Seq=6142, Time=2892406651
2867	2023-10-11 18:13:39.912740	34.203.218.59	192.168.68.165	RTP	226	PT=DynamicRTP-Type-96, SSRC=0x211ADEDA, Seq=6142, Time=2892406651
2868	2023-10-11 18:13:39.912769	34.203.218.59	192.168.68.165	RTP	226	PT=DynamicRTP-Type-96, SSRC=0x211ADEDA, Seq=6142, Time=2892406651
2869	2023-10-11 18:13:39.914207	192.168.68.165	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=17, Time=140181930
2870	2023-10-11 18:13:39.914207	192.168.68.165	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=17, Time=140181930
2871	2023-10-11 18:13:39.914403	10.221.136.184	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=17, Time=140181930
2873	2023-10-11 18:13:39.914512	192.168.68.165	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=18, Time=140181930
2874	2023-10-11 18:13:39.914512	192.168.68.165	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=18, Time=140181930
2875	2023-10-11 18:13:39.914628	10.221.136.184	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=18, Time=140181930
2877	2023-10-11 18:13:39.914737	192.168.68.165	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=19, Time=140181930
2878	2023-10-11 18:13:39.914737	192.168.68.165	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=19, Time=140181930
2879	2023-10-11 18:13:39.914827	10.221.136.184	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=19, Time=140181930
2881	2023-10-11 18:13:39.914877	192.168.68.165	34.203.218.59	RTP	364	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=20, Time=140181930, Mark[Malformed Packet]
2882	2023-10-11 18:13:39.914877	192.168.68.165	34.203.218.59	RTP	364	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=20, Time=140181930, Mark[Malformed Packet]
2883	2023-10-11 18:13:39.915050	10.221.136.184	34.203.218.59	RTP	364	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=20, Time=140181930, Mark[Malformed Packet]
2887	2023-10-11 18:13:39.933842	34.203.218.59	10.221.136.184	RTP	230	PT=DynamicRTP-Type-96, SSRC=0x211ADEDA, Seq=6143, Time=2892407611
2888	2023-10-11 18:13:39.933842	34.203.218.59	10.221.136.184	RTP	226	PT=DynamicRTP-Type-96, SSRC=0x211ADEDA, Seq=6143, Time=2892407611
2889	2023-10-11 18:13:39.933946	34.203.218.59	192.168.68.165	RTP	226	PT=DynamicRTP-Type-96, SSRC=0x211ADEDA, Seq=6143, Time=2892407611
2890	2023-10-11 18:13:39.933978	34.203.218.59	192.168.68.165	RTP	226	PT=DynamicRTP-Type-96, SSRC=0x211ADEDA, Seq=6143, Time=2892407611
2891	2023-10-11 18:13:39.950241	192.168.68.165	34.203.218.59	RTP	752	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=21, Time=140186430, Mark[Malformed Packet]
2892	2023-10-11 18:13:39.950241	192.168.68.165	34.203.218.59	RTP	752	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=21, Time=140186430, Mark[Malformed Packet]
2893	2023-10-11 18:13:39.950355	10.221.136.184	34.203.218.59	RTP	752	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=21, Time=140186430, Mark[Malformed Packet]
2895	2023-10-11 18:13:39.950409	192.168.68.165	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=22, Time=140190930
2896	2023-10-11 18:13:39.950409	192.168.68.165	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=22, Time=140190930
2897	2023-10-11 18:13:39.950519	10.221.136.184	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=22, Time=140190930
2899	2023-10-11 18:13:39.950592	192.168.68.165	34.203.218.59	RTP	121	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=23, Time=140190930, Mark[Malformed Packet]
2900	2023-10-11 18:13:39.950592	192.168.68.165	34.203.218.59	RTP	121	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=23, Time=140190930, Mark[Malformed Packet]
2901	2023-10-11 18:13:39.950727	10.221.136.184	34.203.218.59	RTP	121	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=23, Time=140190930, Mark[Malformed Packet]
2903	2023-10-11 18:13:39.950805	192.168.68.165	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=24, Time=140195430
2904	2023-10-11 18:13:39.950805	192.168.68.165	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=24, Time=140195430
2905	2023-10-11 18:13:39.950925	10.221.136.184	34.203.218.59	RTP	1266	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=24, Time=140195430
2907	2023-10-11 18:13:39.951002	192.168.68.165	34.203.218.59	RTP	643	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=25, Time=140195430, Mark
2908	2023-10-11 18:13:39.951002	192.168.68.165	34.203.218.59	RTP	643	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=25, Time=140195430, Mark
2909	2023-10-11 18:13:39.951148	10.221.136.184	34.203.218.59	RTP	643	PT=DynamicRTP-Type-99, SSRC=0x587068D1, Seq=25, Time=140195430, Mark
575	2023-10-12 13:37:56.931789	192.168.68.34	18.234.241.117	MPEG-1	1264	MPEG-1 message
590	2023-10-12 13:37:56.962260	192.168.68.34	18.234.241.117	JPEG	1264	JPEG message
598	2023-10-12 13:37:56.975779	192.168.68.34	18.234.241.117	MPEG-1	1264	MPEG-1 message[Malformed Packet]
1581	2023-10-12 13:38:02.594095	192.168.68.34	18.234.241.117	MPEG TS	1264	Scrambled TS payload[Malformed Packet]
1571	2023-10-12 13:38:02.562176	192.168.68.34	18.234.241.117	MPEG TS	1264	Scrambled TS payload
1637	2023-10-12 13:38:03.107120	192.168.68.34	18.234.241.117	RTP EVENT	1264	Payload type=RTP Event, DTMF Eight 8
1701	2023-10-12 13:38:03.650000	192.168.68.34	18.234.241.117	RTP EVENT	1264	Payload type=RTP Event, DTMF D
1702	2023-10-12 13:38:03.651116	192.168.68.34	18.234.241.117	G.723.1	1264	PT=DynamicRTP-Type-99, SSRC=0x6246AE6A, Seq=525, Time=2203470
1706	2023-10-12 13:38:03.667186	192.168.68.34	18.234.241.117	H.261	1264	H.261 message
3201	2023-10-12 13:38:14.011646	192.168.68.34	18.234.241.117	G.723.1	1264	PT=DynamicRTP-Type-99, SSRC=0x6246AE6A, Seq=1092, Time=3139559

到了这里,关于python工具-解析wireshark的rtp抓包的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • wireshark抓包工具常用功能

    wireshark工具面板如下图所示: 本文记录我比较常用的功能。如果有大佬还用过其他功能麻烦指点一二。 抓包、查找、过滤、数据分析。 为了方便自己查看,把时间戳格式设置为自己认为比较好看的格式。我这里设置的是时-分-秒-毫秒。 capture---interface  选择一个有数据传输

    2024年02月11日
    浏览(41)
  • WireShark抓包工具的安装

    在官网或者电脑应用商城都可以下载 打开安装包,点击next 点击next 选择UI界面,两种都装上 根据习惯选择 选择安装位置 点击安装 开始安装 安装成功

    2024年02月09日
    浏览(40)
  • wireshark抓包工具常用筛选命令

    一、IP地址过滤 ip.addr==192.168.1.114 //筛选出源IP或者目的IP地址是192.168.1.114的全部数据包。 ip.src==192.168.1.114 //筛选出源IP地址是182.254.110.91的数据包 ip.dst==192.168.1.114 //筛选出目的地址是192.168.1.114的数据包。 二、 MAC地址过滤 常用命令: eth.addr==MAC //筛选出源MAC地址或者目的MAC地

    2024年02月07日
    浏览(39)
  • wireshark网络抓包工具基础使用教程

    目录  简介 WireShark软件安装 Wireshark 开始抓包示例 Wireshark过滤器设置 停止抓包 ​编辑保存数据 界面介绍 基础操作 1. 调整界面大小 2. 设置显示列 1)添加显示列 ​2)隐藏显示列 3)删除显示列 3. 设置时间 ​4. 标记数据包 5. 导出数据包 6. 开启混杂模式 WireShark是非常流行的

    2024年02月16日
    浏览(48)
  • 【保姆级教学】抓包工具Wireshark使用教程

    今天讲一下另一款底层抓包软件,之前写过两篇抓包软件 分别是 fiddler抓包【https://www.cnblogs.com/zichliang/p/16067941.html】 mitmdump抓包【https://www.cnblogs.com/zichliang/p/16067941.html】 Wireshark (前身 Ethereal) 是一个网络包分析工具该工具主要是用来捕获网络数据包,并自动解析数据包为用户

    2024年02月08日
    浏览(48)
  • TCP/UDP协议抓包-工具wireshark与tcp侦听工具

    目录 一、工具下载链接 二、实验 链接:https://pan.baidu.com/s/1nvNdCyET-8JFn_wQXuH2sw?pwd=abcd  提取码:abcd  --来自百度网盘超级会员V1的分享 物理机与虚拟机都需要下载tcp侦听工具,虚拟机还要下Wireshark。 1、先检测网络流通性,物理机与虚拟机双方,各ping一下对方。  物理机与虚

    2024年02月16日
    浏览(51)
  • 【网络】抓包工具Wireshark下载安装和基本使用教程

    🦄 个人主页——🎐开着拖拉机回家_Linux,大数据运维-CSDN博客 🎐✨🍁 🪁🍁 希望本文能够给您带来一定的帮助🌸文章粗浅,敬请批评指正!🍁🐥 🪁🍁🪁🍁🪁🍁🪁🍁 🪁🍁🪁🍁🪁🍁🪁 🪁🍁🪁🍁🪁🍁🪁🍁🪁🍁🪁🍁 感谢点赞和关注 ,每天进步一点点!加油

    2024年02月08日
    浏览(48)
  • Wireshark+lua插件方式抓包及解析OMCI协议报文详细信息

            GPON协议的网络设备的功能测试,数据流分析是必不可少的,为了方便分析数据流及问题定位,采用Wireshark+lua插件方式抓包及解析OMCI协议报文详细信息(Wireshark官网已有开源omci的lua插件),后续自研开发GPON协议中GTCd帧、GTCu(Burst)帧、PLOAM消息等lua解析插件。

    2024年02月13日
    浏览(100)
  • 【抓包工具】win 10 / win 11:WireShark 下载、安装、使用

    目录 一、WireShark 下载 二、WireShark 安装 (1)双击运行安装程序 (2)Choose Components:选择组件 (3)Additional Tasks:附加任务 (4)Choose lnstall Location:选择安装位置 (5) Packet Capture:包捕获 (6)USB Capture:USB 捕获 (7)安装 Npcap (8)安装 USBPcap (9)重启电脑 三、WireSha

    2023年04月15日
    浏览(78)
  • 【抓包工具】实战:WireShark 捕获过滤器的超全使用教程

    目录 一、应用场景 二、「捕获选项」弹框界面 (1)选项卡:Input ① 接口 ② 流量 ③ 链路层 ④ 混杂 ⑤ 捕获长度(B) ⑥ 缓冲区(MB) ⑦ 监控模式 ⑧ 捕获过滤器 (2)选项卡:输出 (3)选项卡:选项 三、捕获过滤表达式 (1)语法说明 (2)限定符 (3)运算符 (4)特

    2023年04月18日
    浏览(107)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包