common.py 文件源码

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

项目:Helix 作者: 3lackrush 项目源码 文件源码
def checkIntegrity():
    """
    Checks integrity of code files during the unhandled exceptions
    """

    logger.debug("running code integrity check")

    retVal = True
    for checksum, _ in (re.split(r'\s+', _) for _ in getFileItems(paths.CHECKSUM_MD5)):
        path = os.path.normpath(os.path.join(paths.SQLMAP_ROOT_PATH, _))
        if not os.path.isfile(path):
            logger.error("missing file detected '%s'" % path)
            retVal = False
        elif hashlib.md5(open(path, 'rb').read()).hexdigest() != checksum:
            logger.error("wrong checksum of file '%s' detected" % path)
            retVal = False
    return retVal
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号