first huge commit

This commit is contained in:
Phillip Tarrant 2020-08-11 20:36:09 -04:00
parent 9b671ebfed
commit 2f12f95ab2
2012 changed files with 383506 additions and 2 deletions

2
.gitignore vendored
View File

@ -14,3 +14,5 @@ env.bak/
venv.bak/
.idea/
app/config/web

View File

@ -0,0 +1,74 @@
import datetime
import logging
from sys import modules
logger = logging.getLogger(__name__)
try:
from colorama import init
from termcolor import colored
except ModuleNotFoundError as e:
logging.critical("Import Error: Unable to load {} module".format(e, e.name))
print("Import Error: Unable to load {} module".format(e, e.name))
pass
class Console:
def __init__(self):
if 'colorama' in modules:
init()
@staticmethod
def do_print(message, color):
if 'termcolor' in modules or 'colorama' in modules:
print(colored(message, color))
else:
print(message)
def magenta(self, message):
self.do_print(message, "magenta")
def cyan(self, message):
self.do_print(message, "cyan")
def yellow(self, message):
self.do_print(message, "yellow")
def red(self, message):
self.do_print(message, "red")
def green(self, message):
self.do_print(message, "green")
def white(self, message):
self.do_print(message, "white")
def debug(self, message):
dt = datetime.datetime.now().strftime("%Y-%m-%d %I:%M:%S %p")
self.magenta("[+] Crafty: {} - DEBUG:\t{}".format(dt, message))
def info(self, message):
dt = datetime.datetime.now().strftime("%Y-%m-%d %I:%M:%S %p")
self.white("[+] Crafty: {} - INFO:\t{}".format(dt, message))
def warning(self, message):
dt = datetime.datetime.now().strftime("%Y-%m-%d %I:%M:%S %p")
self.cyan("[+] Crafty: {} - WARNING:\t{}".format(dt, message))
def error(self, message):
dt = datetime.datetime.now().strftime("%Y-%m-%d %I:%M:%S %p")
self.yellow("[+] Crafty: {} - ERROR:\t{}".format(dt, message))
def critical(self, message):
dt = datetime.datetime.now().strftime("%Y-%m-%d %I:%M:%S %p")
self.red("[+] Crafty: {} - CRITICAL:\t{}".format(dt, message))
def help(self, message):
dt = datetime.datetime.now().strftime("%Y-%m-%d %I:%M:%S %p")
self.green("[+] Crafty: {} - HELP:\t{}".format(dt, message))
console = Console()

View File

