Expand description
Embed the worker .java in the binary and extract it to a per-user script dir at boot, keyed
by content hash so the extracted copy always matches the compiled binary (spec §12). Only the
thin-slice extraction primitive; the §6 extraction-integrity hardening (0700/0600, ownership,
symlink guards) is layered in a later milestone.
Constants§
- WORKER_
JAVA - The worker GhidraScript, embedded at compile time (version-locked to this binary).
- WORKER_
SCRIPT_ NAME - The worker script’s filename. Ghidra requires a GhidraScript’s filename to
match its public class name, so this is not a free choice — and it is a
const rather than three string literals because
config.rshands it to the launcher whileextract_workerwrites the file. Those two disagreeing produces a worker that is on disk under one name and looked for under another, which surfaces as an unexplained boot timeout.
Functions§
- extract_
worker - Extract the worker script into
script_dir, creating the dir if needed and rewriting the file only when its content hash differs from the embedded source. Returns the script path. - hash 🔒