Analyze encode first.
found It is an export function.
ida find it, as shown .
Check the reference and find the function that calls it .
Get its offset in the file ,as the picture shows.
hook , remember to add 1 to the address.
# -*- coding: UTF-8 -*-
import frida, sys
jsCode = """
Java.perform(function(){
< br /> var soAddr = Module.findBaseAddress("libhello.so");
send('soAddr: '+ soAddr);
var MD5FinalAddr = soAddr.add(0x1768 + 1);
send('MD5FinalAddr: '+ MD5FinalAddr);
Interceptor.attach(MD5FinalAddr, {
onEnter: function(args){
send(args[0]);
send (args[1]);
},
onLeave: function(retval){
send(retval);
}
});
< br />});
""";
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= pr ocess.create_script(jsCode)
script.on("message", message)
script.load()
sys.stdin.read()