-
Notifications
You must be signed in to change notification settings - Fork 101
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
Create reg_export_fullkey.py #79
base: master
Are you sure you want to change the base?
Conversation
Hmm sounds like something I have done before, and it seems I never created any PR for it NiKiZe/python-registry@c2fd43c Will your code generate files identical to the windows registry as well? |
i tried and tried to make my .reg exports exactly the same layout as what regedit exports, but never got it to work. there are certain conditions where things wrap with an extra byte (and not based on length of the row). While the content was exactly the same in the .reg files, when you compare them things will be different as regedit .reg files may have 55 bytes on a line and 22 on the next in some cases whereas mine might have 54 on one line and 23 on the next, etc. in the end the data is the same once imported, but depending on how you are doing your testing and validation i found it very difficult to just diff 2 .reg files and say they are the same @NiKiZe were you able to generate identical .reg files for a wide variety of data types (numbers, long strings, long binary data, etc)? |
@EricZimmerman It was a few years ago so my memory isn't exactly fresh ;) but if I'm not mistaken all the testcases I had at the time got identical output. But indeed it was not as varied testcases as one could want. @williballenthin do you know of any case where you expect the reg_export.py to only export one level? Or would it be okay to update that sample? (instead of having multiple samples doing almost the same thing) |
@NiKiZe So far I've tested inserting the generated .reg files into Windows and they work fine. This script uses the current reg_export.py to generate the required format in the destination .reg file. It doesn't replace it so it's ok to have 2 of them sitting in the same folder :) |
@tanhengyeow I think you misunderstood ... And I'm talking about if the generated files are identical to if you used windows to export the files. (not if they work to import) |
if you go the diff route, make sure you use data other than dwords =) long strings and long binary data (hundreds of bytes) should show the problem across a few hives. |
Greetings
Credits to the team for creating and maintaining this wonderful library. It is really useful for working with registry files using python.
I worked with the reg_export.py script and realized that it only exports the content of a registry key path/registry value of a key path and displays it to the console.
I created this script to extend the reg_export.py script further by exporting out values of subkeys in registry key path(s) read from a text file. All the content generated would be exported and generated into a .reg file.
Let me know what you think!
Regards
Heng Yeow