Created
June 4, 2019 05:22
-
-
Save rarecoil/f6256bdf5e1bef33764dfad240781e48 to your computer and use it in GitHub Desktop.
Emdee five for life (HackTheBox Web Challenge)
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 | |
import hashlib | |
URI = "http://docker.hackthebox.eu:35596" | |
PROXIES = {} # {'http':'http://127.0.0.1:8080'} | |
def get_and_hash(ret): | |
begin = ret.find("<h3 align='center'>") + 19 | |
end = ret.find("</h3>") | |
md5_string = ret[begin:end].encode('utf-8') | |
digest = hashlib.md5(md5_string).hexdigest() | |
return digest | |
session = requests.Session() | |
req = session.get(URI, proxies=PROXIES) | |
md5 = get_and_hash(req.text) | |
req = session.post(URI, data={"hash":md5}, proxies=PROXIES) | |
print(req.text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I still get too slow...