当前位置:网站首页>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
边栏推荐
- 【指针】求二维数组中最大元素的值
- {1,2,3,2,5}查重问题
- 指针--剔除字符串中的所有数字
- Statistics 8th Edition Jia Junping Chapter 2 after class exercises and answer summary
- How to transform functional testing into automated testing?
- Summary of thread implementation
- ES全文索引
- Harmonyos application development -- address book management system telmanagesys based on listcontainer [phonebook][api v6]
- 150 common interview questions for software testing in large factories. Serious thinking is very valuable for your interview
- Statistics 8th Edition Jia Junping Chapter XIII Summary of knowledge points of time series analysis and prediction and answers to exercises after class
猜你喜欢
Query method of database multi table link
The common methods of servlet context, session and request objects and the scope of storing data in servlet.
Summary of thread implementation
"If life is just like the first sight" -- risc-v
线程的实现方式总结
What is an index in MySQL? What kinds of indexes are commonly used? Under what circumstances will the index fail?
Wu Enda's latest interview! Data centric reasons
《统计学》第八版贾俊平第六章统计量及抽样分布知识点总结及课后习题答案
Software testing interview summary - common interview questions
《统计学》第八版贾俊平第五章概率与概率分布
随机推荐
“Hello IC World”
Get started with Matplotlib drawing
Apache APIs IX has the risk of rewriting the x-real-ip header (cve-2022-24112)
Overview of LNMP architecture and construction of related services
[issue 18] share a Netease go experience
5分钟掌握机器学习鸢尾花逻辑回归分类
SystemVerilog discusses loop loop structure and built-in loop variable I
Function: find the root of the equation by Newton iterative method
《统计学》第八版贾俊平第一章课后习题及答案总结
[pointer] octal to decimal
《统计学》第八版贾俊平第三章课后习题及答案总结
c语言学习总结(上)(更新中)
"If life is just like the first sight" -- risc-v
Statistics 8th Edition Jia Junping Chapter 4 Summary and after class exercise answers
【指针】求二维数组中最大元素的值
Database monitoring SQL execution
Keil5 MDK's formatting code tool and adding shortcuts
Statistics, 8th Edition, Jia Junping, Chapter 6 Summary of knowledge points of statistics and sampling distribution and answers to exercises after class
《统计学》第八版贾俊平第二章课后习题及答案总结
Statistics 8th Edition Jia Junping Chapter 12 summary of knowledge points of multiple linear regression and answers to exercises after class