Tweaking Ruby Pcap
Ruby/Pcap provides ruby bindings to the libpcap c library, making packet dumping and analysis relatively easy. There’s a handful of tutorials around that provide some basic examples however I ran into a few problems when using the bindings at work.
Unfortunately, they haven’t been updated in a long time and I was getting some warnings due to deprecated code.
pcap.so: warning: do not use Fixnums as Symbols
Find the following lines in Pcap.c:
and change them to:
then recompile and reinstall the bindings:
make make install