|
@@ -48,6 +48,7 @@
|
|
|
@interface LSApplicationProxy: NSObject
|
|
@interface LSApplicationProxy: NSObject
|
|
|
+(id)applicationProxyForIdentifier:(id)sender;
|
|
+(id)applicationProxyForIdentifier:(id)sender;
|
|
|
+(id)tv_applicationFlatIcon;
|
|
+(id)tv_applicationFlatIcon;
|
|
|
|
|
+-(BOOL)isContainerized;
|
|
|
@end
|
|
@end
|
|
|
|
|
|
|
|
@implementation NSObject (Additions)
|
|
@implementation NSObject (Additions)
|
|
@@ -79,22 +80,31 @@ __attribute__ ((constructor)) static void FLEXInjected_main() {
|
|
|
NSDictionary *ourDict = [[NSDictionary alloc] initWithContentsOfFile:@"/var/mobile/Library/Preferences/com.nito.flexinjected.plist"];
|
|
NSDictionary *ourDict = [[NSDictionary alloc] initWithContentsOfFile:@"/var/mobile/Library/Preferences/com.nito.flexinjected.plist"];
|
|
|
NSNumber *value = [ourDict objectForKey:bundleID];
|
|
NSNumber *value = [ourDict objectForKey:bundleID];
|
|
|
if ([value boolValue] == YES) {
|
|
if ([value boolValue] == YES) {
|
|
|
-
|
|
|
|
|
|
|
+ BOOL sendAlert = true;
|
|
|
id prox = [%c(LSApplicationProxy) applicationProxyForIdentifier:bundleID];
|
|
id prox = [%c(LSApplicationProxy) applicationProxyForIdentifier:bundleID];
|
|
|
UIImage *icon = nil;
|
|
UIImage *icon = nil;
|
|
|
if (prox){
|
|
if (prox){
|
|
|
NSLog(@"[FLEXInjected] found prox: %@", prox);
|
|
NSLog(@"[FLEXInjected] found prox: %@", prox);
|
|
|
- icon = [prox tv_applicationFlatIcon];
|
|
|
|
|
|
|
+ if ([prox isContainerized]){
|
|
|
|
|
+ sendAlert = false;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ icon = [prox tv_applicationFlatIcon];
|
|
|
|
|
+ }
|
|
|
} else {
|
|
} else {
|
|
|
NSString *mcsPath = @"/System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices";
|
|
NSString *mcsPath = @"/System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices";
|
|
|
[[NSBundle bundleWithPath:mcsPath] load];
|
|
[[NSBundle bundleWithPath:mcsPath] load];
|
|
|
prox = [%c(LSApplicationProxy) applicationProxyForIdentifier:bundleID];
|
|
prox = [%c(LSApplicationProxy) applicationProxyForIdentifier:bundleID];
|
|
|
- icon = [prox tv_applicationFlatIcon];
|
|
|
|
|
|
|
+ if ([prox isContainerized]){
|
|
|
|
|
+ sendAlert = false;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ icon = [prox tv_applicationFlatIcon];
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if (sendAlert){
|
|
|
|
|
+ NSString *message = [NSString stringWithFormat:@"Injected into bundle: %@", bundleID];
|
|
|
|
|
+ sendNotification(@"FlexInjected", message, icon);
|
|
|
|
|
+ NSLog(@"[FLEXInjected) bundle ID %@", bundleID);
|
|
|
}
|
|
}
|
|
|
- NSString *message = [NSString stringWithFormat:@"Injected into bundle: %@", bundleID];
|
|
|
|
|
- sendNotification(@"FlexInjected", message, icon);
|
|
|
|
|
- NSLog(@"[FLEXInjected) bundle ID %@", bundleID);
|
|
|
|
|
-
|
|
|
|
|
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(10 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(10 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
NSLog(@"[FLEXInjected] weouchea...");
|
|
NSLog(@"[FLEXInjected] weouchea...");
|
|
|
NSString *p = @"/Library/Frameworks/FLEX.framework";
|
|
NSString *p = @"/Library/Frameworks/FLEX.framework";
|