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) повредился или что-то типо того... Поможешь мне найти флаг в том, что осталось от моей работы?
-