Spaces:
Sleeping
Sleeping
File size: 1,459 Bytes
80a4a65 04fc815 80a4a65 4871da9 cb16781 80a4a65 4871da9 cb16781 80a4a65 4871da9 cb16781 80a4a65 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | """Per-challenge-type pool generators.
Each module here owns ONE challenge table and exposes the same public API
that :func:`app.main.populate_pool_background` consumes:
POOL_TARGET / POOL_THRESHOLD / POOL_BATCH (module-level constants)
async get_pool_count(team_role) -> int
async refill_pool(team_role, count) -> int
async start_pool_watcher(team_role) # long-running coroutine
The four generators currently registered are: crypto, code-fixing,
log-analysis, and vulnerability-hunter.
"""
from . import crypto
from . import code_fixing
from . import log_analysis
from . import vulnerability_hunter
from . import steganography
from . import web_exploitation
# The orchestrator in app.main iterates this registry. A new challenge
# type is added by appending a tuple below (and a matching table in
# app.services.supabase_service.scenario_table).
REGISTRY = [
# (slug, module, list_of_teams)
("crypto", crypto, ["red"]),
("code-fixing", code_fixing, ["blue"]),
("log-analysis", log_analysis, ["blue"]),
("vulnerability-hunter", vulnerability_hunter, ["blue"]),
("steganography", steganography, ["red"]),
("web-exploitation", web_exploitation, ["red"]),
]
__all__ = [
"crypto",
"code_fixing",
"log_analysis",
"vulnerability_hunter",
"steganography",
"web_exploitation",
"REGISTRY",
]
|