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
评论列表
文章目录