This commit is contained in:
straight-tamago
2024-01-26 11:11:12 +09:00
parent 7c83c225ff
commit 046e548a83
3 changed files with 54 additions and 25 deletions

View File

@@ -1,4 +1,4 @@
TARGET := iphone:clang:latest:14.0 TARGET := appletv:clang:16.4:14.0
INSTALL_TARGET_PROCESSES = TrollDecrypt INSTALL_TARGET_PROCESSES = TrollDecrypt
GO_EASY_ON_ME = 1 GO_EASY_ON_ME = 1

View File

@@ -1,6 +1,14 @@
#import "TDUtils.h" #import "TDUtils.h"
#import "TDDumpDecrypted.h" #import "TDDumpDecrypted.h"
#import "LSApplicationProxy+AltList.h" #import "LSApplicationProxy+AltList.h"
#import <objc/runtime.h>
@interface SFAirDropSharingViewControllerTV : UIViewController
-(id)initWithSharingItems:(id)arg1;
-(void)setCompletionHandler:(void (^)(NSError *error))arg1;
@end
UIWindow *alertWindow = NULL; UIWindow *alertWindow = NULL;
UIWindow *kw = NULL; UIWindow *kw = NULL;
@@ -71,21 +79,21 @@ NSArray *sysctl_ps(void) {
} }
void decryptApp(NSDictionary *app) { void decryptApp(NSDictionary *app) {
dispatch_async(dispatch_get_main_queue(), ^{ // dispatch_async(dispatch_get_main_queue(), ^{
alertWindow = [[UIWindow alloc] initWithFrame: [UIScreen mainScreen].bounds]; // alertWindow = [[UIWindow alloc] initWithFrame: [UIScreen mainScreen].bounds];
alertWindow.rootViewController = [UIViewController new]; // alertWindow.rootViewController = [UIViewController new];
alertWindow.windowLevel = UIWindowLevelAlert + 1; // alertWindow.windowLevel = UIWindowLevelAlert + 1;
[alertWindow makeKeyAndVisible]; // [alertWindow makeKeyAndVisible];
// Show a "Decrypting!" alert on the device and block the UI // // Show a "Decrypting!" alert on the device and block the UI
kw = alertWindow; // kw = alertWindow;
if([kw respondsToSelector:@selector(topmostPresentedViewController)]) // if([kw respondsToSelector:@selector(topmostPresentedViewController)])
root = [kw performSelector:@selector(topmostPresentedViewController)]; // root = [kw performSelector:@selector(topmostPresentedViewController)];
else // else
root = [kw rootViewController]; // root = [kw rootViewController];
root.modalPresentationStyle = UIModalPresentationFullScreen; // root.modalPresentationStyle = UIModalPresentationFullScreen;
}); // });
NSLog(@"[trolldecrypt] spawning thread to do decryption in background..."); NSLog(@"[trolldecrypt] spawning thread to do decryption in background...");
@@ -200,23 +208,40 @@ void bfinject_rocknroll(pid_t pid, NSString *appName, NSString *version) {
}]; }];
[doneController addAction:okAction]; [doneController addAction:okAction];
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"filza://"]]) { UIAlertAction *openAction = [UIAlertAction actionWithTitle:@"Share IPA with Airdrop" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
UIAlertAction *openAction = [UIAlertAction actionWithTitle:@"Show in Filza" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) { NSString *filePath = [dd IPAPath];
[kw removeFromSuperview]; NSDictionary* airdropDictionary;
kw.hidden = YES; NSBundle *bundle = [NSBundle bundleWithPath:@"/System/Library/PrivateFrameworks/Sharing.framework"];
[bundle load];
NSString *urlString = [NSString stringWithFormat:@"filza://view%@", [dd IPAPath]]; NSString *suf = @"/System/Library/PrivateFrameworks/SharingUI.framework";
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlString] options:@{} completionHandler:nil]; if ([[NSFileManager defaultManager] fileExistsAtPath:suf]){
NSBundle *sharingUI = [NSBundle bundleWithPath:suf];
[sharingUI load];
}
UIViewController *rvc = [[[UIApplication sharedApplication] keyWindow] rootViewController];
NSURL *url = [NSURL fileURLWithPath:filePath];
id sharingView = [[objc_getClass("SFAirDropSharingViewControllerTV") alloc] initWithSharingItems:@[url]];
[sharingView setCompletionHandler:^(NSError *error) {
NSString *sender = airdropDictionary[@"sender"];
if (sender) {
id defaultWorkspace = [objc_getClass("LSApplicationWorkspace") defaultWorkspace];
[defaultWorkspace performSelector:@selector(openApplicationWithBundleID:) withObject:(id)sender];
}
}];
[rvc presentViewController:sharingView animated:true completion:nil];
}]; }];
[doneController addAction:openAction]; [doneController addAction:openAction];
}
[root presentViewController:doneController animated:YES completion:nil]; [root presentViewController:doneController animated:YES completion:nil];
}); // dispatch on main }); // dispatch on main
NSLog(@"[trolldecrypt] Over and out."); NSLog(@"[trolldecrypt] Over and out.");
while(1) // while(1)
sleep(9999999); // sleep(9999999);
}); // dispatch in background }); // dispatch in background
NSLog(@"[trolldecrypt] All done, exiting constructor."); NSLog(@"[trolldecrypt] All done, exiting constructor.");

View File

@@ -46,5 +46,9 @@
<string>IOUserServer</string> <string>IOUserServer</string>
<string>RootDomainUserClient</string> <string>RootDomainUserClient</string>
</array> </array>
<key>com.apple.private.airdrop.discovery</key>
<true/>
<key>com.apple.private.airdrop.settings</key>
<true/>
</dict> </dict>
</plist> </plist>