File size: 635 Bytes
80a4a65
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
"""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",
]