python-registry icon indicating copy to clipboard operation
python-registry copied to clipboard

Long RegBinary value cause str(bytearray)

Open Tiaonmmn opened this issue 5 years ago • 2 comments

When I use library to parse Windows AppCompatCache which is a RegBinary item in Python 3.7 environemnt,it returns a strd bytearray. For example:

reg = open=Registry.Registry("/tmp/tempfile/im_3_k5cdo_p4_/Windows/System32/config/SYSTEM").open("ControlSet001\\Control\\Session Manager\\AppCompatCache")
value1=open.value("AppCompatCache")
print("AppCompatCache is %s" % value1.value())
print("type is %s"%open.value("AppCompatCache").value_type_str())

value1 is "bytearray(b'\xee)".... it's a string not a true bytearray object. And it appears on all long RegBinary values.Short values are returning bytes objects well.

Tiaonmmn avatar Mar 13 '19 01:03 Tiaonmmn