From 33f1d47d4cfb3f284a76f008d5812711f570895c Mon Sep 17 00:00:00 2001 From: opa334 Date: Mon, 27 Nov 2023 20:46:33 +0100 Subject: [PATCH] Add credits --- Makefile | 2 + TrollStore/TSDonateListController.h | 5 +++ TrollStore/TSDonateListController.m | 61 +++++++++++++++++++++++++++ TrollStore/TSSettingsListController.m | 12 ++++++ 4 files changed, 80 insertions(+) create mode 100644 TrollStore/TSDonateListController.h create mode 100644 TrollStore/TSDonateListController.m diff --git a/Makefile b/Makefile index a949213..e39ebdd 100644 --- a/Makefile +++ b/Makefile @@ -21,6 +21,8 @@ make_trollhelper_package: @$(MAKE) clean -C ./TrollHelper @cp ./RootHelper/.theos/obj/trollstorehelper ./TrollHelper/Resources/trollstorehelper @$(MAKE) -C ./TrollHelper FINALPACKAGE=1 package $(MAKECMDGOALS) + @$(MAKE) clean -C ./TrollHelper + @$(MAKE) -C ./TrollHelper THEOS_PACKAGE_SCHEME=rootless FINALPACKAGE=1 package $(MAKECMDGOALS) @rm ./TrollHelper/Resources/trollstorehelper make_trollhelper_embedded: diff --git a/TrollStore/TSDonateListController.h b/TrollStore/TSDonateListController.h new file mode 100644 index 0000000..10dcf51 --- /dev/null +++ b/TrollStore/TSDonateListController.h @@ -0,0 +1,5 @@ +#import + +@interface TSDonateListController : PSListController + +@end \ No newline at end of file diff --git a/TrollStore/TSDonateListController.m b/TrollStore/TSDonateListController.m new file mode 100644 index 0000000..899bcbb --- /dev/null +++ b/TrollStore/TSDonateListController.m @@ -0,0 +1,61 @@ +#import "TSDonateListController.h" +#import + +@implementation TSDonateListController + + +- (void)donateToAlfiePressed +{ + [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://ko-fi.com/alfiecg_dev"] options:@{} completionHandler:^(BOOL success){}]; +} + +- (void)donateToOpaPressed +{ + [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=opa334@protonmail.com&item_name=TrollStore"] options:@{} completionHandler:^(BOOL success){}]; +} + +- (NSMutableArray*)specifiers +{ + if(!_specifiers) + { + _specifiers = [NSMutableArray new]; + + PSSpecifier* alfieGroupSpecifier = [PSSpecifier emptyGroupSpecifier]; + alfieGroupSpecifier.name = @"Alfie"; + [alfieGroupSpecifier setProperty:@"Alfie found the new CoreTrust bug (CVE-2023-41991) via patchdiffing, produced a POC binary and worked on automatically applying it with the help of the ChOma library, while also contributing to said library." forKey:@"footerText"]; + [_specifiers addObject:alfieGroupSpecifier]; + + PSSpecifier* alfieDonateSpecifier = [PSSpecifier preferenceSpecifierNamed:@"Donate to alfiecg_dev" + target:self + set:nil + get:nil + detail:nil + cell:PSButtonCell + edit:nil]; + alfieDonateSpecifier.identifier = @"donateToAlfie"; + [alfieDonateSpecifier setProperty:@YES forKey:@"enabled"]; + alfieDonateSpecifier.buttonAction = @selector(donateToAlfiePressed); + [_specifiers addObject:alfieDonateSpecifier]; + + PSSpecifier* opaGroupSpecifier = [PSSpecifier emptyGroupSpecifier]; + opaGroupSpecifier.name = @"Opa"; + [opaGroupSpecifier setProperty:@"Opa developed the ChOma library, helped with automating the bug using it and integrated it into TrollStore." forKey:@"footerText"]; + [_specifiers addObject:opaGroupSpecifier]; + + PSSpecifier* opaDonateSpecifier = [PSSpecifier preferenceSpecifierNamed:@"Donate to opa334" + target:self + set:nil + get:nil + detail:nil + cell:PSButtonCell + edit:nil]; + opaDonateSpecifier.identifier = @"donateToOpa"; + [opaDonateSpecifier setProperty:@YES forKey:@"enabled"]; + opaDonateSpecifier.buttonAction = @selector(donateToOpaPressed); + [_specifiers addObject:opaDonateSpecifier]; + } + [(UINavigationItem *)self.navigationItem setTitle:@"Donate"]; + return _specifiers; +} + +@end \ No newline at end of file diff --git a/TrollStore/TSSettingsListController.m b/TrollStore/TSSettingsListController.m index 8792a39..bca25b7 100644 --- a/TrollStore/TSSettingsListController.m +++ b/TrollStore/TSSettingsListController.m @@ -5,6 +5,7 @@ #import #import "TSInstallationController.h" #import "TSSettingsAdvancedListController.h" +#import "TSDonateListController.h" @interface NSUserDefaults (Private) - (instancetype)_initWithSuiteName:(NSString *)suiteName container:(NSURL *)container; @@ -207,6 +208,17 @@ extern NSUserDefaults* trollStoreUserDefaults(void); [advancedLinkSpecifier setProperty:@YES forKey:@"enabled"]; [_specifiers addObject:advancedLinkSpecifier]; + PSSpecifier* donateSpecifier = [PSSpecifier preferenceSpecifierNamed:@"Donate" + target:self + set:nil + get:nil + detail:nil + cell:PSLinkListCell + edit:nil]; + donateSpecifier.detailControllerClass = [TSDonateListController class]; + [donateSpecifier setProperty:@YES forKey:@"enabled"]; + [_specifiers addObject:donateSpecifier]; + // Uninstall TrollStore PSSpecifier* uninstallTrollStoreSpecifier = [PSSpecifier preferenceSpecifierNamed:@"Uninstall TrollStore" target:self