tryorchard-cli 0.0.3__tar.gz → 0.0.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/PKG-INFO +1 -1
  2. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/orchard/cmd_net.py +32 -0
  3. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/pyproject.toml +1 -1
  4. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/tryorchard_cli.egg-info/PKG-INFO +1 -1
  5. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/README.md +0 -0
  6. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/orchard/__init__.py +0 -0
  7. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/orchard/cli.py +0 -0
  8. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/orchard/client.py +0 -0
  9. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/orchard/cmd_access.py +0 -0
  10. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/orchard/cmd_debugger.py +0 -0
  11. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/orchard/cmd_exec.py +0 -0
  12. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/orchard/cmd_frida.py +0 -0
  13. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/orchard/cmd_input.py +0 -0
  14. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/orchard/cmd_kernel.py +0 -0
  15. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/orchard/cmd_lifecycle.py +0 -0
  16. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/orchard/cmd_record.py +0 -0
  17. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/orchard/cmd_relay.py +0 -0
  18. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/orchard/cmd_remote.py +0 -0
  19. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/orchard/cmd_sandbox.py +0 -0
  20. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/orchard/cmd_telephony.py +0 -0
  21. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/orchard/config.py +0 -0
  22. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/orchard/context.py +0 -0
  23. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/orchard/output.py +0 -0
  24. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/orchard/ptyshell.py +0 -0
  25. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/orchard/selector.py +0 -0
  26. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/orchard/viewers.py +0 -0
  27. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/orchard/wsbridge.py +0 -0
  28. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/setup.cfg +0 -0
  29. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/tests/test_client.py +0 -0
  30. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/tests/test_config.py +0 -0
  31. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/tests/test_debugger.py +0 -0
  32. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/tests/test_frida.py +0 -0
  33. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/tests/test_input.py +0 -0
  34. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/tests/test_net.py +0 -0
  35. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/tests/test_remote.py +0 -0
  36. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/tests/test_selector.py +0 -0
  37. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/tests/test_viewers.py +0 -0
  38. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/tests/test_wsbridge.py +0 -0
  39. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/tryorchard_cli.egg-info/SOURCES.txt +0 -0
  40. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/tryorchard_cli.egg-info/dependency_links.txt +0 -0
  41. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/tryorchard_cli.egg-info/entry_points.txt +0 -0
  42. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/tryorchard_cli.egg-info/requires.txt +0 -0
  43. {tryorchard_cli-0.0.3 → tryorchard_cli-0.0.4}/tryorchard_cli.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tryorchard-cli
3
- Version: 0.0.3
3
+ Version: 0.0.4
4
4
  Summary: Orchard CLI — drive sandboxes (sandbox/snapshot/template/team/key management and live adb/scrcpy/vnc/shell/logs/files) from the terminal.
5
5
  License: MIT
6
6
  Requires-Python: >=3.10
@@ -29,6 +29,7 @@ def register(app: typer.Typer) -> None:
29
29
  app.command("tunnel", help="Reverse-tunnel a local proxy into the guest.")(tunnel)
30
30
  app.command("proxy", help="Show, set, or clear the device's HTTP(S) proxy.")(proxy)
31
31
  app.command("cert", help="Install/list/remove a custom CA in the device's system trust store.")(cert)
32
+ app.command("mitm", help="One-shot HTTPS interception: install a CA + reverse-tunnel to your local proxy + point the device proxy at it.")(mitm)
32
33
  # One generic live-view command: it picks the right viewer for the device itself
33
34
  # (scrcpy for Android, VNC for an iOS VM, a browser/WebRTC player otherwise).
34
35
  app.command("ui", help="Open the device's live screen (auto-picked for the platform).")(ui)
@@ -293,6 +294,37 @@ def cert(ctx: typer.Context, selector: str,
293
294
  console.print(f"trusted CAs: {r.get('count')}")
294
295
 
295
296
 
297
+ # -- mitm (one-shot: cert + reverse tunnel + proxy) -----------------------
298
+ def mitm(ctx: typer.Context, selector: str,
299
+ to: str = typer.Option(..., "--to", help="your local proxy as host:port (e.g. 127.0.0.1:8080, a Burp/mitmproxy)"),
300
+ cert_file: str = typer.Option(None, "--cert", help="install this PEM CA file into the device trust store first (your proxy's root CA)")):
301
+ """One-shot HTTPS interception against a proxy on YOUR machine.
302
+
303
+ Installs your proxy's CA (with --cert; needs a rooted device), opens a reverse
304
+ tunnel to --to, and points the device proxy at it automatically. Holds the tunnel
305
+ open until Ctrl-C. Equivalent to `orchard cert --add` then `orchard tunnel --to`.
306
+ """
307
+ inst = _resolve(ctx, selector)
308
+ to_host, _, to_port_s = to.rpartition(":")
309
+ if not to_host or not to_port_s.isdigit():
310
+ raise fail("--to must be host:port")
311
+ to_port = int(to_port_s)
312
+ if cert_file:
313
+ with client(ctx) as c:
314
+ r = c.sandbox(inst["uuid"]).install_cert_file(cert_file)
315
+ ok(f"CA {r.get('hash')} installed — {r.get('detail', '')}")
316
+ c = cfg(ctx)
317
+
318
+ def log(level, text):
319
+ {"ok": ok, "warn": lambda m: console.print(f"[yellow]{m}[/yellow]"),
320
+ "error": lambda m: console.print(f"[red]{m}[/red]")}.get(level, console.print)(text)
321
+
322
+ ok(f"interception up — guest proxy -> {to_host}:{to_port} ({inst.get('name')}); Ctrl-C to stop")
323
+ rc = _amain(wsbridge.run_tunnel(c, inst["uuid"], to_host, to_port, log))
324
+ if rc:
325
+ raise typer.Exit(rc)
326
+
327
+
296
328
  def _is_android(inst: dict) -> bool:
297
329
  return inst.get("platform") == "android" or inst.get("provider") in _ANDROID
298
330
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "tryorchard-cli"
3
- version = "0.0.3"
3
+ version = "0.0.4"
4
4
  description = "Orchard CLI — drive sandboxes (sandbox/snapshot/template/team/key management and live adb/scrcpy/vnc/shell/logs/files) from the terminal."
5
5
  readme = "README.md"
6
6
  license = { text = "MIT" }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tryorchard-cli
3
- Version: 0.0.3
3
+ Version: 0.0.4
4
4
  Summary: Orchard CLI — drive sandboxes (sandbox/snapshot/template/team/key management and live adb/scrcpy/vnc/shell/logs/files) from the terminal.
5
5
  License: MIT
6
6
  Requires-Python: >=3.10
File without changes
File without changes