summaryrefslogtreecommitdiffstats
path: root/idatui/tui.py
diff options
context:
space:
mode:
authorblasty <peter@haxx.in>2026-07-10 15:10:25 +0200
committerblasty <peter@haxx.in>2026-07-10 15:10:25 +0200
commitec47ee3d4de8d3ada409381a9098a9d6ffc7ffef (patch)
treebfeae42df8ffdfab16ce7324ed38f40250eff51f /idatui/tui.py
parentsync: extract shared settle/wait helpers (idatui/_sync.py) (diff)
downloadida-tui-ec47ee3d4de8d3ada409381a9098a9d6ffc7ffef.tar.gz
ida-tui-ec47ee3d4de8d3ada409381a9098a9d6ffc7ffef.tar.xz
ida-tui-ec47ee3d4de8d3ada409381a9098a9d6ffc7ffef.zip
rpc: unix-socket puppeteering server (raw keys + introspection + screen)
Run the TUI with --rpc <sock> and it renders normally while an asyncio listener on the same loop lets another process drive it. Handlers touch the UI directly (same loop, no thread hop), so every injected key has the identical on-screen effect a keyboard would — the point for livestreaming. Newline-delimited JSON. v1 methods: keys/text (raw injection, via the same _press_keys the pilot uses; text can interleave wait:<ms> for a typed-out look), state/view/screen/functions (introspection; screen() is a full plain-text render of exactly what the viewer sees). No auth by design — the socket is 0600, local only. tests/rpc_smoke.py drives it end-to-end over a real socket (7 green).
Diffstat (limited to 'idatui/tui.py')
-rw-r--r--idatui/tui.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/idatui/tui.py b/idatui/tui.py
index e787fe6..b399ffe 100644
--- a/idatui/tui.py
+++ b/idatui/tui.py
@@ -32,9 +32,12 @@ def main(argv: list[str] | None = None) -> int:
help="open (or reopen) a binary and drive it (dir must be writable)")
p.add_argument("--no-keepalive", action="store_true",
help="Do not bump idle-TTL / run the keepalive heartbeat")
+ p.add_argument("--rpc", metavar="PATH",
+ help="listen for RPC on this unix socket path (puppeteer the TUI)")
args = p.parse_args(argv)
+ rpc_path = os.path.abspath(os.path.expanduser(args.rpc)) if args.rpc else None
IdaTui(url=args.url, db=args.db, open_path=args.open,
- keepalive=not args.no_keepalive).run()
+ keepalive=not args.no_keepalive, rpc_path=rpc_path).run()
return 0