Subject: | File::PCAP::Reader doesn't set binmode for files |
On MSWindows platforms, this results in the binary packet data not being read correctly and leads to parse/decode failure. I've attached a patch for the problem against the v0.0.7 release.
Subject: | diff-Naur-Reader_pm.patch |
--- lib/File/PCAP/Reader.pm 2018-05-03 16:04:26.000000000 -0400
+++ lib/File/PCAP/Reader.pm 2019-03-03 13:30:45.616173700 -0500
@@ -205,6 +205,7 @@
my $fname = $self->{fname};
if ($fname) {
if (open(my $fh, '<', $fname)) {
+ binmode $fh;
$self->{fh} = $fh;
$self->_read_pcap_global_header();
}