安全OC 底层系统层知识

Cornerstone4.0破解

2018-05-23  本文已影响36人  liboxiang

该破解方法为代码注入,修改app内的方法实现
参考:https://juejin.im/post/5acdec2d6fb9a028cb2dfe0a

//主要代码
#import "ForCornerstoneTrail.h"
#import "JRSwizzle.h"

@implementation ForCornerstoneTrail

+ (void)load
{
    Class class = objc_getClass("ZTrialPeriod");
    [class jr_swizzleMethod:@selector(hasExpired) withMethod:@selector(xy_hasExpired) error:nil];
    [class jr_swizzleMethod:@selector(remaining) withMethod:@selector(xy_remaining) error:nil];
    NSLog(@"ForCornerstoneTrail success");
    for (int i = 0; i < 100; i++) {
        NSLog(@"ForCornerstoneTrail success");
    }
}
- (BOOL)xy_hasExpired
{
    return NO;
}
- (unsigned long long)xy_remaining
{
    return 1;
}
E4EDB18A-E4E6-4EF2-AF16-08A59F8A6BDE.png
上一篇下一篇

猜你喜欢

热点阅读