Skip to content

Instantly share code, notes, and snippets.

@rarecoil
Created June 4, 2019 05:22
Show Gist options
  • Save rarecoil/f6256bdf5e1bef33764dfad240781e48 to your computer and use it in GitHub Desktop.
Save rarecoil/f6256bdf5e1bef33764dfad240781e48 to your computer and use it in GitHub Desktop.
Emdee five for life (HackTheBox Web Challenge)
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)
@0xC0DEC0DE
Copy link

I still get too slow...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment