From ec1b21a418f8f9f427ec50509c4733857a3ce48a Mon Sep 17 00:00:00 2001 From: chest Date: Sat, 12 Apr 2025 17:18:03 +0300 Subject: [PATCH] feat(osint): found-me flag --- app.py | 15 ++++++++++--- templates/found-me.html | 35 ++++++++++++++++++++++++++++++ templates/osint-main.html | 2 +- templates/osint-questions.html | 7 ------ templates/ssti.html | 2 +- templates/utils/_osintsidenav.html | 2 +- 6 files changed, 50 insertions(+), 13 deletions(-) create mode 100644 templates/found-me.html delete mode 100644 templates/osint-questions.html diff --git a/app.py b/app.py index 0224122..5682a88 100644 --- a/app.py +++ b/app.py @@ -4,6 +4,7 @@ import sqlite3 from random import getrandbits from func import * import base64 +#Вот сюда тебе и надо, начинающий мастер OSINT'а! Только не смотри другие флаги: кто посмотрит, тот ***** :> connection = sqlite3.connect('database.db') @@ -24,6 +25,16 @@ app = Flask(__name__) app.config['SECRET_KEY'] = 'ca4ac4ada05f91a5790d2132992bfaed86df15c4d08f2dfe' DATABASE = 'database.db' +@app.route("/osint/found_me", methods=('GET', 'POST')) +def osintfound(): + Y0u_Fin4ly_F0und_7his = 'C4TchFl4g{Pls_supp0rt_my_pr0j3ct}' + if request.method == 'POST': + user_flag = request.form['user_flag'] + if user_flag == Y0u_Fin4ly_F0und_7his: + return render_template('found-me.html', flag=Y0u_Fin4ly_F0und_7his, success_flag='.') + return render_template('found-me.html', flag=Y0u_Fin4ly_F0und_7his, error='Ошибка: неверный флаг!') + return render_template('found-me.html') + def get_db(): db = getattr(g, '_database', None) if db is None: @@ -176,9 +187,7 @@ def fhash(): return render_template('hash.html', flag=flag_task5, error='Ошибка: неверный флаг!') return render_template('hash.html') -@app.route("/osint/questions") -def osintquestions(): - return render_template('osint-questions.html') + @app.route("/osint/geoguessr") def osintgeoguessr(): diff --git a/templates/found-me.html b/templates/found-me.html new file mode 100644 index 0000000..8cde711 --- /dev/null +++ b/templates/found-me.html @@ -0,0 +1,35 @@ +{% extends 'utils/_task.html' %} + +{% block content %} +{% include 'utils/_forensicsidenav.html' %} + + +
+
+

+
+
+

Введите ответ:

+
+ + +
+
+
+ + + + {% if error %} +

{{ error }}

+ {% elif success_flag %} +
+

Вы прошли задание!

+ + < Вернуться к заданиям > +
+ {% endif %} +{% endblock %} + + \ No newline at end of file diff --git a/templates/osint-main.html b/templates/osint-main.html index cac3fa3..a892284 100644 --- a/templates/osint-main.html +++ b/templates/osint-main.html @@ -8,7 +8,7 @@

< Задания категории OSINT >