Class: Net::NTLM::Blob

Inherits:
FieldSet show all
Defined in:
lib/net/ntlm/blob.rb

Instance Method Summary collapse

Methods inherited from FieldSet

#[], #[]=, #disable, #enable, #has_disabled_fields?, #initialize, int16LE, int32LE, int64LE, names, opts, prototypes, security_buffer, #serialize, #size, string, types

Constructor Details

This class inherits a constructor from Net::NTLM::FieldSet

Instance Method Details

#parse(str, offset = 0) ⇒ Object



15
16
17
18
19
20
21
22
23
24
# File 'lib/net/ntlm/blob.rb', line 15

def parse(str, offset=0)
  # 28 is the length of all fields before the variable-length
  # target_info field.
  if str.size > 28
    enable(:target_info)
    # Grab everything except the last 4 bytes (which will be :unknown2)
    self[:target_info].value = str[28..-5]
  end
  super
end