sniffer.py 文件源码

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

项目:amadash 作者: ipartola 项目源码 文件源码
def parse_ethernet_header(self, packet):
        dst_mac = self.bytes_to_mac(packet[0:6])
        src_mac = self.bytes_to_mac(packet[6:12])
        eth_protocol = socket.ntohs((packet[13] << 8) + packet[12])

        return dst_mac, src_mac, eth_protocol
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号