Last active
December 20, 2019 06:39
-
-
Save DickyT/b1f7c2d434e288e4edb8455b58015085 to your computer and use it in GitHub Desktop.
Use NSNotificationName for addObserverForName in frida
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 nCenter = ObjC.classes.NSNotificationCenter.defaultCenter(); | |
const addEventListener = nCenter['- addObserverForName:object:queue:usingBlock:']; | |
const onConnect = new ObjC.Block({ | |
retType: 'void', | |
argTypes: ['object'], | |
implementation: function () { | |
console.log('OK'); | |
}, | |
}); | |
addEventListener('UIScreenDidConnectNotification', null, null, onConnect); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment