tcpdump.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:stepler 作者: Mirantis 项目源码 文件源码
def read_pcap(path, lfilter=None):
    """Read pcap file and yields packets.

    Args:
        path (str): path to pcap file
        lfilter (function, optional): function to filter returned packets. By
            default all packets will be returned.

    Yields:
        obj: packet
    """
    with scapy.PcapReader(path) as reader:
        for packet in filter(lfilter, reader):
            yield packet
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号