nowsecure / r2frida

Radare2 and Frida better together.
MIT License
1.18k stars 121 forks source link

Replacing Method Implementation commands #39

Open trufae opened 7 years ago

trufae commented 7 years ago

We have commands in r2frida to change the return value of a native function, it will be good to be able to replace the implementation or do the same for managed methods in Java or ObjC, allowing the function to return a specific number, boolean value, string or null.

            var TMS = Java.use("android.telephony.TelephonyManager");
            TMS.getDeviceId.implementation = function () {
                send("Called - deviceID()");
                return "pwn3d";
            };
trufae commented 8 months ago

ping @as0ler @enovella thoughs on this? its a very old dticket and we already have stuff that handles it, can you verify this stuff works and implement the missing bits if any?