Add support for the new bytecode APIs

This commit is contained in:
Ole André Vadla Ravnås
2016-06-02 23:00:18 +02:00
parent 364c5803aa
commit 4afd9debd4
3 changed files with 95 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
from __future__ import print_function
import frida
system_session = frida.attach(0)
system_session.disable_jit()
bytecode = system_session.compile_script("""\
'use strict';
rpc.exports = {
listThreads: function () {
return Process.enumerateThreadsSync();
}
};
""")
session = frida.attach("Twitter")
session.disable_jit()
script = session.create_script_from_bytes(bytecode)
script.load()
api = script.exports
print("api.list_threads() =>", api.list_threads())