feat: sql-task profile
This commit is contained in:
parent
d51ba3c8bf
commit
649fb06179
17
app.py
17
app.py
@ -1,4 +1,5 @@
|
|||||||
from flask import Flask, render_template, request, url_for, flash, redirect, g
|
import werkzeug
|
||||||
|
from flask import Flask, render_template, request, url_for, session, redirect, g, abort
|
||||||
import sqlite3
|
import sqlite3
|
||||||
|
|
||||||
connection = sqlite3.connect('database.db')
|
connection = sqlite3.connect('database.db')
|
||||||
@ -45,7 +46,8 @@ def sql():
|
|||||||
user = cursor.fetchone()
|
user = cursor.fetchone()
|
||||||
if not user:
|
if not user:
|
||||||
return render_template('sql-injection.html', error='Ошибка: неверный логин или пароль')
|
return render_template('sql-injection.html', error='Ошибка: неверный логин или пароль')
|
||||||
return render_template('sql-injection.html', success="Вход произведён успешно!")
|
session['success_login'] = True
|
||||||
|
return redirect(url_for('success_login'), code=302)
|
||||||
return render_template('sql-injection.html')
|
return render_template('sql-injection.html')
|
||||||
|
|
||||||
@app.route("/found-me")
|
@app.route("/found-me")
|
||||||
@ -56,10 +58,15 @@ def found():
|
|||||||
def decode():
|
def decode():
|
||||||
return render_template('decode.html')
|
return render_template('decode.html')
|
||||||
|
|
||||||
@app.route("/auth-data")
|
@app.route("/success_login")
|
||||||
def authdata():
|
def success_login():
|
||||||
pass
|
if session.get('success_login'):
|
||||||
|
return render_template('success.html')
|
||||||
|
abort(404)
|
||||||
|
|
||||||
|
@app.errorhandler(werkzeug.exceptions.NotFound)
|
||||||
|
def handle_bad_request(e):
|
||||||
|
return '<img src="https://http.cat/404.jpg">', 404
|
||||||
|
|
||||||
app.run(host="0.0.0.0", debug=False)
|
app.run(host="0.0.0.0", debug=False)
|
||||||
connection.close()
|
connection.close()
|
||||||
|
@ -17,6 +17,15 @@
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.profile {
|
||||||
|
width: fit-content;
|
||||||
|
max-width: 40rem;
|
||||||
|
margin: 3.5rem 0rem;
|
||||||
|
padding: 0.7rem 2rem;
|
||||||
|
background-color: rgba(0,0,0, 0.85);
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
.inpt {
|
.inpt {
|
||||||
width: 15vw;
|
width: 15vw;
|
||||||
height: 1vw;
|
height: 1vw;
|
||||||
@ -380,12 +389,6 @@
|
|||||||
box-shadow: 0.7em 0.7em 0em 0px rgba(0, 0, 0, 0.65);
|
box-shadow: 0.7em 0.7em 0em 0px rgba(0, 0, 0, 0.65);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.hidden {
|
|
||||||
color: rgba(0,0,0,0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#success {
|
#success {
|
||||||
bottom: 7%;
|
bottom: 7%;
|
||||||
right: 11%;
|
right: 11%;
|
||||||
|
20
templates/success.html
Normal file
20
templates/success.html
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="ru">
|
||||||
|
{% 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>
|
||||||
|
{% include '_sidenav.html' %}
|
||||||
|
<div id="success"> <p>Вход произведён успешно!</p> </div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user