mirror of
https://github.com/frida/frida-python
synced 2026-06-08 14:16:17 +00:00
16 lines
377 B
Python
16 lines
377 B
Python
import sys
|
|
|
|
import frida
|
|
|
|
if len(sys.argv) != 2:
|
|
print(f"Usage: {sys.argv[0]} outfile.png", file=sys.stderr)
|
|
sys.exit(1)
|
|
outfile = sys.argv[1]
|
|
|
|
device = frida.get_usb_device()
|
|
|
|
screenshot = device.open_service("dtx:com.apple.instruments.server.services.screenshot")
|
|
png = screenshot.request({"method": "takeScreenshot"})
|
|
with open(outfile, "wb") as f:
|
|
f.write(png)
|