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

[Feature Request] .reg as backend to Registry

Open NiKiZe opened this issue 11 years ago • 2 comments

As mentioned by @williballenthin in #39

developing a second backend to python-registry that operates over .reg files. So it exposes the familiar RegistryKey/RegistryValue interface, but the underlying data comes from a .reg export.

(For reference this is kind of the inverse of #4)

I think it is worth having a separate issue open for this. (no hurry just wanted it documented) At least it can be used to discuss how this could be implemented to best fit in the project.

The best I can come up with right now is a separate module that Registry imports, and uses depending on the contents of the file?

NiKiZe avatar Feb 04 '15 18:02 NiKiZe

I think almost all the work would be in a file analogous to RegistryParse.py. Registry.py should be made more generic, where really all it does is define the RegistryKey, RegistryValue, and Registry interfaces, and an entrypoint into file parsing (which as you said, might look at the file header, and pick an appropriate backend).

williballenthin avatar Feb 04 '15 21:02 williballenthin

Let me suggest a course of action, get your feedback, and we can agree on a plan of action (whenever this takes place :-) ).

  • [ ] move RegistryParse.py to RegistryParseREGF.py
  • [ ] cleanup Registry.py classes to simply be interfaces
    • [ ] Registry
    • [ ] RegistryValue
    • [ ] RegistryKey
  • [ ] implement Registry* interfaces for REGF parser in RegistryParseREGF.py
  • [ ] in Registry.py, during open, check file header, and delegate to RegistryParseREGF.py, or raise unsupported exception
  • [ ] implement RegistryParseReg.py, including
    • [ ] possibly low-level structures (sorta like nk/vk/sk records, if necessary, which I don't think it will be)
    • [ ] high-level interfaces declared in Registry.py
  • [ ] in Registry.py, add possible delegation to RegistryParseReg.py based on file header

williballenthin avatar Feb 04 '15 21:02 williballenthin