mirror of
https://github.com/frida/frida-python.git
synced 2026-11-08 01:58:13 -10:00
Black has changed how it lays out a call whose argument is a multiline string, and a `with` statement holding several contexts.
20 lines
299 B
Python
20 lines
299 B
Python
import frida
|
|
|
|
session = frida.attach("Twitter")
|
|
script = session.create_script(
|
|
"""\
|
|
rpc.exports = {
|
|
hello: function () {
|
|
return 'Hello';
|
|
},
|
|
failPlease: function () {
|
|
oops;
|
|
}
|
|
};
|
|
"""
|
|
)
|
|
script.load()
|
|
api = script.exports_sync
|
|
print("api.hello() =>", api.hello())
|
|
api.fail_please()
|