-
Notifications
You must be signed in to change notification settings - Fork 11
/
SignedCert.m
37 lines (36 loc) · 1.4 KB
/
SignedCert.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#import <Foundation/Foundation.h>
#import "SignedCert.h"
@implementation SignedCert : NSObject
- (id)init: (NSDictionary*) plist {
self = [super init];
if (self) {
_appId = plist[@"AppIDName"];
NSLog(@"[CertRemainTime] 1:_appId = %@", _appId);
if ([_appId rangeOfString:@"CY- "].location != NSNotFound) { // Cydia impactor/Ext3nder/ReProvision
_appId = [_appId componentsSeparatedByString:@"CY- "][1];
NSLog(@"[CertRemainTime] CY:_appId = %@", _appId);
}
if ([_appId rangeOfString:@"XC- "].location != NSNotFound) {
_appId = [_appId componentsSeparatedByString:@"XC- "][1]; // Xcode
NSLog(@"[CertRemainTime] XC:_appId = %@", _appId);
}
if ([_appId rangeOfString:@"KYESoundsAPP"].location != NSNotFound) {
_appId = @"tweakbox"; // TweakBox - 13/3/2019
NSLog(@"[CertRemainTime] KYESoundsAPP:_appId = %@", _appId);
}
if ([_appId rangeOfString:@"admin test"].location != NSNotFound) {
_appId = @"ignition"; // Ignition - 13/3/2019
NSLog(@"[CertRemainTime] admin test:_appId = %@", _appId);
}
if ([_appId rangeOfString:@"shandian"].location != NSNotFound) {
_appId = @"ignition"; // Ignition - 13/3/2019
NSLog(@"[CertRemainTime] shandian:_appId = %@", _appId);
}
_appId = [_appId lowercaseString];
_ttlDays = [plist[@"TimeToLive"] stringValue];
_expireDate = [plist objectForKey:@"ExpirationDate"];
_createDate = [plist objectForKey:@"CreationDate"];
}
return self;
}
@end