frida 遍历所有当前已经加载的类

frida 遍历所有当前已经加载的类

# -*- coding: UTF-8 -*-
import frida, sys

jsCode = """

Java.perform(function(){

    var imports = Module.enumerateImportsSync("libsoul-netsdk.so");
    for(var i = 0; i < imports.length; i++) {
        if(imports[i].name == 'strncat'){
            send(imports[i].name + ": " + imports[i].170525
            );
            break;
        }
    }

    var exports = Module.enumerateExportsSync("libsoul-netsdk.so");
    for(var i = 0; i < exports.length; i++) {
        if(exports[i].name.indexOf('add') != -1){
            send(exports[i].name + ": " + exports[i].address);
            break;
        }
    }
    for(var i = 0; i < imports.length; i++) {
            send(imports[i].name + ": " + imports[i].address);
        }
        var exports = Module.enumerateExportsSync("libsoul-netsdk.so");
        for(var i = 0; i < exports.length; i++) {
                send(exports[i].name + ": " + exports[i].address);
    }

});

"""

enumerateLoadedClasses_jsCode ="""

Java.perform(function(){
    Java.enumerateLoadedClasses({
        onMatch: function(className) {
            send(className);},
        onComplete:function(){
            send("done");
        }
    });
});
"""
def message(message, data):
    if message["type"] == 'send':
        print(u"[*] {0}".format(message['payload']))
    else:
        print(message)

process = frida.get_remote_device().attach("cn.soulapp.android")
script= process.create_script(enumerateLoadedClasses_jsCode)
script.on("message", message)
script.load()
sys.stdin.read()
上一篇:夺命雷公狗—玩转SEO---31---DEDE站内提升网站权重


下一篇:SEO优化之no follow