Commit Graph

547 Commits

Author SHA1 Message Date
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
Ole André Vadla Ravnås 9a42453594 Remove trailing whitespace 2019-08-08 20:58:38 +02:00
Muhammed Ziad 271d8ff926 Add option to compile the native extension from Python header files (#155) 2019-07-31 01:27:11 +02:00
Ole André Vadla Ravnås 7d8612bfa2 Use Module.getExportByName() where appropriate 2019-05-10 21:28:34 +02:00
Ole André Vadla Ravnås 9412e5b919 Remove redundant 'use strict' directives 2019-05-10 21:27:47 +02:00
Ole André Vadla Ravnås 1f1497818e Add support for specifying script options 2019-05-10 21:10:53 +02:00
Ole André Vadla Ravnås 7dc061ca07 Canonicalize the Meson option name and declaration 2019-05-09 21:05:38 +02:00
Ole André Vadla Ravnås 74f84d302a Add workaround to improve test-suite reliability
Not all of our injectors handle injection into processes that haven't
finished initializing, so for now delay a little before attaching.
2019-05-07 01:18:37 +00:00
Ole André Vadla Ravnås 7d5c36e358 Make the Linux pip setup logic architecture agnostic
At least in theory.
2019-05-07 02:41:39 +02:00
Ole André Vadla Ravnås 8043aa6908 Fix include path on Windows
Should only be using the public API.
2019-04-24 02:12:45 +02:00
Ole André Vadla Ravnås 4989a997b2 Fix assertion usage in implementation vs test code
Implementation code should never use g_assert_cmp*(), and test code
should never use g_assert().
2019-04-12 22:30:21 +02:00
Ole André Vadla Ravnås 1d428b71c9 Improve the device resolver logic
Also expose _get_device() as get_device_matching().
2019-03-27 13:34:57 +01:00
Ole André Vadla Ravnås f238498cdc Add crash reporting example 2019-02-04 14:26:58 +01:00
Ole André Vadla Ravnås 6b81b45420 Add Crash summary 2019-02-04 14:26:39 +01:00
Ole André Vadla Ravnås 5e8cd65665 Add support for the new crash reporting APIs 2019-01-29 00:01:42 +01:00
Ole André Vadla Ravnås 5c2dc4da55 Fix setup.py OS version logic on macOS
Now that we no longer release redundant prebuilds for macOS.

Kudos to @Ronophobia for discovering this issue.
2018-11-06 22:19:32 +01:00
Ole André Vadla Ravnås 2ed895b881 Add support for the new eternalize() API 2018-09-17 22:15:27 +02:00
Ole André Vadla Ravnås 6f914eb268 Disable assertions and checks in production builds 2018-08-21 20:12:49 +02:00
Ole André Vadla Ravnås 1b4b59fdca Declare support for Python 3.7 2018-08-20 23:26:19 +02:00
Ole André Vadla Ravnås b391988445 Upgrade to Python 3.7 2018-08-20 23:25:30 +02:00
Ole André Vadla Ravnås 83e8cd53de Ignore .user files generated by VS 2018-08-20 23:23:44 +02:00
Ole André Vadla Ravnås b3e7b5b792 Improve spawn() to support unicode aux options
On Python 2.x.
2018-07-26 00:45:16 +02:00