Skip to content

Instantly share code, notes, and snippets.

@sig00x
sig00x / jwtrepack.py
Last active December 29, 2021 21:53
jwt repack with alg None or HS256 with public key
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# we need version pyJWT 0.4.3 in order for public key encode to work!
import pkg_resources
pkg_resources.require("PyJWT==0.4.3")
import jwt # => pip install pyjwt==0.4.3
import sys
import tempfile