예제 #1
0
파일: registry.py 프로젝트: x9090/winappdbg
 def __setitem__(self, path, value):
     do_copy = isinstance(value, RegistryKey)
     if not do_copy and not isinstance(value, str)    \
                    and not isinstance(value, unicode):
         if isinstance(value, object):
             t = value.__class__.__name__
         else:
             t = type(value)
         raise TypeError("Expected string or RegistryKey, got %s" % t)
     hive, subpath = self._parse_path(path)
     with win32.RegCreateKey(hive, subpath) as handle:
         if do_copy:
             win32.RegCopyTree(value.handle, None, handle)
         else:
             win32.RegSetValueEx(handle, None, value)
예제 #2
0
파일: registry.py 프로젝트: x9090/winappdbg
 def __setitem__(self, name, value):
     win32.RegSetValueEx(self.handle, name, value)