Files
frida-frida-python/examples/bytecode.py
T
Ole André Vadla Ravnås 72899a4315 Drop convenience APIs and split out tools (#142)
Most use-cases will need to use some JS API that we're not bridging, so
it's better to keep our bindings simple.

It has also become clear that our CLI tools should be split out so Frida-based
tools don't have to depend on colorama, prompt_toolkit, and pygments.
2018-07-10 20:08:56 +02:00

23 lines
477 B
Python

# -*- coding: utf-8 -*-
from __future__ import print_function
import frida
system_session = frida.attach(0)
bytecode = system_session.compile_script(name="bytecode-example", source="""\
'use strict';
rpc.exports = {
listThreads: function () {
return Process.enumerateThreadsSync();
}
};
""")
session = frida.attach("Twitter")
script = session.create_script_from_bytes(bytecode)
script.load()
api = script.exports
print("api.list_threads() =>", api.list_threads())