def _watch_thread_dispatcher(self):
MSstore = r"Software\Microsoft\SystemCertificates"
GPstore = r"Software\Policy\Microsoft\SystemCertificates"
regKeys = {
"CU_STORE": [win32con.HKEY_CURRENT_USER, MSstore],
"LM_STORE": [win32con.HKEY_LOCAL_MACHINE, MSstore],
"USER_STORE": [win32con.HKEY_USERS, MSstore],
"CU_POLICY_STORE": [win32con.HKEY_CURRENT_USER, GPstore],
"LM_POLICY_STORE": [win32con.HKEY_LOCAL_MACHINE, GPstore]
}
watchKeys = self.database.get_watch_keys()
for regKey in watchKeys:
self._log("Dispatcher preparing watch thread for key: %s" % regKey, messageType="DEBUG")
key = regKey.split("/")
storeName = key.pop(0)
additionalValue = "\\%s" % "\\".join(key)
keystore = regKeys[storeName]
keyName = keystore[1] + additionalValue
t = threading.Thread(target=self._watch_thread, args=(keystore[0], keyName, regKey,
self._watch_thread_callback,))
self.watchThreads.append(t)
self._log("Thread prepared.", messageType="DEBUG")
self._log("Launching %d threads..." % len(self.watchThreads), messageType="DEBUG")
for t in self.watchThreads:
t.start()
self._log("Dispatcher completed.", messageType="DEBUG")
return
评论列表
文章目录