Parsing a PCAP File in python
<p>I am trying to parse a Pcap file in python. When i run this code</p>

<pre><code>for ts, buf in pcap:
    eth = dpkt.ethernet.Ethernet(buf)
    print eth
</code></pre>

<p>I get junk values instead of getting the following output:</p>

<blockquote>
  <p>Ethernet(src='\x00\x1a\xa0kUf', dst='\x00\x13I\xae\x84,',
  data=IP(src='\xc0\xa8\n\n', off=16384, dst='C\x17\x030', sum=25129,
  len=52, p=6, id=51105, data=TCP(seq=9632694, off_x2=128,
  ack=3382015884, win=54, sum=65372, flags=17, dport=80, sport=56145)))</p>
</blockquote>

<p>can anyone please tell me how to get this above output?</p>