From e32803811a0c98c98aace6dbff214584ffb8301e Mon Sep 17 00:00:00 2001 From: chest Date: Mon, 27 Jan 2025 00:20:55 +0300 Subject: [PATCH] wip: Sql task tmp disign --- app.py | 4 +-- static/index.css | 53 +++++++++++++++++++++++++++++++----- templates/sql-injection.html | 2 +- 3 files changed, 49 insertions(+), 10 deletions(-) diff --git a/app.py b/app.py index 63c85b0..84036cf 100644 --- a/app.py +++ b/app.py @@ -44,8 +44,8 @@ def sql(): cursor.execute(f'SELECT * FROM Users WHERE login == "{login}" AND password == "{password}"') user = cursor.fetchone() if not user: - return render_template('sql-injection.html', error='catmeow') - return render_template('sql-injection.html', success="popacool") + return render_template('sql-injection.html', error='Ошибка: неверный логин или пароль') + return render_template('sql-injection.html', success="Вход произведён успешно!") return render_template('sql-injection.html') @app.route("/found-me") diff --git a/static/index.css b/static/index.css index e9d50ef..b245368 100644 --- a/static/index.css +++ b/static/index.css @@ -226,17 +226,57 @@ } #error { - bottom: 1.5%; - right: 10%; + bottom: 7%; + right: 11%; position: absolute; - background-color: red; + background-color: rgba(220, 20, 60, 0.5); + border-radius: 1rem; + padding: 0.1rem 1rem; + font-family: Monocraft; + color: white; + font-size: 1.2rem; + text-shadow: black 2px 2px; + border: dashed rgba(0, 0, 0, 0.5); + transition: 0.5s; + animation: 2.5s show cubic-bezier(0, 0, 0.2, 1); + box-shadow: 0.5em 0.5em 0em 0px rgba(0, 0, 0, 0.5); +} +#error:hover { + background-color: rgba(220, 20, 60, 0.65); + transform: translate(0, -0.2em); + box-shadow: 0.7em 0.7em 0em 0px rgba(0, 0, 0, 0.65); } +.hidden { + color: rgba(0,0,0,0); +} + + #success { - bottom: 1.5%; - right: 10%; + bottom: 7%; + right: 11%; position: absolute; - background-color: green; + background-color: rgba(0, 255, 127, 0.5); + border-radius: 1rem; + padding: 0.1rem 1rem; + font-family: Monocraft; + color: white; + font-size: 1.2rem; + text-shadow: black 2px 2px; + border: dashed rgba(225, 225, 225, 1); + transition: 0.5s; + animation: 2.5s show cubic-bezier(0, 0, 0.2, 1); + box-shadow: 0.5em 0.5em 0em 0px rgba(0, 0, 0, 0.5); +} +#success:hover { + background-color: rgba(0, 255, 127, 0.65); + transform: translate(0, -0.2em); + box-shadow: 0.7em 0.7em 0em 0px rgba(0, 0, 0, 0.65); +} + +@keyframes show { + from { opacity: 0; } + to { opacity: 1; } } body { @@ -246,7 +286,6 @@ body { margin: 0; overflow: hidden; background-size: cover; - } a { diff --git a/templates/sql-injection.html b/templates/sql-injection.html index cace254..6ab5d44 100644 --- a/templates/sql-injection.html +++ b/templates/sql-injection.html @@ -13,7 +13,7 @@
-

Login :

+

Login:

Password: