diff --git a/.idea/MadokaMagicaSite.iml b/.idea/MadokaMagicaSite.iml
index 697599b..51d2aed 100644
--- a/.idea/MadokaMagicaSite.iml
+++ b/.idea/MadokaMagicaSite.iml
@@ -9,7 +9,4 @@
-
-
-
\ No newline at end of file
diff --git a/app.py b/app.py
index 8cb1a19..5e9bb47 100644
--- a/app.py
+++ b/app.py
@@ -1,7 +1,8 @@
import werkzeug
-from flask import Flask, render_template, request, url_for, session, redirect, g, abort
+from flask import Flask, render_template, request, url_for, session, redirect, g, abort, send_file
import sqlite3
from random import getrandbits
+from func import *
connection = sqlite3.connect('database.db')
cursor = connection.cursor()
@@ -53,8 +54,15 @@ def sql():
@app.route("/found-me")
def found():
+ session['task1_id'] = id = hex(getrandbits(45))[2:]
+ session['task1_flag'] = flag_task1 = f'C4TchFl4g{{{hex(getrandbits(45))[2:]}}}'
+ task1_flag(flag_task1, id)
return render_template('found.html')
+@app.route("/found-me/task1")
+def forensic_task1():
+ return send_file(f'/tmp/task1/{session['task1_id']}.jpg')
+
@app.route("/decode-me")
def decode():
return render_template('decode.html')
diff --git a/func.py b/func.py
new file mode 100644
index 0000000..d91c5ab
--- /dev/null
+++ b/func.py
@@ -0,0 +1,7 @@
+import os
+
+def task1_flag(flag_task1, id):
+ os.system('exiftool -all= static/imgs/task1.jpg')
+ os.system('mkdir /tmp/task1')
+ os.system(f'cp static/imgs/task1.jpg /tmp/task1/{id}.jpg')
+ os.system(f"exiftool -Comment='{flag_task1}' /tmp/task1/{id}.jpg")
\ No newline at end of file
diff --git a/static/imgs/task1.jpg b/static/imgs/task1.jpg
new file mode 100644
index 0000000..465896d
Binary files /dev/null and b/static/imgs/task1.jpg differ
diff --git a/templates/found.html b/templates/found.html
index e7a638b..d5af1e5 100644
--- a/templates/found.html
+++ b/templates/found.html
@@ -1 +1,5 @@
{% extends '_task.html' %}
+{% block content %}
+
cat
+
+{% endblock %}
\ No newline at end of file
diff --git a/templates/index.html b/templates/index.html
index f987b28..e5fdda1 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -50,7 +50,7 @@
Если вы используете Windows, то можно рабоать с
Виртуальной Машины
- Good luck, have fun :)
+ Good luck, have fun :)