import fcntl, importlib.util, json, os, re, shlex, threading, time, urllib.parse, uuid from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer from pathlib import Path import serial os.umask(0o077) home=Path.home();d=home/'tmp/k230-coherent-combined-board-2026-10-10';wt=home/'tmp/k230-coherent-closeout-2026-10-10' e=wt/'docs/evidence/coherent-shell/combined-board-candidate-2026-10-10' spec=importlib.util.spec_from_file_location('rd',wt/'tools/mainline-drm-initrd-shell-trial.py');rd=importlib.util.module_from_spec(spec);spec.loader.exec_module(rd) state=json.loads((d/'state.json').read_text());token=uuid.uuid4().hex class H(BaseHTTPRequestHandler): def do_POST(self): name=self.path.removeprefix('/'+token+'/') if self.path!='/'+token+'/'+name or name not in ['ordinary-help.png','ordinary-runtime.json']: self.send_error(404);return size=int(self.headers.get('Content-Length','0')) if not 0