Editing Windows registry, from Python, Under Linux

前端 未结 4 1277
情书的邮戳
情书的邮戳 2021-01-13 19:46

I am looking for a Python API (or a C API as I am willing to bind) for editing Windows registries from XP to 7 from within a Linux system.

The Windows target will be

相关标签:
4条回答
  • 2021-01-13 19:53

    You may want to have a look at this project. The initial idea was to recover passwords but all the tools are there to edit registry entries.

    It sounds like a dangerous idea though, I would rather find a way to launch a Python script - even remotely - with _winreg in its own environment but it doesn't seem to be a possibility for you. Note also that I didn't see any mention of Windows 7 in their project.

    0 讨论(0)
  • 2021-01-13 19:54

    OK, so you're after a hive file editor?

    I wrote a winregistry module that does this (for both NT and win9x hives). It's not really ready for the public but worked quite well with the data I was using at the time. I'm not sure what state I left it in and I haven't tested it with Win7 hives, but maybe we could get it fixed up for release? If you're interested I could probably dump it in a source control somewhere to work on.

    The document I worked from was ntpasswd's well-known WinReg.txt, however I found many flaws in it (can also chuck you my annotations on that). Since then these documents have been produced, which at first glance may cover matters better.

    0 讨论(0)
  • 2021-01-13 20:01

    I think you are out of luck, as I couldn't find any such lib. when I need such thing some years back(to change a windows image file). Also writing it yourself isn't easy and I also couldn't find any MS document describing the format.

    here are some links which come up in google search and describe format partially http://www.sentinelchicken.com/research/registry_format/ http://home.eunet.no/pnordahl/ntpasswd/WinReg.txt

    0 讨论(0)
  • 2021-01-13 20:08

    Creddump is written in Python (no C extensions) and has code to read the registry (though not write it). It may help you get started:

    http://code.google.com/p/creddump/

    0 讨论(0)
提交回复
热议问题