长期 Copy模板会有很大的弊端,直接写代码效率低下,所以代码提示辅助手写代码迫在眉睫。具体实现步骤如下
1.安装配置 npm 参考文章
windows下安装npm_青山的博客-CSDN博客_windows安装npm
2.Frida 自动提示参考文章
Frida调试环境搭建-Android安全-看雪论坛-安全社区|安全招聘|bbs.pediy.comhttps://bbs.pediy.com/thread-265783.htm3. 下载 frida-agent-example github项目地址GitHub - oleavr/frida-agent-example: Example Frida agent written in TypeScriptExample Frida agent written in TypeScript. Contribute to oleavr/frida-agent-example development by creating an account on GitHub.
https://github.com/oleavr/frida-agent-example
4. 切换到 frida-agent-example 目录下 执行 npm install
5.下载Vscode 打开文件夹 下载python依赖拓展
6.在 frida-agent-example 下创建 js文件 并且创建python文件用于执行装在 js
7.示例代码
function main(){
Java.perform(function(){
var Process = Java.use("android.os.Process");
Process.killProcess.implementation = function (a) {
send("ok");
}
})
}
setImmediate(main);
import frida
def my_message_handler(message,payload):
if message["type"] == 'send':
print("[*] {0}".format(message['payload']))
else:
print(message)
device = frida.get_usb_device()
session = device.attach("黑客精神")
with open(r"C:\Users\Baixiong\Desktop\frida-agent\agent\agent.js") as f :
script = session.create_script(f.read())
script.on("message",my_message_handler)
script.load()
input()
8. 特别注意,在Vscode使用相对路径会提示找不到文件,我的解决办法是文件路径写死