CyberArena / app /sandbox /__init__.py
Hussien Haider
H
80a4a65
Raw
History Blame Contribute Delete
635 Bytes
"""Sandbox: in-process terminal that the OS-simulator frontend talks to.
A per-challenge temp workdir holds the files declared in the row's
``files`` JSONB column. Built-in Unix tools (cat, ls, sha256sum, base64,
…) are reimplemented in Python so they work on Windows. External tools
(``python``, ``openssl`` …) are executed via subprocess ONLY if the
challenge row whitelists them.
"""
from .workdir import get_or_create_workdir, safe_join
from .tools import shell_builtins
from .terminal import run_terminal_command
__all__ = [
"get_or_create_workdir",
"safe_join",
"shell_builtins",
"run_terminal_command",
]