import frida, sys def on_message(message, data): if message['type'] == 'send': print("[/i][i] {0}".format(message['payload'])) else: print(message) jscode = """ Java.perform(function () { var MainActivity = Java.use('com.example.seccon2015.rock_paper_scissors.MainActivity'); //开始hook onClick方法 需要注意这个function是传参数的 所以我们hook时别忘了 //public void onClick(View paramView){} MainActivity.onClick.implementation = function (v) { this.onClick(v); //修改m,n的值 this.m.value = 0; this.n.value = 1; this.cnt.value = 999; send("Success!") } }); """ process = frida.get_usb_device().attach('com.example.seccon2015.rock_paper_scissors') script = process.create_script(jscode) script.on('message', on_message) script.load() sys.stdin.read()
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课