摘要: Python 判断一个进程是否存在 通常我们需要杀死一个进程首先需要判断这个进程是否存在有返回值的函数: 1 def CheckProcExistByPN(process_name): 2 try: 3 WMI = win32com.client.GetObject('winmgmts:') 4 processCodeCov = WMI.ExecQuery('select * from Win32_Process where Name="%s"' % process_name) 5 except Exception,e: 6 pr... 阅读全文
posted @ 2012-09-12 22:18 牛棚琐思 阅读(21885) 评论(0) 推荐(0) 编辑
摘要: 验证PE文件数字签名是否有效有时候加载文件前,需要先验证文件数字签名是否有效。 1 //------------------------------------------------------------------- 2 // Copyright (c) Microsoft Corporation. All rights reserved. 3 // Example of verifying the embedded signature of a PE file by using 4 // the WinVerifyTrust functio... 阅读全文
posted @ 2012-09-12 11:29 牛棚琐思 阅读(2005) 评论(1) 推荐(1) 编辑

牛棚锁思 | 改变习惯的一点点