当前位置:网站首页>HackTheBox-Emdee five for life
HackTheBox-Emdee five for life
2022-07-06 14:52:00 【galaxy3000】
List of articles
summary
HackTheBox Website CTF shooting range Web Related topics Emdee five for life, Title address https://app.hackthebox.com/challenges/emdee-five-for-life, Mainly for Web Script development ability of page access and submission data .
subject
Title Overview
The title prompt is Can you encrypt fast enough?, After opening the program instance , Prompt to visit 167.99.202.131:30306
, visit http://167.99.202.131:30306, See the following Web Interface
That is, the title gives a random string , Request to get this random string and md5 hash , And fill the hash value into the input box , But there are requirements for time , If the submission is too slow, it will fail .
Question answer
After trying , After manual acquisition md5 Processing resubmission must timeout , You need to use scripts to deal with , Use here Python, The main use of requests、BeautifulSoup、hashlib Three libraries .
import requests
from bs4 import BeautifulSoup
from hashlib import md5
url = 'http://167.99.202.131:30306/'
with requests.Session() as session:
with session.get(url) as rt:
soup = BeautifulSoup(rt.text, 'html.parser')
target_str = soup.find('h3').text
md5_str = md5(target_str).hexdigest()
args = {'hash': md5_str}
with session.post(url, data=args) as rt2:
print(rt2.content)
- among requests The library is used to pass through GET Method to visit the website , And pass POST Method submit data , Here we need to pay attention to maintaining the same session , That is, random strings and hash Values remain in the same session , adopt
requests.Session()
Realization . - BeautifulSoup analysis GET Results and extracts random strings .
- hashlib Used to modify random strings md5 hash .
Run script , Include... In the returned result flag
边栏推荐
- Statistics 8th Edition Jia Junping Chapter 12 summary of knowledge points of multiple linear regression and answers to exercises after class
- Function: string storage in reverse order
- Fundamentals of digital circuit (IV) data distributor, data selector and numerical comparator
- 《统计学》第八版贾俊平第十一章一元线性回归知识点总结及课后习题答案
- 《统计学》第八版贾俊平第八章假设检验知识点总结及课后习题答案
- DVWA exercise 05 file upload file upload
- [pointer] find the length of the string
- My first blog
- Zhejiang University Edition "C language programming experiment and exercise guide (3rd Edition)" topic set
- Login the system in the background, connect the database with JDBC, and do small case exercises
猜你喜欢
Quaternion -- basic concepts (Reprint)
The salary of testers is polarized. How to become an automated test with a monthly salary of 20K?
Statistics 8th Edition Jia Junping Chapter 7 Summary of knowledge points and answers to exercises after class
How to learn automated testing in 2022? This article tells you
后台登录系统,JDBC连接数据库,做小案例练习
Statistics 8th Edition Jia Junping Chapter 5 probability and probability distribution
四元数---基本概念(转载)
内网渗透之内网信息收集(三)
How does SQLite count the data that meets another condition under the data that has been classified once
《统计学》第八版贾俊平第五章概率与概率分布
随机推荐
《統計學》第八版賈俊平第七章知識點總結及課後習題答案
Function: find the root of the equation by Newton iterative method
With 27K successful entry ByteDance, this "software testing interview notes" has benefited me for life
ES全文索引
Database monitoring SQL execution
Numpy快速上手指南
数字电路基础(三)编码器和译码器
[Ogg III] daily operation and maintenance: clean up archive logs, register Ogg process services, and regularly back up databases
What is an index in MySQL? What kinds of indexes are commonly used? Under what circumstances will the index fail?
指針:最大值、最小值和平均值
【指针】八进制转换为十进制
我的第一篇博客
Statistics 8th Edition Jia Junping Chapter 10 summary of knowledge points of analysis of variance and answers to exercises after class
【指针】求字符串的长度
【指针】求解最后留下的人
函数:计算字符串中大写字母的个数
5 minutes to master machine learning iris logical regression classification
Flash implements forced login
关于交换a和b的值的四种方法
Cadence physical library lef file syntax learning [continuous update]