Class: Rex::Registry::ValueKeyData

Inherits:
Object
  • Object
show all
Defined in:
lib/rex/registry/valuekey.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hive, offset, length, datatype, parent_offset) ⇒ ValueKeyData

Returns a new instance of ValueKeyData


53
54
55
56
57
58
59
60
61
62
63
# File 'lib/rex/registry/valuekey.rb', line 53

def initialize(hive, offset, length, datatype, parent_offset)
  offset = offset + 4

  #If the data-size is lower than 5, the data-offset value is used to store
  #the data itself!
  if length < 5
    @data = hive[parent_offset + 0x08, 4]
  else
    @data = hive[offset + 0x1000, length]
  end
end

Instance Attribute Details

#dataObject

Returns the value of attribute data


51
52
53
# File 'lib/rex/registry/valuekey.rb', line 51

def data
  @data
end