csm.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:csm 作者: gnzsystems 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号