INNER CODE UNIT · Python
_sub
ASCIT31/Dark-Moon · mcp/src/server.py:281
def _sub(m: "re.Match") -> str:
ph = m.group("ph")
real = vault.rehydrate(ph, allow_secret=True)
return real if real is not None else ph
return PLACEHOLDER_ANY_RE.sub(_sub, text)
except Exception: # noqa: BLE001 — never fail finalize over rehydration
return text
@mcp.tool()
def health_check() -> Dict[str, Any]:
"""
Perform a comprehensive health check of the Darkmoon toolbox.
Checks:
- Container running status
- Essential tools availability (naabu, nuclei, httpx, subfinder)