title: Python sniffer using pypcap and dpkt on OS X
body: <p>I'm actually trying to sniff packets with python (using pypcap and dpkt).</p>
  
  <p>I tried the following :</p>
  
  <pre><code>import dpkt, pcap
  pc = pcap.pcap()     # construct pcap object
  pc.setfilter('src host X.X.X.X or dst host X.X.X.X')
  for timestamp, packet in pc:
      print dpkt.ethernet.Ethernet(packet)
  </code></pre>
  
  <p>But nothing happens when I launch the script... Did I miss something ?</p>
  
  <p>Using Python 2.7
  On OS X Yosemite (10.10)</p>