-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTweak.x
More file actions
43 lines (29 loc) · 1.09 KB
/
Tweak.x
File metadata and controls
43 lines (29 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#import <UIKit/UIKit.h>
%hook UITextField
// 1. Bypass the Visual Layer: Prevent iOS from applying the black/blur privacy screen
- (void)setSecureTextEntry:(BOOL)secure {
%orig(NO);
}
// Spoof the getter just in case the app validates the UI state
- (BOOL)isSecureTextEntry {
return NO;
}
%end
%hook UIScreen
// 2. Bypass the Active Polling Layer: Force the system to report that no recording is active
- (BOOL)isCaptured {
return NO;
}
%end
%hook NSNotificationCenter
// 3. Bypass the Event Layer: Intercept block-based observer registrations
- (id)addObserverForName:(NSNotificationName)name object:(id)obj queue:(NSOperationQueue *)queue usingBlock:(void (^)(NSNotification *note))block {
// If the app tries to listen for screenshot or screen recording events, drop it
if ([name isEqualToString:UIApplicationUserDidTakeScreenshotNotification] ||
[name isEqualToString:UIScreenCapturedDidChangeNotification]) {
// Return nil to provide an invalid observer token. The closure will never execute.
return nil;
}
return %orig;
}
%end