60 Commits

Author SHA1 Message Date
Ole André Vadla Ravnås 0b854499cd rpc: Fix type hints for make_rpc_call_request()
Co-authored-by: Håvard Sørbø <havard@hsorbo.no>
2024-05-31 15:40:22 +02:00
Ole André Vadla Ravnås 243cce22e6 rpc: Add support for new binary data passing
Which means:
- Pass in data to RPC method.
- Return value and data from RPC method.

Co-authored-by: Håvard Sørbø <havard@hsorbo.no>
2024-05-31 15:11:05 +02:00
Ole André Vadla Ravnås 8838d885ce _frida: Add missing type hints 2024-05-30 23:45:06 +02:00
Ole André Vadla Ravnås 8b888558c7 device: Add open_service() and Service API
Co-authored-by: Håvard Sørbø <havard@hsorbo.no>
2024-05-30 23:28:36 +02:00
Ole André Vadla Ravnås de55d964a0 extension: Support marshaling uint64 GVariant
Co-authored-by: Håvard Sørbø <havard@hsorbo.no>
2024-05-30 23:28:36 +02:00
Ole André Vadla Ravnås e920bad7f5 extension: Support marshaling double to/from GVariant
Co-authored-by: Håvard Sørbø <havard@hsorbo.no>
2024-05-30 23:28:36 +02:00
Ole André Vadla Ravnås 2b947e6d75 extension: Refactor the variant marshaling logic
Co-authored-by: Håvard Sørbø <havard@hsorbo.no>
2024-05-30 23:28:36 +02:00
Ole André Vadla Ravnås 9992e8ad7a extension: Support marshaling GVariant arrays of variant
Co-authored-by: Håvard Sørbø <havard@hsorbo.no>
2024-05-30 23:28:36 +02:00
Ole André Vadla Ravnås 3c7eb89653 extension: Support unmarshaling more types to GVariant
Co-authored-by: Håvard Sørbø <havard@hsorbo.no>
2024-05-30 23:28:36 +02:00
Ole André Vadla Ravnås 56ec6a46e7 Fix stylistic inconsistencies 2024-04-24 13:18:01 +02:00
Ole André Vadla Ravnås 9706e4be99 Move _frida package inside the frida package
So we only have one top-level package, to avoid confusing IDEs.

Also add missing files to the Meson build system.
2024-04-24 12:41:52 +02:00
Ole André Vadla Ravnås 88330bfbb9 meson: Simplify the build system
- Make full use of Meson's Python module.
- Drop python_incdir option. It's now possible to use a .pc file to
  specify the include path.
- Drop config.h, as we only needed it for HAVE_MACOS, which we can
  easily check for in the single location that we need it.
