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).
13 lines
483 B
Python
Executable File
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)
|