Class: Rex::Registry::ValueList

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hive, offset, number_of_values) ⇒ ValueList


11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/rex/registry/valuelist.rb', line 11

def initialize(hive, offset, number_of_values)
  offset = offset + 4
  inner_offset = 0

  @values = []

  1.upto(number_of_values) do |v|
    valuekey_offset = hive[offset + inner_offset, 4]
    next if !valuekey_offset

    valuekey_offset = valuekey_offset.unpack('l').first
    @values << ValueKey.new(hive, valuekey_offset + 0x1000)
    inner_offset = inner_offset + 4
  end
end

Instance Attribute Details

#valuesObject

Returns the value of attribute values


9
10
11
# File 'lib/rex/registry/valuelist.rb', line 9

def values
  @values
end