Files
felhom.eu/documentation/audits/rehearsal-2026-10-20/tools/envrun.py
T
admin f84f94d987 Rehearsal 2026-10-20 (Tester4) + data-loss hunt: baselines, B1 install evidence, A6 drawn order, tools, first two reviewers' candidates
No release, deploy or publish. Off-site is OFF for Tester4 and the owner passphrase is needed from the operator (bind blocked after 2 of 5 tries).
2026-10-20 11:57:55 +02:00

13 lines
483 B
Python
Executable File

#!/usr/bin/python3
"""envrun.py — read NAME=base64value lines from stdin until an empty line, put them in the environment, exec argv.
Lets DooPlex hand a secret to a command in the browser LXC without it ever touching a command line."""
import base64, os, sys
env = dict(os.environ)
for line in sys.stdin:
line = line.rstrip("\n")
if not line:
break
k, v = line.split("=", 1)
env[k] = base64.b64decode(v).decode()
os.execvpe(sys.argv[1], sys.argv[1:], env)