Module PacketFu
In: lib/packetfu.rb
lib/packetfu/arp.rb
lib/packetfu/eth.rb
lib/packetfu/capture.rb
lib/packetfu/udp.rb
lib/packetfu/pcap.rb
lib/packetfu/invalid.rb
lib/packetfu/utils.rb
lib/packetfu/ipv6.rb
lib/packetfu/tcp.rb
lib/packetfu/tcpopts.rb
lib/packetfu/inject.rb
lib/packetfu/read.rb
lib/packetfu/packet.rb
lib/packetfu/ip.rb
lib/packetfu/icmp.rb
lib/packetfu/write.rb
lib/packetfu/config.rb
examples/packetfu-shell.rb

PacketFu

A library for reading a writing packets to an interface or to a libpcap-formatted file. It is maintained at code.google.com/p/packetfu

Installation

PacketFu should live somewhere in your path. I haven‘t decided yet on packaging, will probably succumb to gems; your best bet is to just drop it into /usr/local/lib/site_ruby/1.8 or where ever you install bindata to.

Requirements

BinData: bindata.rubyforge.org

Dion Mendel‘s BinData is absolutely critical for PacketFu. Specifically, BinData‘s subversion r99 or later is required, in order to make use of the :eof patch. So, BinData r101 is included in this distribution until 0.9.3 or later is released.

PcapRub: www.metasploit.com/svn/framework3/trunk/external/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. It also requires root privilieges to access the interface directly. Perhaps most noteworthy, PcapRub is not included in this distribution, as the vagaries of libpcap driver install can lead to some unexpected results. You are on your own for that.

Examples

Wouldn‘t that be nice? The best way to learn right now is to pore over the documentation, and mess around with packetfu-shell.rb

Author

PacketFu is maintained primarily by Tod Beardsley <todb@planb-security.net>

License

Copyright (c) 2008, Tod Beardsley All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

    * Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright
      notice, this list of conditions and the following disclaimer in the
      documentation and/or other materials provided with the distribution.
    * Neither the name of Tod Beardsley nor the
      names of its contributors may be used to endorse or promote products
      derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY TOD BEARDSLEY ’’AS IS’’ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL TOD BEARDSLEY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Methods

Classes and Modules

Class PacketFu::ARPHeader
Class PacketFu::ARPPacket
Class PacketFu::AddrIpv6
Class PacketFu::Capture
Class PacketFu::Config
Class PacketFu::EthHeader
Class PacketFu::EthMac
Class PacketFu::EthNic
Class PacketFu::EthOui
Class PacketFu::EthPacket
Class PacketFu::ICMPHeader
Class PacketFu::ICMPPacket
Class PacketFu::IPHeader
Class PacketFu::IPPacket
Class PacketFu::IPv6Header
Class PacketFu::IPv6Packet
Class PacketFu::Inject
Class PacketFu::InvalidHeader
Class PacketFu::InvalidPacket
Class PacketFu::Octets
Class PacketFu::Packet
Class PacketFu::PcapFile
Class PacketFu::PcapHeader
Class PacketFu::PcapPacket
Class PacketFu::PcapPackets
Class PacketFu::Read
Class PacketFu::TCPHeader
Class PacketFu::TCPPacket
Class PacketFu::TcpEcn
Class PacketFu::TcpFlags
Class PacketFu::TcpOpts
Class PacketFu::UDPHeader
Class PacketFu::UDPPacket
Class PacketFu::Utils
Class PacketFu::Write

Public Class methods

Returns the version.

Public Instance methods

[Validate]