ChipBench packages Ghidra, radare2, binwalk, chip-programming tools,
simulators, and firmware-unpacking utilities into one reproducible container
for analyzing raw chip dumps entirely from the command line or an AI CLI.
Headless Jython scripts drive import, forced-disassembly sweeps, live
queries, and bulk decompilation exports without any GUI.
Derived from a private engagement environment, generalized for public
release under AGPLv3. No engagement-specific artifacts are included.
💘 Generated with Crush
Assisted-by: Crush:glm-5.2
23 lines
833 B
Bash
Executable File
23 lines
833 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Container entrypoint. Two modes:
|
|
# - default ("supervisor"): launch the desktop + Ghidra + MCP bridge
|
|
# - anything else: exec the given command (used by `docker compose run` for
|
|
# headless analysis, interactive shells, etc.)
|
|
set -euo pipefail
|
|
|
|
# Ensure the Ghidra project / output trees exist and are writable by our user.
|
|
mkdir -p /data/work /data/output /home/chip/.vnc
|
|
|
|
# (Re)create the VNC password file from $VNC_PASSWORD (default: chiprev).
|
|
VNC_PASSWORD="${VNC_PASSWORD:-chiprev}"
|
|
if [ ! -f /home/chip/.vnc/passwd ]; then
|
|
x11vnc -storepasswd "${VNC_PASSWORD}" /home/chip/.vnc/passwd >/dev/null 2>&1
|
|
fi
|
|
|
|
if [ "${1:-}" = "supervisor" ] || [ "$#" -eq 0 ]; then
|
|
exec /usr/bin/supervisord -c /opt/conf/supervisord.conf
|
|
fi
|
|
|
|
# Pass-through: headless analyze, shell, one-off tools, etc.
|
|
exec "$@"
|