Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long RegBinary value cause str(bytearray) #89

Open
Tiaonmmn opened this issue Mar 13, 2019 · 2 comments
Open

Long RegBinary value cause str(bytearray) #89

Tiaonmmn opened this issue Mar 13, 2019 · 2 comments

Comments

@Tiaonmmn
Copy link

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.

@williballenthin
Copy link
Owner

what type would you like to see here? a bytes (not bytearray)?

@Tiaonmmn
Copy link
Author

Too long RegBinary would return a str(bytearray()),I think just return a bytes object would be nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants