Hack the box —— Emdee cinco de por vida wp

Abra la pregunta y descubra que esta es una pregunta web de 20 puntos

Sugerencia: ¿Puede cifrar lo suficientemente rápido? (¿Está cifrando lo suficientemente rápido)

Ir a la pagina web

Encriptar usando un sitio web encriptado md5

De hecho, dijo que era demasiado lento

Intenté varias veces y descubrí que tenía que sacar mi pycharm para escribir código

 

Idea: Obtenga el código fuente -> cadena cifrada coincidente regular -> cifrado MD5 -> envío posterior
 

#!/usr/bin/python3
# -*- coding:utf-8 -*-
"""
@author: maple
@file: md5.py
@time: 2021/1/22 12:49
@desc: 
"""

import requests
import hashlib
import re

url = 'http://178.128.41.22:30979/'

r = requests.session()
html = r.get(url)
text = html.text

output = re.search(r'<h3 align=\'center\'>[a-z|A-Z|0-9]+</h3>', text).group()
output = output.split('>')
output = output[1].split('<')

target = output[0]

final = hashlib.md5(target.encode(encoding='utf-8')).hexdigest()
data = {'hash':final}

posthtml = r.post(url, data=data)
print(posthtml.text)

resultado final

D:\python\venv\Scripts\python.exe D:/python/hackthebox/md5.py
<html>
<head>
<title>emdee five for life</title>
</head>
<body style="background-color:powderblue;">
<h1 align='center'>MD5 encrypt this string</h1><h3 align='center'>bEjMenXY3q9Uu84ZIzSG</h3><p align='center'>HTB{N1c3_ScrIpt1nG_B0i!}</p><center><form action="" method="post">
<input type="text" name="hash" placeholder="MD5" align='center'></input>
</br>
<input type="submit" value="Submit"></input>
</form></center>
</body>
</html>


Process finished with exit code 0

bandera: HTB {N1c3_ScrIpt1nG_B0i!}

Supongo que te gusta

Origin blog.csdn.net/yutao598/article/details/112982248
Recomendado
Clasificación