@ -0,0 +1,311 @@
import os
import sys
import json
import uuid
import string
import base64
import socket
import random
import logging
import configparser
from datetime import datetime
from socket import gethostname
from app.classes.shared.console import console
logger = logging.getLogger(__name__)
try:
from OpenSSL import crypto
except ModuleNotFoundError as e:
logger.critical("Import Error: Unable to load {} module".format(e, e.name))
console.critical("Import Error: Unable to load {} module".format(e, e.name))
sys.exit(1)
class Helpers:
def __init__(self):
self.root_dir = os.path.abspath(os.path.curdir)
self.config_dir = os.path.join(self.root_dir, 'app', 'config')
self.session_file = os.path.join(self.root_dir, 'session.lock')
self.webroot = os.path.join(self.root_dir, 'app', 'frontend')
self.db_path = os.path.join(self.root_dir, 'app', 'config', 'commander.sqlite')
self.exiting = False
def get_setting(self, section, key):
config_file = os.path.join(self.config_dir, 'config.ini')
try:
our_config = configparser.ConfigParser()
our_config.read(config_file)
if our_config.has_option(section, key):
return our_config[section][key]
except Exception as e:
logger.critical("Config File Error: Unable to read {} due to {}".format(config_file, e))
console.critical("Config File Error: Unable to read {} due to {}".format(config_file, e))
return False
def get_local_ip(self):
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
try:
# doesn't even have to be reachable
s.connect(('10.255.255.255', 1))
IP = s.getsockname()[0]
except Exception:
IP = '127.0.0.1'
finally:
s.close()
return IP
def get_version(self):
version_data = {}
try:
with open(os.path.join(self.config_dir, 'version.json'), 'r') as f:
version_data = json.load(f)
except Exception as e:
console.critical("Unable to get version data!")
return version_data
def do_exit(self):
exit_file = os.path.join(self.root_dir, 'exit.txt')
try:
open(exit_file, 'a').close()
except Exception as e:
logger.critical("Unable to create exit file!")
console.critical("Unable to create exit file!")
sys.exit(1)
@staticmethod
def check_writeable(path: str):
filename = os.path.join(path, "tempfile.txt")
try:
fp = open(filename, "w").close()
os.remove(filename)
logger.info("{} is writable".format(filename))
return True
except Exception as e:
logger.critical("Unable to write to {} - Error: {}".format(path, e))
return False
def ensure_logging_setup(self):
log_file = os.path.join(os.path.curdir, 'app', 'logs', 'commander.log')
logger.info("Checking app directory writable")
writeable = self.check_writeable(os.path.join(os.path.curdir, 'app'))
# if not writeable, let's bomb out
if not writeable:
logger.critical("Unable to write to app directory!")
sys.exit(1)
# ensure the log directory is there
try:
os.makedirs(os.path.join(os.path.curdir, 'app', 'logs'))
except Exception as e:
pass
# ensure the log file is there
try:
open(log_file, 'a').close()
except Exception as e:
console.critical("Unable to open log file!")
sys.exit(1)
# del any old session.log file as this is a new session
try:
os.remove(os.path.join(os.path.curdir, "app", "logs", "session.log"))
except:
pass
@staticmethod
def check_file_exists(path: str):
logger.debug('Looking for path: {}'.format(path))
if os.path.exists(path) and os.path.isfile(path):
logger.debug('Found path: {}'.format(path))
return True
else:
return False
@staticmethod
def human_readable_file_size(num: int, suffix='B'):
for unit in ['', 'K', 'M', 'G', 'T', 'P', 'E', 'Z']:
if abs(num) < 1024.0:
return "%3.1f%s%s" % (num, unit, suffix)
num /= 1024.0
return "%.1f%s%s" % (num, 'Y', suffix)
@staticmethod
def check_path_exits(path: str):
logger.debug('Looking for path: {}'.format(path))
if os.path.exists(path):
logger.debug('Found path: {}'.format(path))
return True
else:
return False
@staticmethod
def get_file_contents(path: str, lines=100):
contents = ''
if os.path.exists(path) and os.path.isfile(path):
try:
with open(path, 'r') as f:
for line in (f.readlines() [-lines:]):
contents = contents + line
return contents
except Exception as e:
logger.error("Unable to read file: {}. \n Error: ".format(path, e))
return False
else:
logger.error("Unable to read file: {}. File not found, or isn't a file.".format(path))
return False
def create_session_file(self, ignore=False):
if ignore and os.path.exists(self.session_file):
os.remove(self.session_file)
if os.path.exists(self.session_file):
file_data = self.get_file_contents(self.session_file)
try:
data = json.loads(file_data)
pid = data.get('pid')
started = data.get('started')
console.critical("Another commander agent seems to be running...\npid: {} \nstarted on: {}".format(pid, started))
except Exception as e:
pass
sys.exit(1)
pid = os.getpid()
now = datetime.now()
session_data = {
'pid': pid,
'started': now.strftime("%d-%m-%Y, %H:%M:%S")
}
with open(self.session_file, 'w') as f:
json.dump(session_data, f, indent=True)
# because this is a recursive function, we will return bytes, and set human readable later
def get_dir_size(self, path: str):
total = 0
for entry in os.scandir(path):
if entry.is_dir(follow_symlinks=False):
total += self.get_dir_size(entry.path)
else:
total += entry.stat(follow_symlinks=False).st_size
return total
@staticmethod
def base64_encode_string(string: str):
s_bytes = str(string).encode('utf-8')
b64_bytes = base64.encodebytes(s_bytes)
return b64_bytes.decode('utf-8')
@staticmethod
def base64_decode_string(string: str):
s_bytes = str(string).encode('utf-8')
b64_bytes = base64.decodebytes(s_bytes)
return b64_bytes.decode("utf-8")
def create_uuid(self):
id = str(uuid.uuid4())
return self.base64_encode_string(id).replace("\n", '')
def ensure_dir_exists(self, path):
"""
ensures a directory exists
Checks for the existence of a directory, if the directory isn't there, this function creates the directory
Args:
path (string): the path you are checking for
"""
try:
os.makedirs(path)
logger.debug("Created Directory : {}".format(path))
# directory already exists - non-blocking error
except FileExistsError:
pass
def create_self_signed_cert(self, cert_dir=None):
if cert_dir is None:
cert_dir = os.path.join(self.config_dir, 'web', 'certs')
# create a directory if needed
self.ensure_dir_exists(cert_dir)
cert_file = os.path.join(cert_dir, 'commander.cert.pem')
key_file = os.path.join(cert_dir, 'commander.key.pem')
logger.info("SSL Cert File is set to: {}".format(cert_file))
logger.info("SSL Key File is set to: {}".format(key_file))
# don't create new files if we already have them.
if self.check_file_exists(cert_file) and self.check_file_exists(key_file):
logger.info('Cert and Key files already exists, not creating them.')
return True
console.info("Generating a self signed SSL")
logger.info("Generating a self signed SSL")
# create a key pair
logger.info("Generating a key pair. This might take a moment.")
console.info("Generating a key pair. This might take a moment.")
k = crypto.PKey()
k.generate_key(crypto.TYPE_RSA, 4096)
# create a self-signed cert
cert = crypto.X509()
cert.get_subject().C = "US"
cert.get_subject().ST = "Georgia"
cert.get_subject().L = "Atlanta"
cert.get_subject().O = "Crafty Controller"
cert.get_subject().OU = "Server Ops"
cert.get_subject().CN = gethostname()
cert.set_serial_number(1000)
cert.gmtime_adj_notBefore(0)
cert.gmtime_adj_notAfter(10 * 365 * 24 * 60 * 60)
cert.set_issuer(cert.get_subject())
cert.set_pubkey(k)
cert.sign(k, 'sha256')
f = open(cert_file, "w")
f.write(crypto.dump_certificate(crypto.FILETYPE_PEM, cert).decode())
f.close()
f = open(key_file, "w")
f.write(crypto.dump_privatekey(crypto.FILETYPE_PEM, k).decode())
f.close()
@staticmethod
def random_string_generator(size=6, chars=string.ascii_uppercase + string.digits):
"""
Example Usage
random_generator() = G8sjO2
random_generator(3, abcdef) = adf
"""
return ''.join(random.choice(chars) for x in range(size))
helper = Helpers()

View File

@ -0,0 +1,63 @@
import os
import sys
import json
import time
import logging
import threading
from app.classes.shared.helpers import helper
from app.classes.shared.console import console
from app.classes.web.tornado import webserver
logger = logging.getLogger(__name__)
class TasksManager:
def __init__(self):
self.tornado = webserver()
self.webserver_thread = threading.Thread(target=self.tornado.run_tornado, daemon=True, name='tornado_thread')
self.main_kill_switch_thread = threading.Thread(target=self.main_kill_switch, daemon=True, name="main_loop")
self.main_thread_exiting = False
def get_main_thread_run_status(self):
return self.main_thread_exiting
def start_main_kill_switch_watcher(self):
self.main_kill_switch_thread.start()
def main_kill_switch(self):
while True:
if os.path.exists(os.path.join(helper.root_dir, 'exit.txt')):
logger.info("Found Exit File, stopping everything")
self._main_graceful_exit()
time.sleep(5)
def _main_graceful_exit(self):
# commander.stop_all_servers()
logger.info("***** Crafty Shutting Down *****\n\n")
console.info("***** Crafty Shutting Down *****\n\n")
os.remove(helper.session_file)
os.remove(os.path.join(helper.root_dir, 'exit.txt'))
# ServerProps.cleanup()
self.main_thread_exiting = True
def start_webserver(self):
self.webserver_thread.start()
def reload_webserver(self):
self.tornado.stop_web_server()
console.info("Waiting 3 seconds")
time.sleep(3)
self.webserver_thread = threading.Thread(target=self.tornado.run_tornado, daemon=True, name='tornado_thread')
self.start_webserver()
def stop_webserver(self):
self.tornado.stop_web_server()
tasks_manager = TasksManager()

View File

@ -0,0 +1,16 @@
import logging
import tornado.web
logger = logging.getLogger(__name__)
class BaseHandler(tornado.web.RequestHandler):
def get_remote_ip(self):
remote_ip = self.request.headers.get("X-Real-IP") or \
self.request.headers.get("X-Forwarded-For") or \
self.request.remote_ip
return remote_ip
def get_current_user(self):
return self.get_secure_cookie("user", max_age_days=1)

View File

@ -0,0 +1,59 @@
import sys
import logging
import tornado.web
import tornado.escape
from app.classes.shared.helpers import helper
from app.classes.web.base_handler import BaseHandler
from app.classes.shared.console import console
logger = logging.getLogger(__name__)
try:
import bleach
except ModuleNotFoundError as e:
logger.critical("Import Error: Unable to load {} module".format(e, e.name))
console.critical("Import Error: Unable to load {} module".format(e, e.name))
sys.exit(1)
class PublicHandler(BaseHandler):
def set_current_user(self, user):
expire_days = helper.get_setting("WEB", 'cookie_expire')
# if helper comes back with false
if not expire_days:
expire_days = "5"
if user:
self.set_secure_cookie("user", tornado.escape.json_encode(user), expires_days=expire_days)
else:
self.clear_cookie("user")
def get(self, page=None):
self.clear_cookie("user")
self.clear_cookie("user_data")
error = bleach.clean(self.get_argument('error', ""))
template = "public/404.html"
if error:
error_msg = "Invalid Login!"
else:
error_msg = ""
if page == "login":
template = "public/login.html"
context = {'error': error_msg}
# our default 404 template
else:
context = {'error': error_msg}
self.render(template, data=context)

150
app/classes/web/tornado.py Normal file
View File

@ -0,0 +1,150 @@
import os
import sys
import json
import asyncio
import logging
import threading
from app.classes.shared.console import console
from app.classes.shared.helpers import helper
logger = logging.getLogger(__name__)
try:
import tornado.web
import tornado.ioloop
import tornado.log
import tornado.template
import tornado.escape
import tornado.locale
import tornado.httpserver
from app.classes.web.public_handler import PublicHandler
except ModuleNotFoundError as e:
logger.critical("Import Error: Unable to load {} module".format(e, e.name))
console.critical("Import Error: Unable to load {} module".format(e, e.name))
sys.exit(1)
class webserver:
def __init__(self):
self.ioloop = None
self.HTTP_Server = None
self.HTTPS_Server = None
self._asyncio_patch()
@staticmethod
def log_function(handler):
info = {
'Status_Code': handler.get_status(),
'Method': handler.request.method,
'URL': handler.request.uri,
'Remote_IP': handler.request.remote_ip,
'Elapsed_Time': '%.2fms' % (handler.request.request_time() * 1000)
}
tornado.log.access_log.info(json.dumps(info, indent=4))
@staticmethod
def _asyncio_patch():
"""
As of Python 3.8 (on Windows), the asyncio default event handler has changed to "proactor",
where tornado expects the "selector" handler.
This function checks if the platform is windows and changes the event handler to suit.
(Taken from https://github.com/mkdocs/mkdocs/commit/cf2b136d4257787c0de51eba2d9e30ded5245b31)
"""
logger.debug("Checking if asyncio patch is required")
if sys.platform.startswith("win") and sys.version_info >= (3, 8):
import asyncio
try:
from asyncio import WindowsSelectorEventLoopPolicy
except ImportError:
logger.debug("asyncio patch isn't required")
pass # Can't assign a policy which doesn't exist.
else:
if not isinstance(asyncio.get_event_loop_policy(), WindowsSelectorEventLoopPolicy):
asyncio.set_event_loop_policy(WindowsSelectorEventLoopPolicy())
logger.debug("Applied asyncio patch")
def run_tornado(self):
# let's verify we have an SSL cert
helper.create_self_signed_cert()
http_port = helper.get_setting("WEB", 'http_port')
https_port = helper.get_setting("WEB", 'https_port')
lang = helper.get_setting("WEB", 'language')
debug_errors = helper.get_setting("WEB", 'show_errors')
cookie_secret = helper.get_setting("WEB", 'cookie_secret')
if cookie_secret.lower == "random" or cookie_secret is False:
cookie_secret = helper.random_string_generator(32)
if not lang:
lang = "en_EN"
if not http_port:
port = 8000
if not https_port:
port = 8443
cert_objects = {
'certfile': os.path.join(helper.config_dir, 'web', 'certs', 'commander.cert.pem'),
'keyfile': os.path.join(helper.config_dir, 'web', 'certs', 'commander.key.pem'),
}
logger.info("Starting Web Server on ports http:{} https:{}".format(http_port, https_port))
console.info("http://{}:{} is up and ready for connection:".format(helper.get_local_ip(), http_port))
console.info("https://{}:{} is up and ready for connection:".format(helper.get_local_ip(), https_port))
asyncio.set_event_loop(asyncio.new_event_loop())
tornado.template.Loader('.')
tornado.locale.set_default_locale(lang)
handlers = [
(r'/', PublicHandler),
]
app = tornado.web.Application(
handlers,
template_path=os.path.join(helper.webroot, 'templates'),
static_path=os.path.join(helper.webroot, 'static'),
debug=debug_errors,
cookie_secret=cookie_secret,
xsrf_cookies=True,
autoreload=False,
log_function=self.log_function,
login_url="/login",
default_handler_class=PublicHandler
)
self.HTTP_Server = tornado.httpserver.HTTPServer(app)
self.HTTP_Server.listen(http_port)
self.HTTPS_Server = tornado.httpserver.HTTPServer(app, ssl_options=cert_objects)
self.HTTPS_Server.listen(https_port)
console.info("Server Init Complete: Listening For Connections:")
self.ioloop = tornado.ioloop.IOLoop.instance()
self.ioloop.start()
def stop_web_server(self):
logger.info("Shutting Down Web Server")
console.info("Shutting Down Web Server")
self.ioloop.stop()
self.HTTP_Server.stop()
self.HTTPS_Server.stop()
logger.info("Web Server Stopped")
console.info("Web Server Stopped")

9
app/config/config.ini Normal file
View File

@ -0,0 +1,9 @@
[WEB]
https = true
force_https = false
http_port = 8000
https_port = 8443
language = en_EN
cookie_expire = 30
cookie_secret = random
show_errors = true

41
app/config/logging.json Normal file
View File

@ -0,0 +1,41 @@
{
"version": 1,
"disable_existing_loggers": false,
"formatters": {
"commander": {
"format": "%(asctime)s - [Commander] - %(levelname)-8s - %(name)s - %(message)s"
}
},
"handlers": {
"console": {
"class": "logging.StreamHandler",
"formatter": "commander",
"stream": "ext://sys.stdout"
},
"main_file_handler": {
"class": "logging.handlers.RotatingFileHandler",
"formatter": "commander",
"filename": "app/logs/commander.log",
"maxBytes": 5242880,
"backupCount": 20,
"encoding": "utf8"
},
"session_file_handler": {
"class": "logging.handlers.RotatingFileHandler",
"formatter": "commander",
"filename": "app/logs/session.log",
"backupCount": 0,
"encoding": "utf8"
}
},
"loggers": {
"": {
"level": "INFO",
"handlers": ["main_file_handler", "session_file_handler"],
"propagate": false
}
}
}

5
app/config/version.json Normal file
View File

@ -0,0 +1,5 @@
{
"major": 0.1,
"minor": 1,
"sub": "Alpha"
}

113
app/frontend/base.html Normal file
View File

@ -0,0 +1,113 @@
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>{% block title %}{{ _('Default') }}{% end %}</title>
<!-- plugins:css -->
<link rel="stylesheet" href="/static/assets/vendors/mdi/css/materialdesignicons.min.css">
<link rel="stylesheet" href="/static/assets/vendors/flag-icon-css/css/flag-icon.min.css">
<link rel="stylesheet" href="/static/assets/vendors/ti-icons/css/themify-icons.css">
<link rel="stylesheet" href="/static/assets/vendors/typicons/typicons.css">
<link rel="stylesheet" href="/static/assets/vendors/css/vendor.bundle.base.css">
<!-- endinject -->
<!-- Plugin css for this page -->
<link rel="stylesheet" href="/static/assets/vendors/jvectormap/jquery-jvectormap.css">
<!-- End Plugin css for this page -->
<!-- Layout styles -->
<link rel="stylesheet" href="/static/assets/css/dark/style.css">
<!-- End Layout styles -->
<link rel="shortcut icon" href="/static/assets/images/favicon.png" />
</head>
<body class="dark-theme">
<div class="container-scroller">
<!-- partial:partials/_navbar.html -->
<nav class="navbar default-layout col-lg-12 col-12 p-0 fixed-top d-flex flex-row">
<div class="text-center navbar-brand-wrapper d-flex align-items-top justify-content-center">
<a class="navbar-brand brand-logo" href="/pro/dashboard">
<img src="/static/assets/images/logo_long.jpg" alt="logo" /> </a>
<a class="navbar-brand brand-logo-mini" href="/pro/dashboard">
<img src="/static/assets/images/logo_square.jpg" alt="logo" /> </a>
</div>
<div class="navbar-menu-wrapper d-flex align-items-center">
<button class="navbar-toggler navbar-toggler align-self-center" type="button" data-toggle="minimize">
<span class="mdi mdi-menu"></span>
</button>
<ul class="navbar-nav">
<li class="nav-item dropdown language-dropdown">
<a class="nav-link dropdown-toggle px-2 d-flex align-items-center" id="LanguageDropdown" href="#" data-toggle="dropdown" aria-expanded="false">
<div class="d-inline-flex mr-0 mr-md-3">
<div class="flag-icon-holder">
<i class="flag-icon flag-icon-us"></i>
</div>
</div>
<span class="profile-text font-weight-medium d-none d-md-block">English</span>
</a>
<div class="dropdown-menu dropdown-menu-left navbar-dropdown py-2" aria-labelledby="LanguageDropdown">
<a class="dropdown-item">
<div class="flag-icon-holder">
<i class="flag-icon flag-icon-us"></i>
</div>English
</a>
<a class="dropdown-item">
<div class="flag-icon-holder">
<i class="flag-icon flag-icon-fr"></i>
</div>French
</a>
</div>
</li>
</ul>
{% include notify.html %}
<button class="navbar-toggler navbar-toggler-right d-lg-none align-self-center" type="button" data-toggle="offcanvas">
<span class="mdi mdi-menu"></span>
</button>
</div>
</nav>
{% include main_menu.html %}
<div class="main-panel">
{% block content %}
{% end %}
{% include footer.html %}
</div>
<!-- main-panel ends -->
</div>
<!-- page-body-wrapper ends -->
</div>
<!-- container-scroller -->
<!-- plugins:js -->
<script src="/static/assets/vendors/js/vendor.bundle.base.js"></script>
<!-- endinject -->
<!-- Plugin js for this page -->
<!-- <script src="/static/assets/vendors/chart.js/Chart.min.js"></script>-->
<!-- <script src="/static/assets/vendors/jvectormap/jquery-jvectormap.min.js"></script>-->
<!-- <script src="/static/assets/vendors/jvectormap/jquery-jvectormap-world-mill-en.js"></script>-->
<!-- <script src="/static/assets/vendors/justgage/raphael-2.1.4.min.js"></script>-->
<!-- End plugin js for this page -->
<!-- inject:js -->
<script src="/static/assets/js/shared/hoverable-collapse.js"></script>
<script src="/static/assets/js/shared/misc.js"></script>
<script src="/static/assets/js/shared/settings.js"></script>
<!-- <script src="/static/assets/js/shared/todolist.js"></script>-->
<script src="https://kit.fontawesome.com/b539899a58.js" crossorigin="anonymous"></script>
<!-- endinject -->
<!-- Custom js for this page -->
<!-- <script src="/static/assets/js/demo_1/dashboard.js"></script>-->
<!-- End custom js for this page -->
</body>
</html>

8
app/frontend/footer.html Normal file
View File

@ -0,0 +1,8 @@
<!-- partial:partials/_footer.html -->
<footer class="footer">
<div class="container-fluid clearfix">
<span class="text-muted d-block text-center text-sm-left d-sm-inline-block">Copyright © 2020 <a href="http://www.rentmydatacenter.com/" target="_blank">RMDC</a>. All rights reserved.</span>
</span>
</div>
</footer>
<!-- partial -->

102
app/frontend/main_menu.html Normal file
View File

@ -0,0 +1,102 @@
<!-- partial -->
<div class="container-fluid page-body-wrapper">
<!-- partial:partials/_sidebar.html -->
<nav class="sidebar sidebar-offcanvas" id="sidebar">
<ul class="nav">
<li class="nav-item nav-category" style="margin-top:10px;">Main Menu</li>
<li class="nav-item">
<a class="nav-link" data-toggle="collapse" href="#dashboard-dropdown" aria-expanded="false" aria-controls="dashboard-dropdown">
<i class="menu-icon fas fa-chart-network"></i>
<span class="menu-title">Nodes</span>
<i class="menu-arrow"></i>
</a>
<div class="collapse" id="dashboard-dropdown">
<ul class="nav flex-column sub-menu">
<li class="nav-item">
<a class="nav-link" href="/pro/node_names">Nodes Claims</a>
</li>
<li class="nav-item">
<a class="nav-link" href="index.html">Buntu-Server</a>
</li>
<li class="nav-item">
<a class="nav-link" href="pages/dashboards/dashboard-2.html">RMDC-Stone</a>
</li>
</ul>
</div>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="collapse" href="#page-layouts" aria-expanded="false" aria-controls="page-layouts">
<i class="menu-icon typcn typcn-archive"></i>
<span class="menu-title">Servers</span>
<i class="menu-arrow"></i>
</a>
<div class="collapse" id="page-layouts">
<ul class="nav flex-column sub-menu">
<li class="nav-item">
<a class="nav-link" href="pages/layout/boxed-layout.html">Bungee Proxy</a>
</li>
<li class="nav-item">
<a class="nav-link" href="pages/layout/rtl-layout.html">Lobby</a>
</li>
<li class="nav-item">
<a class="nav-link" href="pages/layout/rtl-layout.html">Bedwarz</a>
</li>
<li class="nav-item">
<a class="nav-link" href="pages/layout/rtl-layout.html">Creative</a>
</li>
<li class="nav-item">
<a class="nav-link" href="pages/layout/rtl-layout.html">Survival</a>
</li>
</ul>
</div>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="collapse" href="#apps-dropdown" aria-expanded="false" aria-controls="apps-dropdown">
<i class="menu-icon typcn typcn-arrow-maximise"></i>
<span class="menu-title">Configuration</span>
<i class="menu-arrow"></i>
</a>
<div class="collapse" id="apps-dropdown">
<ul class="nav flex-column sub-menu">
<li class="nav-item">
<a class="nav-link" href="pages/apps/kanban-board.html">History Limit</a>
</li>
<li class="nav-item">
<a class="nav-link" href="pages/apps/email.html">Claims</a>
</li>
<li class="nav-item">
<a class="nav-link" href="pages/apps/calendar.html">Calendar</a>
</li>
<li class="nav-item">
<a class="nav-link" href="pages/apps/todo.html">Todo List</a>
</li>
<li class="nav-item">
<a class="nav-link" href="pages/apps/gallery.html">API Keys</a>
</li>
</ul>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="pages/samples/widgets.html">
<i class="menu-icon typcn typcn-document-text"></i>
<span class="menu-title">Documentation</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="pages/samples/widgets.html">
<i class="menu-icon fab fa-discord"></i>
<span class="menu-title">Commander Discord</span>
</a>
</li>
</ul>
</nav>
<!-- partial -->

56
app/frontend/notify.html Normal file
View File

@ -0,0 +1,56 @@
<ul class="navbar-nav ml-auto">
<li class="nav-item dropdown">
<a class="nav-link count-indicator" id="notificationDropdown" href="#" data-toggle="dropdown">
<i class="mdi mdi-email-outline"></i>
<span class="count bg-success">3</span>
</a>
<div class="dropdown-menu dropdown-menu-right navbar-dropdown preview-list pb-0" aria-labelledby="notificationDropdown">
<a class="dropdown-item py-3 border-bottom">
<p class="mb-0 font-weight-medium float-left">You have 4 new notifications </p>
<span class="badge badge-pill badge-primary float-right">View all</span>
</a>
<a class="dropdown-item preview-item py-3">
<div class="preview-thumbnail">
<i class="mdi mdi-alert m-auto text-primary"></i>
</div>
<div class="preview-item-content">
<h6 class="preview-subject font-weight-normal mb-1">Application Error</h6>
<p class="font-weight-light small-text mb-0"> Just now </p>
</div>
</a>
<a class="dropdown-item preview-item py-3">
<div class="preview-thumbnail">
<i class="mdi mdi-settings m-auto text-primary"></i>
</div>
<div class="preview-item-content">
<h6 class="preview-subject font-weight-normal mb-1">Settings</h6>
<p class="font-weight-light small-text mb-0"> Private message </p>
</div>
</a>
<a class="dropdown-item preview-item py-3">
<div class="preview-thumbnail">
<i class="mdi mdi-airballoon m-auto text-primary"></i>
</div>
<div class="preview-item-content">
<h6 class="preview-subject font-weight-normal mb-1">New user registration</h6>
<p class="font-weight-light small-text mb-0"> 2 days ago </p>
</div>
</a>
</div>
</li>
<li class="nav-item dropdown d-none d-xl-inline-block user-dropdown">
<a class="nav-link dropdown-toggle" id="UserDropdown" href="#" data-toggle="dropdown" aria-expanded="false">
<img class="img-xs rounded-circle" src="/static/assets/images/faces-clipart/pic-1.png" alt="Profile image"> </a>
<div class="dropdown-menu dropdown-menu-right navbar-dropdown" aria-labelledby="UserDropdown">
<div class="dropdown-header text-center">
<img class="img-md rounded-circle" src="/static/assets/images/faces-clipart/pic-1.png" alt="Profile image">
<p class="mb-1 mt-3 font-weight-semibold">{{ data['user_data']['user_email'] }}</p>
<p class="font-weight-light text-muted mb-0">Plan: {{ str(data['user_data']['account_type']).upper() }}</p>
</div>
<a class="dropdown-item"><i class="dropdown-item-icon mdi mdi-account-outline text-primary"></i> My Profile <span class="badge badge-pill badge-danger">1</span></a>
<a class="dropdown-item"><i class="dropdown-item-icon mdi mdi-calendar-check-outline text-primary"></i> Activity</a>
<a class="dropdown-item"><i class="dropdown-item-icon mdi mdi-help-circle-outline text-primary"></i> FAQ</a>
<a class="dropdown-item" href="/public/login"><i class="dropdown-item-icon mdi mdi-power text-primary"></i>Sign Out</a>
</div>
</li>
</ul>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,15 @@
.st-wizard-wrapper .st-wizard-steps .wizard-step {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
color: theme-color(primary);
padding-top: 10px;
margin-top: 25px; }
.st-wizard-wrapper .st-wizard-steps .wizard-step .step-number {
font-size: 40px;
font-weight: 600;
margin-bottom: 0; }
.st-wizard-wrapper .st-wizard-steps .wizard-step .step-details {
margin-bottom: 0; }
/*# sourceMappingURL=st_wizard.css.map */

View File

@ -0,0 +1 @@
{"version":3,"sources":["shared/screens/st_wizard.scss"],"names":[],"mappings":"AAAA;EAGY,qBAAa;EAAb,qBAAa;EAAb,cAAa;EACb,4BAA2B;EAC3B,kBAAiB;EACjB,iBAAgB,EAWnB;EAjBT;IASgB,gBAAe;IACf,iBAAgB;IAChB,iBAAgB,EACnB;EAZb;IAegB,iBAAgB,EACnB","file":"st_wizard.css","sourcesContent":[".st-wizard-wrapper {\n .st-wizard-steps {\n .wizard-step {\n display: flex;\n color: theme-color(primary);\n padding-top: 10px;\n margin-top: 25px;\n\n .step-number {\n font-size: 40px;\n font-weight: 600;\n margin-bottom: 0;\n }\n\n .step-details {\n margin-bottom: 0;\n }\n }\n }\n}"]}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 475 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 933 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 966 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 581 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 862 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 982 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 858 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 659 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 477 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 515 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 744 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 385 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 473 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 414 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 369 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 516 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 549 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 596 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 708 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 355 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

View File

@ -0,0 +1,13 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="35" height="35" viewBox="0 0 35 35">
<defs>
<circle id="a" cx="17.5" cy="17.5" r="17.5"/>
</defs>
<g fill="none" fill-rule="evenodd">
<mask id="b" fill="#fff">
<use xlink:href="#a"/>
</mask>
<use fill="#0DC26D" xlink:href="#a"/>
<path fill="#FFF" d="M17.5 0H35v17.5H17.5z" mask="url(#b)"/>
<path fill="#EFF3F6" d="M17.5 17.5H35V35H17.5z" mask="url(#b)" opacity=".5"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 546 B

Some files were not shown because too many files have changed in this diff Show More