PacketFu, a mid-level packet manipulation library for Ruby
Pull request Compare This branch is 179 commits behind packetfu:master.
Latest commit f205672 Aug 26, 2015 @todb Bump version
Failed to load latest commit information.
bench Retab entire project Feb 12, 2014
examples Retab entire project Feb 12, 2014
lib Bump version Aug 26, 2015
test Merge pull request #95 from packetfu/convert_ip_specs Aug 22, 2015
.document Added examples/*.rb and INSTALL.rdoc so they show up on http://rubydo… May 15, 2012
.gitignore Add .ruby-(gemset|version) to .gitignore Apr 27, 2015
.travis.yml Bump 2.1.x to 2.1.6 Aug 7, 2015 Add Feb 12, 2014
Gemfile Better dependencies and add bundler compatibility Oct 17, 2013
INSTALL.rdoc Use proper extensions for top-level files. Jun 19, 2011
LICENSE.txt Update copyright year and next version Jan 12, 2014
README.rdoc Amend credit to include @claudijd Aug 7, 2015
Rakefile Retab entire project Feb 12, 2014
gem-public_cert.pem Add a certificate for packetfu, signable gemspec Aug 25, 2015
packetfu.gemspec Add a certificate for packetfu, signable gemspec Aug 25, 2015
setup.rb Force files to be binary. Fix setup.rb. Jul 28, 2010




A library for reading and writing packets to an interface or to a libpcap-formatted file.

It is maintained at .


PacketFu is yard-compatible (as well as sdoc/rdoc, if you prefer). You can generate local documentation easily with either `yard doc .` or `sdoc`, and view doc/index.html with your favored browser. Once that's done, navigate at the top, and read up on how to create a Packet or Capture from an interface with show_live or whatever.



$ rvm gem install pcaprub

Marshall Beddoe's PcapRub is required only for packet reading and writing from a network interfaces (which is a pretty big only). PcapRub itself relies on libpcap 0.9.8 or later for packet injection. PcapRub also requires root privileges to access the interface directly.


Given the security issues with older Rubies and the long-past [EOL for 1.8.x](, PacketFu is rather stuck on very recent versions of 1.9.3 (as of this moment, the version to trust is 1.9.3-p484).


EOL, no longer supported in any sense. PacketFu may or may not work.




Not yet vetted. I don't believe there's anything exciting in these platforms, but there has been no attempt yet to perform formal testing. I know, I'm behind the times.


PacketFu ships with dozens and dozens of tests, built on Test::Unit. These should give good pointers on how you're expected to use it. See the /tests directory. Furthermore, PacketFu also ships with packetfu-shell.rb, which should be run via IRB (as root, if you intend to use your interfaces).


PacketFu is maintained primarily by Tod Beardsley and Jonathan Claudius, with help from Open Source Land.

See LICENSE for licensing details.