|
@@ -15,7 +15,7 @@ extern const char *__progname;
|
|
static BOOL Enabled;
|
|
static BOOL Enabled;
|
|
static __strong NSString* kCurrentiOSVersion = nil;
|
|
static __strong NSString* kCurrentiOSVersion = nil;
|
|
static __strong NSString* kCurrentDeviceType = nil;
|
|
static __strong NSString* kCurrentDeviceType = nil;
|
|
-const char * kCurrentiOSVersionSpoof;
|
|
|
|
|
|
+static __strong NSString* kCurrentiOSVersionSpoof = nil; //no idea why theres were chars, just overcomplicating things.
|
|
const char * kCurrentDeviceTypeSpoof;
|
|
const char * kCurrentDeviceTypeSpoof;
|
|
static __strong NSString* kUserAgent = @"User-Agent";
|
|
static __strong NSString* kUserAgent = @"User-Agent";
|
|
static __strong NSString* kFormatHeader = @"/%@ ";
|
|
static __strong NSString* kFormatHeader = @"/%@ ";
|
|
@@ -29,11 +29,12 @@ static __strong NSString* kFormatHeader = @"/%@ ";
|
|
NSDictionary *LowerInstallPrefs = [[[NSDictionary alloc] initWithContentsOfFile:@PLIST_PATH_Settings]?:[NSDictionary dictionary] copy];
|
|
NSDictionary *LowerInstallPrefs = [[[NSDictionary alloc] initWithContentsOfFile:@PLIST_PATH_Settings]?:[NSDictionary dictionary] copy];
|
|
//HBLogInfo(@"###LowerInstallPrefs: %@", LowerInstallPrefs);
|
|
//HBLogInfo(@"###LowerInstallPrefs: %@", LowerInstallPrefs);
|
|
Enabled = (BOOL)[[LowerInstallPrefs objectForKey:@"Enabled"]?:@YES boolValue];
|
|
Enabled = (BOOL)[[LowerInstallPrefs objectForKey:@"Enabled"]?:@YES boolValue];
|
|
|
|
+ kCurrentiOSVersionSpoof = [LowerInstallPrefs objectForKey:@"SpoofVersion"]?:@"11.1";
|
|
if(Enabled && field && value && kUserAgent && [field isEqualToString:kUserAgent] && kCurrentiOSVersion && kCurrentiOSVersionSpoof) {
|
|
if(Enabled && field && value && kUserAgent && [field isEqualToString:kUserAgent] && kCurrentiOSVersion && kCurrentiOSVersionSpoof) {
|
|
HBLogInfo(@"currentiOSVersion: %@ value: %@", kCurrentiOSVersion, value);
|
|
HBLogInfo(@"currentiOSVersion: %@ value: %@", kCurrentiOSVersion, value);
|
|
if([value rangeOfString:kCurrentiOSVersion].location != NSNotFound) {
|
|
if([value rangeOfString:kCurrentiOSVersion].location != NSNotFound) {
|
|
//HBLogInfo(@"### are we inside here???");
|
|
//HBLogInfo(@"### are we inside here???");
|
|
- value = [value stringByReplacingOccurrencesOfString:[NSString stringWithFormat:kFormatHeader, kCurrentiOSVersion] withString:[NSString stringWithFormat:kFormatHeader, [NSString stringWithUTF8String:kCurrentiOSVersionSpoof]]];
|
|
|
|
|
|
+ value = [value stringByReplacingOccurrencesOfString:[NSString stringWithFormat:kFormatHeader, kCurrentiOSVersion] withString:[NSString stringWithFormat:kFormatHeader, kCurrentiOSVersionSpoof]];
|
|
//HBLogInfo(@"### are we inside here??? 2");
|
|
//HBLogInfo(@"### are we inside here??? 2");
|
|
//value = [value stringByReplacingOccurrencesOfString:[NSString stringWithFormat:kFormatHeader, kCurrentDeviceType] withString:[NSString stringWithFormat:kFormatHeader, [NSString stringWithUTF8String:kCurrentDeviceTypeSpoof]]];
|
|
//value = [value stringByReplacingOccurrencesOfString:[NSString stringWithFormat:kFormatHeader, kCurrentDeviceType] withString:[NSString stringWithFormat:kFormatHeader, [NSString stringWithUTF8String:kCurrentDeviceTypeSpoof]]];
|
|
//HBLogInfo(@"### are we inside here??? 3");
|
|
//HBLogInfo(@"### are we inside here??? 3");
|
|
@@ -132,10 +133,10 @@ static void settingsChangedLowerInstall()
|
|
@autoreleasepool {
|
|
@autoreleasepool {
|
|
NSDictionary *LowerInstallPrefs = [[[NSDictionary alloc] initWithContentsOfFile:@PLIST_PATH_Settings]?:[NSDictionary dictionary] copy];
|
|
NSDictionary *LowerInstallPrefs = [[[NSDictionary alloc] initWithContentsOfFile:@PLIST_PATH_Settings]?:[NSDictionary dictionary] copy];
|
|
Enabled = (BOOL)[[LowerInstallPrefs objectForKey:@"Enabled"]?:@YES boolValue];
|
|
Enabled = (BOOL)[[LowerInstallPrefs objectForKey:@"Enabled"]?:@YES boolValue];
|
|
- NSString* CurrentiOSVersionSpoof = [LowerInstallPrefs objectForKey:@"SpoofVersion"]?:@"11.1";
|
|
|
|
- kCurrentiOSVersionSpoof = (const char*)(malloc([CurrentiOSVersionSpoof length]));
|
|
|
|
- memcpy((void*)kCurrentiOSVersionSpoof,(const void*)CurrentiOSVersionSpoof.UTF8String, [CurrentiOSVersionSpoof length]);
|
|
|
|
- ((char*)kCurrentiOSVersionSpoof)[[CurrentiOSVersionSpoof length]] = '\0';
|
|
|
|
|
|
+ kCurrentiOSVersionSpoof = [LowerInstallPrefs objectForKey:@"SpoofVersion"]?:@"11.1";
|
|
|
|
+ //kCurrentiOSVersionSpoof = (const char*)(malloc([CurrentiOSVersionSpoof length]));
|
|
|
|
+ //memcpy((void*)kCurrentiOSVersionSpoof,(const void*)CurrentiOSVersionSpoof.UTF8String, [CurrentiOSVersionSpoof length]);
|
|
|
|
+ //((char*)kCurrentiOSVersionSpoof)[[CurrentiOSVersionSpoof length]] = '\0';
|
|
NSString* CurrentDeviceTypeSpoof = [LowerInstallPrefs objectForKey:@"SpoofDevice"]?:@"AppleTV5,3";
|
|
NSString* CurrentDeviceTypeSpoof = [LowerInstallPrefs objectForKey:@"SpoofDevice"]?:@"AppleTV5,3";
|
|
kCurrentDeviceTypeSpoof = (const char*)(malloc([CurrentDeviceTypeSpoof length]));
|
|
kCurrentDeviceTypeSpoof = (const char*)(malloc([CurrentDeviceTypeSpoof length]));
|
|
memcpy((void*)kCurrentDeviceTypeSpoof,(const void*)CurrentDeviceTypeSpoof.UTF8String, [CurrentDeviceTypeSpoof length]);
|
|
memcpy((void*)kCurrentDeviceTypeSpoof,(const void*)CurrentDeviceTypeSpoof.UTF8String, [CurrentDeviceTypeSpoof length]);
|