Files
frida-frida-python/examples/rpc.py
T
Ole André Vadla Ravnås 364c5803aa Add a tiny RPC example
2016-06-02 14:44:34 +02:00

22 lines
365 B
Python

# -*- coding: utf-8 -*-
from __future__ import print_function
import frida
session = frida.attach("Twitter")
script = session.create_script("""\
'use strict';
rpc.exports = {
hello: function () {
return 'Hello';
},
failPlease: function () {
oops;
}
};
""")
script.load()
api = script.exports
print("api.hello() =>", api.hello())
api.fail_please()