# -*- coding:utf-8 -*- import sys __author__ = 'Snow' import frida def on_message(message,data): if message["type"] == "send": print("[+] {}".format(message["payload"])) else: print("[-] {}".format(message)) app = "com.yzmj.hardtime.coolpad" dev = frida.get_remote_device() pid = dev.spawn(app) session = dev.attach(pid) js_path = "js/hook_dex_dump.js" with open(js_path,encoding='utf-8') as f: _FRIDA_JS = f.read() script = session.create_script(_FRIDA_JS) script.on("message", on_message) script.load() dev.resume(pid) sys.stdin.read()