feat: sql-task get flag

This commit is contained in:
2025-02-03 00:19:41 +03:00
committed by Sweetbread
parent f102fe8014
commit 5a768a56bf
4 changed files with 70 additions and 23 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ cursor.execute(f'SELECT * FROM Users WHERE login == "{login}" AND password == "{
<div class="divv" id="sqlInpt">
<form action="sql-injection" method="post" class="simpletext">
<p class="simpletext">Попробуй войти от имени админа,<br />
используя уязвимость <abbr class="hltext" title="Смотри подсказку(кнопка снизу слева)">SQL-инъекции</abbr></p>
используя уязвимость. Найдите флаг<abbr class="hltext" title="Смотри подсказку(кнопка снизу слева)">SQL-инъекции</abbr></p>
<div class="small-container" ><p>Логин: <p class="hidden">.</p> </p> <input type="text" name="login" class="inpt" /></div>
<div class="small-container"><p>Пароль:</p> <input type="password" name="pass" class="inpt"/></div>
<input type="submit" value="Submit" class="btn1" />
+23 -7
View File
@@ -3,16 +3,32 @@
{% include '_head.html' %}
<body>
{% include '_header.html' %}
<div class="profile">
<h2 class="header" style="text-align:left">Ваш Профиль:</h2>
<p class="simpletext" style="text-align:left">Логин: <span class="context">admin</span></p>
<p class="simpletext" style="text-align:left">Почта: <span class="context">supercooladmin@coders-squad.com</span></p>
<p class="simpletext" style="text-align:left">О себе:</p>
<p class="mono" style="text-align:left">Я самый надёжный и крутой админ в мире.<span class="hidden">me0w{SqlT4skFl4g}</span><br/>ВЫДЕЛИ МЕНЯ! </p>
<div class="container" style="max-width:70%; justify-content: space-between;min-width: 40rem; flex-wrap: nowrap">
<div class="profile">
<h2 class="header" style="text-align:left">Ваш Профиль:</h2>
<p class="simpletext" style="text-align:left">Логин: <span class="context">admin</span></p>
<p class="simpletext" style="text-align:left">Почта: <span class="context">supercooladmin@coders-squad.com</span></p>
<p class="simpletext" style="text-align:left">О себе:</p>
<p class="mono" style="text-align:left">Я самый надёжный и крутой админ в мире.<span class="hidden">{{ flag }}</span><br/>ВЫДЕЛИ МЕНЯ! </p>
</div>
<div class="flag-input ">
<h3 class="header" style="text-align:left">Введите ответ:</h3>
<form action="success_login" method="post" class="simpletext">
<input class="inpt" type="text" name="user_flag" style="width: 100%; height: 1.25rem; margin: 0">
<input type="submit" value="Submit" class="btn1" style="margin-top: 1.25rem">
</div>
</div>
{% include '_sidenav.html' %}
<div id="success"> <p>Вход произведён успешно!</p> </div>
{% if error %}
<div id="error"> <p>{{ error }}</p> </div>
{% elif success_flag %}
<div class="task-done">
<p class="simpletext" style="position-area: center">В прошли задание! выбор следующих и кошки</p>
</div>
{% else %}
<div id="success"> <p>Вход произведён успешно!</p> </div>
{% endif %}
</body>