🐰시작!
path plz가 뜨면서 시작한다.
소스코드 열어봄.
from flask import Flask, request
import requests
import os
app = Flask(__name__)
with open('FLAG.txt', 'r') as file:
FLAG = file.read().strip()
@app.route('/')
def index():
path = request.args.get('path')
if not path:
return 'path plz'
if len(path) > 100:
return 'Too long path'
try:
url = f'https://hspace.io{path}/?flag={FLAG}'
requests.get(url)
return 'flag is sent'
except:
return 'error occurred'
username
if __name__ == '__main__':
app.run(debug=False,host='0.0.0.0',port=5000)
길이가 100미만인지 길이 검증을 하고 https://hspace.io{path}로 넘어간다.
뒤에 /?flag={FLAG} 가 있는 걸 보니 flag값을 담아 요청을 하는 듯함.
@를 시작에 넣어 hspace.io 를 username 처리 시켜봤음.
드림핵툴즈에서 주소를 받아 @뒤에 입력.
flag 가 보내졌다고 뜸.
FLAG 획득.
'Web Hacking > SWLUG 내부 CTF' 카테고리의 다른 글
[SWLUG] CMDi2- write up (0) | 2025.04.14 |
---|---|
[SWLUG] CMDi1- write up (0) | 2025.04.14 |
[SWLUG] Sqli7 - write up (0) | 2025.04.14 |
[SWLUG] Sqli5 - write up (0) | 2025.04.14 |
[SWLUG] Sqli4 - write up (0) | 2025.04.14 |