No description
Find a file
2019-09-22 11:50:01 +02:00
.gitignore Initial commit 2017-05-16 16:04:59 +02:00
pcap.nim Fix type issues and deprecation warning 2019-09-22 11:50:01 +02:00
pcap.nimble Added .nimble file 2017-07-26 01:48:52 +02:00
README.md Fixed Markdown formatting 2017-05-16 16:07:23 +02:00

PCAP parser

Tiny pure Nim library to read PCAP files used by TcpDump/WinDump/Wireshark as described here: https://wiki.wireshark.org/Development/LibpcapFileFormat

Code example

import pcap

let
  s = newFileStream("test.pcap", fmRead)
  globalHeader = s.readGlobalHeader()

echo globalHeader

while not s.atEnd:
  let
    record = s.readRecord(globalHeader)
  echo record