2024-03-21 21:53:50 +01:00
Ole André Vadla Ravnås 3e489dff85 device: Add unpair() 2023-10-09 13:12:04 +02:00
Yotam Nachum fb86c3aa37 Add async variant to rpc calls 2023-02-03 20:13:19 +02:00
Yotam Nachum b203e4bbca core: Add specific signals type hinting 2023-01-14 15:15:17 +02:00
Ole André Vadla Ravnås 6470583f8b core: Avoid using Python's union syntax
So we don't depend on Python >= 3.10.
2022-10-06 22:50:50 +02:00
Yotam Nachum 4f5c83fd09 Fix type hinting 2022-09-24 18:54:10 +03:00
Orip 32e3def2a1 Fix Device.get_bus
The Previous implementation called the `_Device.get_bus` method which doesn't exist
2022-09-12 20:59:52 +03:00
Yotam Nachum 600d68a982 Add _frida type hinting 2022-09-12 20:59:52 +03:00
Yotam Nachum af23dd92f2 Add docstrings 2022-09-12 20:59:52 +03:00
Yotam Nachum 057d901c06 Add type hinting
Lots of functions were using *args and **kwargs that were kind of
useless with type hinting, so I explicitly named every possible argument
and its type. It breaks backward compatibility (sort of) because you can
pass nonsense arguments anymore.
2022-09-12 20:59:52 +03:00
Yotam Nachum fc00ac2b75 Automatically format code with Black and Isort 2022-09-12 20:59:52 +03:00
Yotam Nachum c4785c3f7c Use f-strings
f-strings is a new, shorter alternative to `.format` method that was
introduced in Python 3.6.
2022-09-12 20:59:52 +03:00
Yotam Nachum 91554f8311 Remove unused import 2022-09-12 11:55:02 +03:00
Yotam Nachum 0d9e17f757 Remove object parent class
Python 3 classes inherit from object class implicitly
2022-09-12 11:55:02 +03:00
Yotam Nachum 27337a5ce5 Remove unused backward compatibility header 2022-09-12 11:55:00 +03:00
Yotam Nachum f38b846015 Remove handling of Python 2 version in error msg 2022-09-12 11:48:38 +03:00
Yotam Nachum 62bf077ebd Remove handling of old string type basestring
We don't need it anymore with Python 3 only
2022-09-12 11:48:36 +03:00
Ole André Vadla Ravnås 85229982a6 session: Add support for the new snapshot APIs (#212) 2022-08-03 11:43:00 +02:00
Ole André Vadla Ravnås 795e522f02 Port to the new frida-core API 2022-08-02 12:56:06 +02:00
Ole André Vadla Ravnås 77f0141d4b compiler: Add Compiler API 2022-07-20 01:43:25 +02:00
Ole André Vadla Ravnås 3bca276575 Update to the new frida-core APIs 2021-07-06 23:36:00 +02:00
Ole André Vadla Ravnås bc1e5d752f Move to the new application and process query APIs 2021-07-01 21:36:39 +02:00
Grant Douglas abfbe016c3 Add Device.query_system_parameters() 2021-06-17 02:47:06 +02:00
Ole André Vadla Ravnås 0650579d82 Throw when attempting an RPC call on a destroyed script
This was previously covered by post() throwing, which it no longer does.
2021-06-12 02:17:19 +02:00
Ole André Vadla Ravnås 15537d437e Improve the “script is destroyed” error message 2021-06-12 02:16:36 +02:00
Ole André Vadla Ravnås aaf7f0ce6d Add Script.is_destroyed property 2021-06-12 02:14:54 +02:00
Ole André Vadla Ravnås 0eb90247fb Add Session.is_detached property 2021-06-12 02:13:33 +02:00
Ole André Vadla Ravnås f3dc04cdc1 Add Device.is_lost property 2021-06-12 02:12:36 +02:00
Ole André Vadla Ravnås 4cc9209c3d Add support for the new frida-core APIs 2021-06-08 02:25:25 +02:00
NewbieGoose 39f36f7d4a Add RPC exports listing functionality to Script and ScriptExports (#180) 2021-04-27 21:26:56 +02:00
Ole André Vadla Ravnås 3e37f6d742 Update to the new attach() core API 2020-12-16 03:38:43 +01:00
Ole André Vadla Ravnås 6038ace649 Add missing error-handling to CancellablePollFD
Need to handle get_fd() returning -1 on error, which always happens on
Windows where it is unsupported.
2020-12-01 01:45:09 +01:00
Ole André Vadla Ravnås f8a31480ed Rename to match the revised remote device API 2020-04-30 05:05:31 +02:00
Ole André Vadla Ravnås faec367cf7 Add Cancellable.get_pollfd()
Useful for integrating with an existing event loop.
2020-02-26 22:50:41 +01:00
Francesco Tamagni eefb5e4930 Improve the log handler access logic (#160)
- Add `get_log_handler()` for symmetry
- Expose the default log handler
2019-12-05 17:48:31 +01:00
Ole André Vadla Ravnås 1a90214c37 Add support for the new channels API 2019-09-24 05:59:45 +02:00
Ole André Vadla Ravnås 7def1ad210 Make DeviceManager.close() cancellable 2019-09-04 02:21:12 +02:00
Ole André Vadla Ravnås 870199d9e7 Fix a Python 2.x compatibility regression 2019-09-04 01:54:40 +02:00
Ole André Vadla Ravnås fd563fb312 Improve RPC message detection
To avoid crashing if an agent does `send([])`.

Kudos to @H0r53 for reporting!

Fixes frida/frida#1008.
2019-09-03 23:52:54 +02:00