-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathmain.m
41 lines (28 loc) · 871 Bytes
/
main.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
38
39
40
#import <objc/runtime.h>
#import <Foundation/Foundation.h>
#include <AppKit/AppKit.h>
//
// CCLicenseStore
//
@interface CCLicenseStorePatched : NSObject
- (long long)numberOfTrialDays;
@end
@implementation CCLicenseStorePatched
+ (void)load {
Class origClass = NSClassFromString(@"CCLicenseStore");
method_exchangeImplementations(
class_getInstanceMethod(origClass, @selector(numberOfTrialDays)),
class_getInstanceMethod(NSClassFromString(@"CCLicenseStorePatched"), @selector(numberOfTrialDays))
);
method_exchangeImplementations(
class_getInstanceMethod(origClass, @selector(isProductLicensed)),
class_getInstanceMethod(NSClassFromString(@"CCLicenseStorePatched"), @selector(isProductLicensed))
);
}
- (long long)numberOfTrialDays {
return 9000;
}
- (bool)isProductLicensed {
return TRUE;
}
@end