frida使用文档

frida食用文档

frida-trace,frida-ps,frida,frida-discover

python载入脚本

import frida, sys

def on_message(message, data):
    if message['type'] == 'send':
        print("[*] {0}".format(message['payload']))
    else:
        print(message)
#下列的a为方法名,com.example.myfirst_app.MainActivity为包名+类名
jscode = """
console.log("Script loaded successfully ");
Java.perform(function(){
    var mainAc = Java.use("com.example.myfirst_app.MainActivity");
    mainAc.a.implementation = function (a) {
        console.log('targetMethod is hooked');
        
        return true;
        
    }
});
"""
#com.example.myfirst_app为进程名
rdev = frida.get_usb_device()
print(rdev)
process = rdev.attach('com.example.myfirst_app')

script = process.create_script(jscode)
script.on('message', on_message)
script.load()
sys.stdin.read()

frida脚本js中各数据类型

int (int)
boolean	boolean
String	java.lang.String
overload可有可无
posted @ 2021-06-21 11:18  鼬神无悔  阅读(492)  评论(0)    收藏  举报