lib/rex/registry/valuekey.rb in librex-0.0.70 vs lib/rex/registry/valuekey.rb in librex-0.0.71

- old
+ new

@@ -15,14 +15,14 @@ if vk_header !~ /vk/ puts "no vk at offset #{offset}" return end - @name_length = hive[offset+0x02, 2].unpack('c').first - @length_of_data = hive[offset+0x04, 4].unpack('l').first - @data_offset = hive[offset+ 0x08, 4].unpack('l').first - @value_type = hive[offset+0x0C, 4].unpack('c').first + @name_length = hive[offset+0x02, 2].unpack('C').first + @length_of_data = hive[offset+0x04, 4].unpack('V').first + @data_offset = hive[offset+ 0x08, 4].unpack('V').first + @value_type = hive[offset+0x0C, 4].unpack('C').first if @value_type == 1 @readable_value_type = "Unicode character string" elsif @value_type == 2 @readable_value_type = "Unicode string with %VAR% expanding" @@ -32,10 +32,10 @@ @readable_value_type = "Dword" elsif @value_type == 7 @readable_value_type = "Multiple unicode strings separated with '\\x00'" end - flag = hive[offset+0x10, 2].unpack('c').first + flag = hive[offset+0x10, 2].unpack('C').first if flag == 0 @name = "Default" else @name = hive[offset+0x14, @name_length].to_s