diff options
| author | blasty <blasty@local> | 2026-07-10 15:10:25 +0200 |
|---|---|---|
| committer | blasty <blasty@local> | 2026-07-10 15:10:25 +0200 |
| commit | 690a34512eaed933917f2d2c1cf12327923b39ac (patch) | |
| tree | bfeae42df8ffdfab16ce7324ed38f40250eff51f /idatui/tui.py | |
| parent | sync: extract shared settle/wait helpers (idatui/_sync.py) (diff) | |
| download | ida-tui-690a34512eaed933917f2d2c1cf12327923b39ac.tar.gz ida-tui-690a34512eaed933917f2d2c1cf12327923b39ac.tar.xz ida-tui-690a34512eaed933917f2d2c1cf12327923b39ac.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.py | 5 |
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 |
