From e4c34ce8bd302a0acbdfa9d89bb3b12656c6fe36 Mon Sep 17 00:00:00 2001 From: cheeest Date: Tue, 8 Apr 2025 21:18:10 +0300 Subject: [PATCH] feat(forensic): binwalk task flag accept --- app.py | 8 +++++++- templates/binwalk.html | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index 7711309..3422b3d 100644 --- a/app.py +++ b/app.py @@ -103,8 +103,14 @@ def forensic_task1(): def fbase(): return render_template('base.html') -@app.route("/forensic/.docx_files") +@app.route("/forensic/.docx_files", methods=('GET', 'POST')) def fbinwalk(): + flag_task2 = 'C4TchFl4g{GT4_6_1eaks}' + if request.method == 'POST': + user_flag = request.form['user_flag'] + if user_flag == flag_task2: + return render_template('task1-metadata.html', flag=flag_task2, success_flag='.') + return render_template('task1-metadata.html', flag=flag_task2, error='Ошибка: неверный флаг!') return render_template('binwalk.html') @app.route("/forensic/hex") diff --git a/templates/binwalk.html b/templates/binwalk.html index 535acbf..657fa25 100644 --- a/templates/binwalk.html +++ b/templates/binwalk.html @@ -8,7 +8,7 @@

Блин, мой очень-очень важный доклад (Доклад.docx) повредился или что-то типо того... Поможешь мне найти флаг в том, что осталось от моей работы?

-

Доклад.docx

+ Доклад.docx

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