-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Description
Problem
POST /load is intended to load a binary from an external client, but it's currently blocked by the "binary must already be loaded" gate.
plugin/server/http_server.pydo_POSTchecks_check_binary_loaded()for all paths except/logsand/console.- As a result,
/loadreturns400 {"error": "No binary loaded"}when called in an empty session, making it unusable as a bootstrap endpoint.
Repro
curl -sS -X POST http://localhost:9009/load \
-H "Content-Type: application/json" \
-d "{\"filepath\": \"/path/to/binary\"}"Proposed fix
- Add
/loadto the no-binary-required allowlist indo_POST. - Execute
BinaryOperations.load_binary(...)on the main thread (e.g.,binaryninja.mainthread.execute_on_main_thread_and_wait) to avoid UI/threading issues. - Define behavior for selecting/attaching the loaded
BinaryView(setbinary_ops.current_view) and whether to trigger analysis.
Notes
If /load is kept, document intended usage (UI vs headless) and consider gating (config flag and/or auth token) since it opens files and can be used alongside /console/execute.
Metadata
Metadata
Assignees
Labels
No labels