-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
699616e
commit d128642
Showing
9 changed files
with
181 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
Copyright 2021-2022 MiranDaniel | ||
|
||
|
||
The Software is provided to you by the Licensor under | ||
the License, as defined below, subject to the following | ||
condition. | ||
|
||
Without limiting other conditions in the | ||
License, the grant of rights under the License will not | ||
include, and the License does not grant to you, the | ||
right to Sell the Software. | ||
|
||
For purposes of the | ||
foregoing, “Sell” means practicing any or all of the | ||
rights granted to you under the License to provide to | ||
third parties, for a fee or other consideration | ||
(including without limitation fees for hosting or | ||
consulting/ support services related to the Software), a | ||
product or service whose value derives, entirely or | ||
substantially, from the functionality of the Software. | ||
Any license notice or attribution required by the | ||
License must also include this Commons Cause License | ||
Condition notice. | ||
|
||
|
||
THE SOFTWARE IS PROVIDED "AS IS", | ||
WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, | ||
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT | ||
OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH | ||
THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import multiprocessing | ||
|
||
from flask import Blueprint, render_template, abort, request, redirect | ||
from source import conf | ||
from source import utils | ||
from source import captcha | ||
from source import invites | ||
|
||
import threading | ||
|
||
utils.check_os() | ||
utils.check_setup() | ||
|
||
dashboard = Blueprint('dashboard', __name__, | ||
template_folder='templates') | ||
|
||
configuration = conf.load_conf() | ||
|
||
|
||
@dashboard.route('/admin/login') | ||
def login(): | ||
return render_template( | ||
"login.jinja2", | ||
captcha=configuration.captcha, | ||
public=configuration.captcha_public, | ||
args=configuration.args, | ||
kwargs=configuration.kwargs | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Title</title> | ||
</head> | ||
<body> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>f1rewall admin</title> | ||
<link rel="icon" href="https://cdn.discordapp.com/attachments/921927247349305364/942517715145482240/F1rewall_Logo_Flames.png"> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"> | ||
{% if captcha == "recaptcha"%} | ||
<script src="https://www.google.com/recaptcha/api.js" async defer></script> | ||
{% elif captcha == "hcaptcha" %} | ||
<script src="https://js.hcaptcha.com/1/api.js" async defer></script> | ||
{% endif %} | ||
</head> | ||
<body class="bg-dark text-light text-center"> | ||
<main> | ||
<div class="container my-5"> | ||
<div class="row"> | ||
<div class="col"> | ||
<h1 class="display-6">f1rewall dashboard login</h1> | ||
</div> | ||
</div> | ||
<div class="row mx-auto" style="width: 33%; min-width: 300px;"> | ||
<div class="col"> | ||
<form class="mx-auto"> | ||
<div class="form-group"> | ||
<label for="username">Username</label> | ||
<input type="text" name="username" id="username" class="form-control form-control-sm"> | ||
</div> | ||
<div class="form-group"> | ||
<label for="password">Password</label> | ||
<input type="password" name="password" id="password" class="form-control form-control-sm"> | ||
</div> | ||
<div class="form-group my-3"> | ||
{% if captcha == "recaptcha"%} | ||
<form action="?" method="POST" class="f"> | ||
<div data-callback="alertSuccess" data-theme="{{args["theme"]}}" class="g-recaptcha" data-sitekey="{{public}}"></div> | ||
</form> | ||
{% elif captcha == "hcaptcha" %} | ||
<div data-callback="alertSuccess" class="h-captcha" data-sitekey="{{ public }}"></div> | ||
{% else %} | ||
<p>Invalid captcha setting, please contact admin</p> | ||
{% endif %} | ||
</div> | ||
<div class="form-group"> | ||
<button style="width: 100%" type="submit" class="btn btn-light btn-block">Login</button> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
</main> | ||
</body> | ||
</html> |