資源共享吧|易語言論壇|逆向破解教程|輔助開發(fā)教程|網(wǎng)絡(luò)安全教程|m.rigasin.com|我的開發(fā)技術(shù)隨記

標(biāo)題: frida HOOK問題 [打印本頁]

作者: puqiang    時(shí)間: 2021-8-2 16:35
標(biāo)題: frida HOOK問題
matching = [process for process in self._impl.enumerate_processes() if fnmatch.fnmatchcase(process.name.lower(), process_name_lc)]
frida.ServerNotRunningError: unable to connect to remote frida-server: Error sending data: 您的主機(jī)中的軟件中止了一個(gè)已建立的連接。

報(bào)錯(cuò)如上,不知明原因,有重新啟動(dòng)電腦、adb、模擬器(逍遙模擬器/雷電模擬器)

python3.7.1
庫 frida 12.3.6 frida-tools 1.3.1

代碼:
import frida,sys

jscode="""
Java.perform(function () {
    var utils = Java.use("com.xiaojianbang.app.Utils");
    utils.getCalc.implementation = function(a,b){
        console.log("Hook Start...");
        send("Success!");
        return this._getCalc(a,b);
    }
});
"""

def message(message,data):
    if message["type"] == "send":
        print(" {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()



作者: puqiang    時(shí)間: 2021-8-2 18:00
已解決 原因是沒有 運(yùn)行模擬器中的frida




歡迎光臨 資源共享吧|易語言論壇|逆向破解教程|輔助開發(fā)教程|網(wǎng)絡(luò)安全教程|m.rigasin.com|我的開發(fā)技術(shù)隨記 (http://m.rigasin.com/) Powered by Discuz! X3.4