title: Read Wireshark dump file for packet times
body: <p>My instructions were to read the wireshark.bin data file dumped from the Wireshark program and pick out the packet times. I have no idea how to skip the header and find the first time.</p>
  
  <pre class="lang-python prettyprint-override"><code>"""
  reads the wireshark.bin data file dumped from the wireshark program 
  """
  from datetime import datetime
  import struct
  import datetime
  
  #file = r"V:\workspace\Python3_Homework08\src\wireshark.bin"
  file = open("wireshark.bin", "rb")
  idList = [ ]
  with open("wireshark.bin", "rb") as f:
      while True:
          bytes_read = file.read(struct.calcsize("=l"))        
          if not bytes_read:
              break
          else:
              if len(bytes_read) &gt; 3:
                  idList.append(struct.unpack("=l", bytes_read)[0])
  
                  o = struct.unpack("=l111", bytes_read)[0]
                  print( datetime.date.fromtimestamp(o))
  </code></pre>