Sarthak Saini

Welcome to my Personal Blog.

Home About me

Emdee five for life writeup (HACK THE BOX)

Welcome Readers, Today we will be doing the hackthebox(HTB) challenge

Starting point…

our only task is to submit the string after converting it to md5 hash …but when i tried to submit i got this…

Yup Too slow

Let’s automate this and build a python script for it and i will be using:-

Source code

<title>emdee five for life</title>
<body style="background-color:powderblue;">
<h1 align='center'>MD5 encrypt this string</h1><h3 align='center'>fDRusAk7w752Hy5b5iNx</h3><p align='center'>HTB{N1c3_ScrIpt1nG_B0i!}</p><center><form action="" method="post">
<input type="text" name="hash" placeholder="MD5" align='center'></input>
<input type="submit" value="Submit"></input>

Building the script

So with my crappy skills of regex let’s start building the logic …

><h3 align='center'>sR1LvFdED1Toos1uBn6k</h3>

This was achieved by using this …


Now we will filter it more and will make the final script…

import requests
import hashlib
import re


out=r.get(url)"<h3 align='center'>+.*?</h3>",out.text)"'>.*<",out[0])"[^|'|>|<]...................",out[0])


print("sending md5 :-{}".format(out))

data={'hash': out}
out = = url, data = data)


Getting the flag

Now time to run the script and get the flag :)

syntax :- python3

There we go we got our flag …sorry for bad regex lol i am new at this, anyways if you guys like my writeup stay tuned will post more :neckbeard: