{{ message }}
8 | {% else %} 9 |This page has not been found
10 | {% endif %} 11 | {% endblock %} 12 | 13 | {% block footer %} 14 | {% endblock %} 15 | -------------------------------------------------------------------------------- /controlserver/templates/dashboard/panel-components.html: -------------------------------------------------------------------------------- 1 | {% raw %} 2 |10 | Redis connections: 11 |
12 |13 | {{ count }}× {{ name || '(unnamed)' }} 14 |
15 |Worker | 12 |Status | 13 |#Processes | 14 |Tasks (active / total) |
15 | Load Avg. | 16 |
---|---|---|---|---|
{{ worker.hostname }} | 21 |22 | online 23 | offline 24 | | 25 |{{ concurrency[worker.hostname] || '?' }} | 26 |{{ worker.active }} / {{ worker['task-started'] }} | 27 |{{ worker.loadavg[0].toFixed(1) }}, {{ worker.loadavg[1].toFixed(1) }}, {{ worker.loadavg[2].toFixed(1) }} | 28 |
{{ online }} / {{ workers.length }} workers online. | 33 |
6 | ⇚ Previous 7 | Next ⇛ 8 |
9 | 10 |{{ log_message.title or '-'|safe }}
{{ log_message.text }}38 | {% else %} 39 |
(no text)
40 | {% endif %} 41 | {% endblock %} 42 | -------------------------------------------------------------------------------- /controlserver/utils/import_factory.py: -------------------------------------------------------------------------------- 1 | import importlib 2 | import inspect 3 | import sys 4 | from abc import ABC 5 | from functools import lru_cache 6 | from pathlib import Path 7 | from typing import Type, ParamSpec, TypeVar, Generic 8 | 9 | P = ParamSpec('P') 10 | T = TypeVar('T') 11 | 12 | 13 | class ImportFactory(ABC, Generic[T]): 14 | base_class: Type[T] 15 | 16 | @classmethod 17 | @lru_cache() 18 | def get_class(cls, requested_class: str) -> Type[T]: 19 | cls.fix_import_path() 20 | 21 | module_name, class_name = requested_class.split(':', 1) 22 | package = cls.__module__[:cls.__module__.rindex('.')] 23 | 24 | module = importlib.import_module(package + '.' + module_name, package=package) 25 | clstype = getattr(module, class_name) 26 | if not inspect.isclass(clstype) or not issubclass(clstype, cls.base_class): 27 | raise Exception(f'Class {class_name} in {package} is missing or not a {cls.base_class.__name__}') 28 | return clstype 29 | 30 | @classmethod 31 | @lru_cache() 32 | def fix_import_path(cls) -> None: 33 | path = str(Path(__file__).absolute().parent.parent.parent) 34 | if path not in sys.path: 35 | sys.path = [path] + sys.path 36 | -------------------------------------------------------------------------------- /controlserver/wsgi.py: -------------------------------------------------------------------------------- 1 | from controlserver.app import create_app 2 | 3 | app = create_app() 4 | -------------------------------------------------------------------------------- /flag-submission-server/.dockerignore: -------------------------------------------------------------------------------- 1 | cmake-build-* 2 | build 3 | .idea 4 | -------------------------------------------------------------------------------- /flag-submission-server/.gitignore: -------------------------------------------------------------------------------- 1 | /cmake-build-debug 2 | bucket.txt 3 | /build 4 | /build-sanitizer/ 5 | /cmake-build-release/ 6 | -------------------------------------------------------------------------------- /flag-submission-server/.idea/.gitignore: -------------------------------------------------------------------------------- 1 | /workspace.xml 2 | /misc.xml 3 | /dbnavigator.xml 4 | -------------------------------------------------------------------------------- /flag-submission-server/.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 |= 0">Tick {{backend.currentState.current_tick}}
3 |4 | 5 | 0 && (backend.currentState.state == GameStates.RUNNING || backend.currentState.current_tick < 0)"> 6 | {{formatRemainingTime(currentTime)}} 7 | 8 | game suspended 9 | 0" class="label label-success">game is over 10 | not started 11 |
12 |{{i + 1}}. | 27 |
28 | |
30 | {{teaminfo[0].name}} | 31 |{{teaminfo[1].toFixed(1)}} points | 32 |
0" class="lead"> 2 | 3 |
4 | 5 |{{service.name}}
4 |
5 | {{service.attackers + (service.attackers != 1 ? ' attackers' : ' attacker')}}
6 | {{service.victims + (service.victims != 1 ? ' victims' : ' victim')}}
7 |
{{service.first_blood.join(', ')}}
9 | 0 && service.flag_stores_exploited < service.flag_stores"
10 | [title]="'This services stores flags in '+service.flag_stores+' different locations or flags of '+service.flag_stores+' different types. Only '+service.flag_stores_exploited+' flag stores / types have been exploited so far.'">
11 |
12 | {{ service.flag_stores - service.flag_stores_exploited }}
13 | flag store