md5_scanner.py 文件源码

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

项目:shcft 作者: celiadominguez 项目源码 文件源码
def checkEvidences(self, filePath):

        # Calculate the MD5
        try:
            with open(filePath, 'rb') as file:
                file_data = file.read()
            hashValue = hashlib.md5(file_data).hexdigest()
            logger = Logger()
            logger.warn(("Hash file {}: {}").format( filePath, hashValue) )

            if hashValue in self.evidences:
                logger = Logger()
                logger.warn("Hash md5 MATCH: %s" % filePath)
                evidence = self.evidences[hashValue]
                evidence.compromised = True
                evidence.proof.append(filePath)

        except Exception:
            traceback.print_exc()
        pass
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号