The format is loosely based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Add
Packet#<<
to append a headerable object to packet. Header::TCP::Options#<<
now accepts:kind
parameter when pushing a hash.:opt
is still accepted.
- Remove
Header::DHCPv6::RequestedOptions
and useBinStruct::ArrayOfInt16
instead. Header::DHCPv6::StatusCode
now inherits fromHeader::DHCPv6::Option
(and no more from ElapsedTime option). It defines 2 new attributes:status_code
andstatus_message
.Header::SCTP::Parameter
is now a fullBinStruct::AbstractTLV
subclass. It defines methods defined inParameterMixin
. All parameter classes are now subclasses ofParameter
.Header::SCTP::Error
is now a fullBinStruct::AbstractTLV
subclass. It defines methods defined inErrorMixin
. All error classes are now subclasses ofError
.
Header::SCTP::ParameterMixin
has been remove as it is no more needed.Header::SCTP::ErrorMixin
has been remove as it is no more needed.
- Fix
Inspect.inspect_attribute
: bit attribute type is now human-readable on inspect. - Fix
Packet#body
documentation. It returnsnil
if packet has no body. - Fix
Packet#body=
: it now raisesError
exception if packet has no body, instead ofNoMethodError
one. - Fix
Packet#decapsulate
: now returnself
, as documented. Header::IPv6::HopByHop#to_s
now sets extension length.- Fix
Utils.mitm
, which crashed on instanciatingUtils::ARPSpoofer
. - Fix
Header::OSPFv2::LSA#initialize
. No more filter out:counter
parameter. - Update yard documentation. Fix all examples.
- Deprecate
PacketGen.force_binary
in favor of Ruby'sString#b
. - Deprecate
Header::EAP::MD5#optional_name
in favor of#name
.
- Add
Pcap.write
method to write pcap files. Packet.write
now writes a pcap file if given name has a.pcap
extension. Otherwise, still writing a pcapng file.
- Clean up code.
PcapNG
: factorize code inPcapNG::Block#initialize
to simplify subclasses.- Fix up plenty of minor documentation errors.
- Use
BinStruct
module frombin_struct
gem instead ofTypes
module. Utils::ARPSpoofer#active?
now returnsfalse
instead ofnil
on unknown target IP.Header::IP#flags
is removed in favor of#flag_mf
and#flag_df
.
- Remove deprecated features:
Header::Dot11::SubMngt#add_element
PcapNG::File#file_to_array
PcapNG::File#array_to_file
Types::TLV
classTypes::AbstractTLV#header_in_length
- Remove
Types
module. This module has been extracted in newbin_struct
gem. - Remove support for Ruby 2.7.
- Fixed dependency on digest-crc (#124, Sergio Bobillier)
- Add support for SCTP
- Clean Ruby 2.6 support (removed in 3.3.1)
- Update Types::AbstractTLV: may now change field order using
field_order
parameter to.create
method. - Update Types::AbstractTLV: may now choose fields to use to compute length using
field_in_length
parameter to.create
method. - Update Types::Int to add support for native-endian encoding.
- Add specialized native-endian integer types Types::Int16n, Types::SInt16n, Types::Int24n, Types::Int132, Types::SInt32n, Types::Int64n and Types::SInt64n.
- Remove support for Ruby 2.6
- Remove support for Ruby 2.5
- Add timestamps when capturing packets using Capture#start: second block parameter is the packet timestamp.
- Add Capture#timestamps to get timestamps as an Array. To use with Capture#packets or Capture#raw_packets.
- Add Header::HTTP::Headers#[] to access given HTTP header
- Add Header::HTTP::Headers#header? to check given HTTP header exist in object.
- Add Header::SNMP::VariableBindings#[] to access nth element from the binding list.
- Add Header::SNMP::VariableBindings#size.
- Add Header::DHCPv6::DUID#human_type.
- Add Header::IP::SI#to_human and Header::IP::RA#to_human.
- Types::Array#read: can now populate object from an Array of Hash, and not only from a String.
- Fix UnknownPacket#=== (was raising) and UnknownPacket#inspect (did nothing).
- Fix Header::IP::Option.build when type is unknown. In such a case, type was not set in newly crealed option.
- Fix Header::IP::Option#initiallize: length wazs not set and data parameter was not used.
- Add Types::Int#nbits to get size of Int as bits.
- Utils.arp_cache tries using 'ip neigh' command when arp is not installed.
- Support for Ruby 2.4 is removed.
- Fix Utils.arp by ensuring capture is always started before sending ARP request.
- Utils.arp_cache no more crashes when arp utils is not installed. Instead, return an empty cache.
- Utils.arp: ensure ARP request is sent before capturing response.
- Add UnknownPacket class, which handles non-parsable packets on capturing.
- PacketGen.default_iface now tries hard to return an interface with addresses.
- Fix an exception when adding a HTTP::Request header to a packet (#112).
- Fix an exception when adding a HTTP::Response header to a packet.
- Fix headers which raised when binary string was badly formatted, as happened when trying to guess a header (Packet#parse).
- Revert dependency on pcaprub from 0.13 to 0.12 to support Ruby 3.
- Remove some limitations on Types::String and Types::CString:
- Add #encode, #slice, #slice!,
- Make #<< return itself,
- Add #[]= (Types::String only).
- PcapNG module:
- Deprecate PcapNG::File#array_to_file in favor of PcapNG::File#read_array and PcapNG::File#read_hash
- Deprecate PcapNG::File#file_to_array in favor of PcapNG::File#to_a and PcapNG::File#to_h
- PcapNG module: add PcapNG::EPB#timestamp=
- Add Types::Fieldable mixin to document API needed for a class to be used as a field in Typess:Fields subclasses.
- Types::String, Types::CString and Types::IntString: add #empty?
- Types::String and Types::CString are no more subclasses or Ruby String.
- Fix some kwargs in prevision of ruby 3.
- Clean code.
- require forwardable in Types::String and Types::CString, as requiring from Types::Array is not always done before.
- PacketGen.force_binary is used instead of #force_binary in Types::String and Types::CString. Worked in spec because #force_binary was a spec helper.
- Add support for setting monitor mode when capturing packets (optix2000).
- Add PacketGen.loopback_iface to get loopback interface.
- Add Types::fields.bit_fields to get bit field definitions for given class.
- Add Inspectable module to share methods to format types when inspecting headers.
- Refactor Config to isolate use of Interfacez in a dedicated method.
- Work on Types::Fields: refactor .define_field, .define_bit_fields_on and #initialize.
- Refactor Header::EAP#read.
- Remove unneeded #read (Header::DHCPv6::Option, Header::PPI, Header::RadioTap, Header::Dot1x and Header::TCP).
- Fix Utils.arp: really use iface information.
- Fix string interpolation in Types::AbstractTLV#to_human (optix2000).
- Fix Deprecation.deprecated and Deprecation.deprecated_class in some obsure cases (optix2000).
- Add this Changelog.
- Types::AbstractTLV: add header_in_length flag. If set to
true
, then length in computed not only on value field but also on type and length ones. - Inspect module: add some helper methods.
- Add Header::Eth::MacAddr#==, Header::IP:Addr#== and Header::IPv6:Addr#==.
- Add BindingError exception. This one replaces ArgumentError when no binding is found between two headers.
- Make some little speed improvement on Headerable#read, Packet#add, Packet#insert and PcapNG::File#array_to_file.
- Clean up PcapNG module and Packet class.
- Clean up gemspec.
- Isolate dependency on PCAPRUB into PCAPRUBWrapper module.
- Create Inject module to factorize code to inject data on wire.
- Move pcap-read logic into new Pcap module.
- Refactor Packet#decapsulate
- Drop Ruby 2.3 support on travis CI.