$ python3 example.py
/home/scott/wrk/learn/frida/example/example.py:19: DeprecationWarning: Script.exports will become asynchronous in the future, use the explicit Script.exports_sync instead
print([m["name"] for m in script.exports.enumerate_modules()])
['cat', 'linux-vdso.so.1', 'libc-2.31.so', 'ld-2.31.so', 'libpthread-2.31.so', 'libdl-2.31.so', 'librt-2.31.so', 'libm-2.31.so']
Although not immediately obvious, I found I could fix the warning by changing exports to exports_sync:
print([m["name"] for m in script.exports_sync.enumerate_modules()])
I suggest updating the example on the website to do likewise.
I also suggest clarifying the warning to make it more obvious how to fix it, for example:
DeprecationWarning: The 'exports' method is deprecated, use 'exports_sync' instead.
I think this warning is clearer because it avoids the confusion of Script versus script, omits the unnecessary explanation about why it is deprecated (the user likely does not care, and the two names imply the rationale anyway), and omits unnecessarily saying "explicit", which at first I thought might be referring to some new Python syntax (like the explicit keyword in C++).
Frida version: 16.1.11
Python version: 3.9.13 (built from source)
OS: Linux Mint 20.1
Frida obtained via pip3 install frida-tools.
Following the instructions at https://frida.re/docs/installation/ , when I run
example.py
, it prints a mysterious deprecation warning:Googling the error message only yields one hit for that specific error, which is the source code at https://github.com/frida/frida-python/blob/main/frida/core.py that prints it.
Although not immediately obvious, I found I could fix the warning by changing
exports
toexports_sync
:I suggest updating the example on the website to do likewise.
I also suggest clarifying the warning to make it more obvious how to fix it, for example:
I think this warning is clearer because it avoids the confusion of
Script
versusscript
, omits the unnecessary explanation about why it is deprecated (the user likely does not care, and the two names imply the rationale anyway), and omits unnecessarily saying "explicit", which at first I thought might be referring to some new Python syntax (like theexplicit
keyword in C++).Frida version: 16.1.11 Python version: 3.9.13 (built from source) OS: Linux Mint 20.1 Frida obtained via
pip3 install frida-tools
.