This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

portability of perl packages for pcap

0

Kurt gave an interesting perl script to check if a blacklisted IP addresses appeared in a pcap file. I love perl but not sure if the packages such as Net::Pcap is ported to cygwin.

asked 21 Nov '15, 09:13

pktUser1001's gravatar image

pktUser1001
201495054
accept rate: 12%


One Answer:

0

On Windows you can use ActiveState Perl, which contains Net::Pcap, or at least you can easily install it with ppm (ppm install Net::Pcap).

I tested my example with ActivePerl on Windows :-)

BTW: You can try to install Net::Pcap for Cygwin as well, but it seems to be quite some work.

http://use.perl.org/use.perl.org/_somian/journal/27529.html

I can't help you with that, as I'm not using Cygwin.

Regards
Kurt

answered 21 Nov '15, 11:21

Kurt%20Knochner's gravatar image

Kurt Knochner ♦
24.8k1039237
accept rate: 15%

edited 21 Nov '15, 11:25

Thanks for the answer, it appears that ActiveState perl doesn't have the support any more: C:\Perl64\bin>ppm install Net::Pcap Downloading ActiveState Package Repository packlist...done Updating ActiveState Package Repository database...done ppm install failed: Can't find any package that provides Net::Pcap. I am using ActiveState perl 5.14.2 on Win7.

(23 Nov '15, 07:36) pktUser1001

I run 5.16.3 and it's there, however I do have the 32-bit version. Maybe they don't offer a 64-bit version of Net::Pcap. Please try the 32-bit version of Perl.

(23 Nov '15, 08:26) Kurt Knochner ♦
perl -v

This is perl 5, version 16, subversion 3 (v5.16.3) built for MSWin32-x86-multi-thread (with 1 registered patch, see perl -V for more detail)

Copyright 1987-2012, Larry Wall

Binary build 1604 [298023] provided by ActiveState http://www.ActiveState.com Built Apr 14 2014 14:32:20

Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page.

perl  -e "use Net::Pcap; print $Net::Pcap::VERSION"
0.17
(23 Nov ‘15, 11:12) Kurt Knochner ♦