mirror of
https://github.com/NohamR/Tweaks.git
synced 2026-07-11 19:10:00 +00:00
Add GPXViewer2
This commit is contained in:
3
GPXViewer2/.gitignore
vendored
Normal file
3
GPXViewer2/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
.theos/
|
||||||
|
packages/
|
||||||
|
.DS_Store
|
||||||
7
GPXViewer2/GPXViewer2.plist
Normal file
7
GPXViewer2/GPXViewer2.plist
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
Filter = {
|
||||||
|
Bundles = (
|
||||||
|
"family.gander.gpxviewer2",
|
||||||
|
);
|
||||||
|
};
|
||||||
|
}
|
||||||
13
GPXViewer2/Makefile
Normal file
13
GPXViewer2/Makefile
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
TARGET = iphone:latest:14.0
|
||||||
|
INSTALL_TARGET_PROCESSES = gpxviewer2
|
||||||
|
ARCHS = arm64
|
||||||
|
|
||||||
|
include $(THEOS)/makefiles/common.mk
|
||||||
|
|
||||||
|
TWEAK_NAME = GPXViewer2
|
||||||
|
|
||||||
|
GPXViewer2_FILES = Tweak.x
|
||||||
|
GPXViewer2_CFLAGS = -fobjc-arc
|
||||||
|
GPXViewer2_FRAMEWORKS = Foundation UIKit
|
||||||
|
|
||||||
|
include $(THEOS_MAKE_PATH)/tweak.mk
|
||||||
53
GPXViewer2/Tweak.x
Normal file
53
GPXViewer2/Tweak.x
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#import <CommonCrypto/CommonCrypto.h>
|
||||||
|
#import <CloudKit/CloudKit.h>
|
||||||
|
#import <mach-o/dyld.h>
|
||||||
|
#import <string.h>
|
||||||
|
|
||||||
|
%hook CKContainer
|
||||||
|
+ (id)defaultContainer { return nil; }
|
||||||
|
+ (id)containerWithIdentifier:(id)arg1 { return nil; }
|
||||||
|
%end
|
||||||
|
|
||||||
|
%ctor {
|
||||||
|
@autoreleasepool {
|
||||||
|
// Device UUID
|
||||||
|
NSString *deviceUUID = [[[UIDevice currentDevice] identifierForVendor] UUIDString];
|
||||||
|
if (!deviceUUID) deviceUUID = @"<no-device-uuid>";
|
||||||
|
|
||||||
|
// Compute SHA256 hashes for all product keys
|
||||||
|
NSString *salt = @"-gpxviewerbyjg-";
|
||||||
|
NSArray *productKeys = @[
|
||||||
|
// @"family.gander.gpxviewer2.iap.nc.coffee",
|
||||||
|
// @"family.gander.gpxviewer2.iap.nc.hikingsnack",
|
||||||
|
@"family.gander.gpxviewer2.iap.nc.hikingmeal",
|
||||||
|
// @"family.gander.gpxviewer2.easteregg.secret.access",
|
||||||
|
// @"family.gander.gpxviewer2.iap.nc.level1",
|
||||||
|
// @"family.gander.gpxviewer2.iap.nc.level2",
|
||||||
|
// @"family.gander.gpxviewer2.iap.nc.level3",
|
||||||
|
];
|
||||||
|
|
||||||
|
NSMutableArray *hashes = [NSMutableArray array];
|
||||||
|
for (NSString *key in productKeys) {
|
||||||
|
NSString *input = [NSString stringWithFormat:@"%@%@%@", deviceUUID, salt, key];
|
||||||
|
const char *cstr = [input UTF8String];
|
||||||
|
unsigned char digest[CC_SHA256_DIGEST_LENGTH];
|
||||||
|
CC_SHA256(cstr, (CC_LONG)strlen(cstr), digest);
|
||||||
|
NSMutableString *hex = [NSMutableString stringWithCapacity:CC_SHA256_DIGEST_LENGTH * 2];
|
||||||
|
for (NSUInteger i = 0; i < CC_SHA256_DIGEST_LENGTH; i++) {
|
||||||
|
[hex appendFormat:@"%02x", digest[i]];
|
||||||
|
}
|
||||||
|
[hashes addObject:hex];
|
||||||
|
}
|
||||||
|
|
||||||
|
// // empty hashes array
|
||||||
|
// NSMutableArray *hashes = [NSMutableArray array];
|
||||||
|
|
||||||
|
[[NSUserDefaults standardUserDefaults] setObject:hashes
|
||||||
|
forKey:@"proversionmanager.storage.purchasedproducts"];
|
||||||
|
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||||
|
|
||||||
|
NSLog(@"[GPXViewer2] Injected %lu product hashes", (unsigned long)[hashes count]);
|
||||||
|
}
|
||||||
|
}
|
||||||
9
GPXViewer2/control
Normal file
9
GPXViewer2/control
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
Package: com.rev.gpxviewer2unlock
|
||||||
|
Name: GPXViewer2 Unlock
|
||||||
|
Version: 1.0
|
||||||
|
Architecture: iphoneos-arm
|
||||||
|
Description: Unlock all IAP products and easter egg in GPXViewer 2
|
||||||
|
Maintainer: rev
|
||||||
|
Author: rev
|
||||||
|
Section: Tweaks
|
||||||
|
Depends: firmware (>= 14.0)
|
||||||
Reference in New Issue
Block a user