InvalidHeader catches all packets that we
don't already have a Struct for, or for
whatever reason, violates some basic packet rules for other packet types.
Public Class Methods
new(args={})click to toggle source
# File lib/packetfu/protos/invalid.rb, line 9definitialize(args={})
args[:body] ||=StructFu::String.newsuper(args[:body])
end
Public Instance Methods
read(str)click to toggle source
Reads a string to populate the object.
# File lib/packetfu/protos/invalid.rb, line 20defread(str)
force_binary(str)
returnselfifstr.nil?self[:body].readstrselfend
to_s()click to toggle source
Returns the object in string form.
# File lib/packetfu/protos/invalid.rb, line 15defto_sself.to_a.map {|x|x.to_s}.joinend