-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdash.js
19 lines (18 loc) · 1.01 KB
/
dash.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
const scheduledTimerWithTimeInterval = ObjC.classes["NSTimer"]["+ scheduledTimerWithTimeInterval:target:selector:userInfo:repeats:"].implementation
Interceptor.replace(scheduledTimerWithTimeInterval, new NativeCallback((NSTimer, sel, interval, target, selector, userInfo, repeats) => {
if (ptr(selector).readCString() == "waitTick") {
interval = 0.0001
}
console.log("Callback", interval, ptr(selector).readCString())
return scheduledTimerWithTimeInterval(NSTimer, sel, interval, target, selector, userInfo, repeats);
}, 'pointer', ['pointer', 'pointer', 'double', 'pointer', 'pointer', 'pointer', 'bool']));
// bug: https://github.com/frida/frida/issues/266
/*
Interceptor.attach(ObjC.classes["NSTimer"]["+ scheduledTimerWithTimeInterval:target:selector:userInfo:repeats:"].implementation, {
onEnter: function (args) {
if (ptr(args[3]).readCString() == "waitTick") {
console.log("Enter interval ", args[0], args[1] ,ObjC.Object(args[2]).toString(), args[3]);
}
},
})
*/