Last active
June 4, 2021 09:07
-
-
Save oleavr/e1b76d6cbb7f3e48894e4e69925b148f to your computer and use it in GitHub Desktop.
Frida ObjC.Block example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const pendingBlocks = new Set(); | |
Interceptor.attach(..., { | |
onEnter(args) { | |
const block = new ObjC.Block(args[4]); | |
pendingBlocks.add(block); // Keep it alive | |
const appCallback = block.implementation; | |
block.implementation = (success, error) => { | |
// Do your logging here | |
appCallback(success, error); | |
pendingBlocks.delete(block); | |
}; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nice work!