banner
毅种循环

毅种循环

请将那贻笑罪过以逐字吟咏 如对冰川投以游丝般倾诉

HackTheBox-Emdee five for life

It's simple. The Python script is as follows:

import requests
import hashlib
import re

def parse_and_encode(text):
    reg = re.compile(r"<h3 align='center'>(.*)</h3>", re.MULTILINE)
    text = reg.findall(text)[0]
    h = hashlib.md5(text.encode('utf-8'))
    dig = h.hexdigest()
    return { 'hash': dig }

session = requests.Session()
r = session.get('http://<IP>:<PORT>/')
data = parse_and_encode(r.text)
r2 = session.post('http://<IP>:<PORT>/', data=data)
reg = re.compile(r"<p align='center'>(.*)</p>", re.MULTILINE)
flag = reg.findall(r2.text)[0]
print(flag)

To run the script, use the command python3 .\life.py. The flag is HTB{N1c3_ScrIpt1nG_B0i!}.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.