Emdee five for life¶
Easy
misc
import requests
import hashlib
r = requests.session()
url = "http://htb:port"
html = r.get(url)
html = html.text
tx1 = "<h1 align='center'>MD5 encrypt this string</h1><h3 align='center'>"
tx2 = '</h3><center><form action="" method="post">'
text = html.split(tx1)[1].split(tx2)[0]
hs = hashlib.md5(text.encode()).hexdigest()
data = {'hash':hs}
y = req.post(url=url, data=data)
print(y.text)