Commit Graph

568 Commits

Author SHA1 Message Date
Ole André Vadla Ravnås 12f1fdcdfd Simplify __repr__ implementations by using “%R” 2021-06-09 00:41:34 +02:00
Ole André Vadla Ravnås 4b2a512a7e Fix double free when argument parsing succeeds partially
As PyArg_ParseTupleAndKeywords() may have written to one or more
out-parameters, which we obviously shouldn't free in case of failure.
2021-06-09 00:33:31 +02:00
Ole André Vadla Ravnås ad6f4e0bbf Wire up Relay members and __repr__ 2021-06-09 00:26:37 +02:00
Ole André Vadla Ravnås 99480dd678 Rename “session_persist_timeout” to “persist_timeout”
For consistency with the underlying API.
2021-06-08 18:39:20 +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 8fe7c4a1d1 Explicitly depend on setuptools
Instead of assuming it's already present.
2021-04-15 11:43:46 +02:00
Ole André Vadla Ravnås 384fc31401 Declare that we are not zip-safe
As this doesn't work on Android.
2021-02-02 23:53:35 +01:00
Ole André Vadla Ravnås 45a822afa5 Fix setup.py download logic on Android 2021-02-02 23:52:13 +01:00
Ole André Vadla Ravnås e399c2a3ef Update website URL in setup.py 2021-02-02 23:50:44 +01: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 ba74dabc9c Skip PyEval_InitThreads() on newer versions of Python
It has no effect starting with 3.7, and is deprecated as of 3.9.
2020-12-03 00:13:16 +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 4778401121 Move to the proper Meson system name for Android 2020-11-11 21:16:24 +01:00
Ole André Vadla Ravnås 03288953b1 Add unixvictim binaries for Linux/arm{hf,64} 2020-11-02 17:00:21 +01:00
Ole André Vadla Ravnås 542f1b8887 Regenerate unixvictim to support macOS/arm64 2020-10-27 20:43:55 +01:00
Ole André Vadla Ravnås 68f3b6d44a Explicitly declare Python 3.8 as supported 2020-08-04 20:39:34 +02:00
Ole André Vadla Ravnås 2a757595e9 Update setup.py to support macOS on Apple Silicon 2020-07-19 16:35:14 +02:00
Ole André Vadla Ravnås 413beb9ec8 Fix the macOS download logic for Python 3.x 2020-05-16 01:30:45 +02: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 336eeb6c6d Fix Py_ssize_t deprecation warnings 2020-04-24 07:22:43 +02:00
Ole André Vadla Ravnås 6b5a4e8028 Use Meson's b_ndebug option to decide on checks 2020-04-23 19:39:40 +00:00
Ole André Vadla Ravnås 7d57f6807f Use our own test binaries on Linux also
So we can pick the appropriate one based on whether we're running on
a 32- or 64-bit Python interpreter. There's no need for our 32-bit
builds to support injection into 64-bit targets.
2020-04-20 23:13:46 +00:00
Ole André Vadla Ravnås 6e02f082f4 Fix tp_vectorcall_offset assignments on Python >= 3.8
Struct layout is the same, but type is different.
2020-04-18 04:20:58 +02:00
Ole André Vadla Ravnås c463dd1dfe Fix check deciding on assertions and checks
Instead of relying on “buildtype”, consider “optimization” and “debug”.

Thanks @nirbheek!
2020-04-04 07:05:37 +02:00
Ole André Vadla Ravnås a5b4503c7a Move the Python 3 MSVS project to 3.8 2020-04-02 22:08:20 +02:00
Ole André Vadla Ravnås 0dbf400ab5 Fix grammar in setup.py log message 2020-02-28 06:29:08 +01:00
Ole André Vadla Ravnås 991b6c7427 Merge pull request #162 from XieEDeHeiShou/feature/timeout-and-fallbacking 2020-02-28 05:55:32 +01:00
DengChao 581111cd07 Look for a local .egg before hitting the network
To speed things up in situations where the network path is expected to
fail.
2020-02-28 05:53:46 +01:00
DengChao 90992cbf39 Add 2 minute timeout to the .egg download in setup.py
Script may otherwise get stuck.
2020-02-28 05:35:46 +01:00
DengChao 3c872b6744 Improve style of setup.py 2020-02-28 05:26:39 +01: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
Ole André Vadla Ravnås 2488e35b1c Fix error message encoding on Python 2.x
Error messages coming from Frida are UTF-8 encoded strings.
2020-01-04 05:50:08 +01:00
Ole André Vadla Ravnås 9671514a8b Patch extension DLL to match Python on Windows
So we can support any 3.x version like on the other platforms.

The Python 3.x ABI is stable so there is no need to build an extension
for each minor version. Due to the limited dynamic linking support on
Windows, however, there's no way around hard-coding the Python DLL name
in the extension it is compiled for.

As we don't expect users to install via easy_install on Python 3.x, but
assume they're using pip, we just have to tweak our setup.py so it fixes
up the extension after grabbing it from the .egg.
2019-12-18 04:32:22 +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 863d4b1ec8 Refactor Bytes marshalling logic 2019-09-24 05:32:17 +02:00
Ole André Vadla Ravnås bf7801f8e3 Fix some minor inconsistencies in the docstrings 2019-09-24 05:30:05 +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
Ole André Vadla Ravnås 66bdd0ed30 Wire up get_device() instead of emulating it
This way it is automatically cancellable, and we get the performance
benefit of not having to wait for all backends to start.
2019-09-03 10:47:04 +02:00
Ole André Vadla Ravnås 665bf26078 Add test covering basics of RPC cancellation 2019-09-03 09:24:31 +02:00
Ole André Vadla Ravnås 8492f3950b Improve the RPC logic
- Remove request when cancelled.
- Ignore responses to unknown requests.
2019-09-03 01:41:56 +02:00
Ole André Vadla Ravnås 03a85fea8e Fix Cancellable.raise_if_cancelled() 2019-09-03 01:39:49 +02:00
Ole André Vadla Ravnås 698ab16a88 Make RPC method calls fully cancellable 2019-09-03 01:29:22 +02:00
Ole André Vadla Ravnås c2dcacc8f4 Improve the Cancellable API
- Implement a context manager.
- Expose more of the underlying API.
2019-09-03 01:29:00 +02:00
Ole André Vadla Ravnås f8f501d1d2 Add support for cancellation in the top-level API
Though only partially for get_*device*().
2019-08-31 05:55:21 +02:00
Ole André Vadla Ravnås 6498250062 Drop support for cancellable as a positional argument
Better to be explicit for the rare cases where a single operation needs
a specific Cancellable.
2019-08-31 05:28:27 +02:00
Ole André Vadla Ravnås eac26b292e Update to the new cancellable core APIs 2019-08-31 05:07:16 +02:00