Hack the box —— Emdee five for life wp

打开题目发现这是一道20分值的web题目

Hack the box —— Emdee five for life wp_第1张图片

提示:Can you encrypt fast enough?(你加密的够快吗)

进入网页

Hack the box —— Emdee five for life wp_第2张图片

使用md5加密网站进行加密

Hack the box —— Emdee five for life wp_第3张图片

他居然说我太慢了

Hack the box —— Emdee five for life wp_第4张图片

连续试了几次,发现必须得拿出我的pycharm写代码了

 

思路:得到源码->正则匹配加密字符串->MD5加密->post发送。
 

#!/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'

[a-z|A-Z|0-9]+

', 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)

最后结果

D:\python\venv\Scripts\python.exe D:/python/hackthebox/md5.py


emdee five for life


MD5 encrypt this string

bEjMenXY3q9Uu84ZIzSG

HTB{N1c3_ScrIpt1nG_B0i!}


Process finished with exit code 0

flag:HTB{N1c3_ScrIpt1nG_B0i!}

你可能感兴趣的:(Hackthebox,python,post,hacks,md5)