jwtcat.py 文件源码

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

项目:jwtcat 作者: AresS31 项目源码 文件源码
def run(token, word):
    """ Check if [word] can decrypt [token]
    """
    try:
        payload = jwt.decode(token, word, algorithm = 'HS256')
        return True

    except jwt.exceptions.InvalidTokenError:
        logger.debug("InvalidTokenError: {}".format(word))
        return False
    except jwt.exceptions.DecodeError:
        logger.debug("DecodingError: {}".format(word))
        return False
    except Exception as ex:
        logger.exception("Exception: {}".format(ex))
        sys.exit(1)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号