Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def read_value(vk, stream):
"""
Read a registry value
:param vk: A parse VK record
:param stream: The registry stream
:return: A VKRecord
"""
stream.seek(REGF_HEADER_SIZE + 4 + vk.data_offset)
data_type = vk.data_type
data = stream.read(vk.data_size)
return VKRecord(value_type=data_type, value_type_str=str(data_type), value=data, size=vk.data_size)