#!/usr/bin/env python
# -*- coding:UTF-8 -*-
import socket
import struct
sniffer = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.ntohs(3))
while True:
print sniffer.recvfrom(65565)
最近在学用python抓包,上面这段代码在linux下可以运行,输出报文内容,为什么到了mac下就不能运行了?求指导