只在4.4.4上运行成功7系统一直没成功,难受。
# -*- coding: UTF-8 -*-import frida, sysjsCode = """Java.perform(function(){var nativePointer = Module.findExportByName("libhello.so", "Java_com_xiaojianbang_app_NativeHelper_add");send("native: " + nativePointer);Interceptor.attach(nativePointer, {onEnter: function(args){send(args[0]);send(args[1]);send(args[2].toInt32());send(args[3].toInt32());send(args[4].toInt32());},onLeave: function(retval){send(retval.toInt32());}});});""";def message(message, data):if message["type"] == 'send':print(u"[*] {0}".format(message['payload']))else:print(message)process = frida.get_remote_device().attach("com.xiaojianbang.app")script= process.create_script(jsCode)script.on("message", message)script.load()sys.stdin.read()
如果觉得《frida hook so导出函数》对你有帮助,请点赞、收藏,并留下你的观点哦!