VideoPane插件破解 - 基于正版锁定UUID
VideoPane插件破解 - 基于正版锁定uuid
步骤:
正版uuid从老外泄漏~~
1.编译成dylib
放到 /usr/lib
目录
2.复制一份 VideoPane.dylib
原版到 VideoPane.backup
3.十六进制工具修改 VideoPane.dylib
---> /usr/lib/libMobileGestalt.dylib
改为 /usr/lib/libVidePanePass.dylib
实现代码如下:
#import <dlfcn.h>
#import <string.h>
extern "C" CFPropertyListRef MGCopyAnswer(CFStringRef property);
extern "C" unsigned char CC_MD5(const void *data, uint32_t len, unsigned char *md);
CFPropertyListRef MGCopyAnswer(CFStringRef property){
NSLog(@"[****]into MGCopyAnswer........");
CFPropertyListRef value = nil;
if (!strcmp(CFStringGetCStringPtr(property, kCFStringEncodingMacRoman), "UniqueDeviceID")) {
value = @"2731382773dbe08206ca8102977c0498d4941fa4"; //正版uuid
}else{
void *handle = dlopen("/usr/lib/libMobileGestalt.dylib", RTLD_GLOBAL | RTLD_LAZY);
/*
CFPropertyListRef (*pfnMGCopyAnswer)(CFStringRef) = (CFPropertyListRef (*)(CFStringRef))dlsym(handle, "MGCopyAnswer");
if (pfnMGCopyAnswer) {
value = pfnMGCopyAnswer(property);
}
*/
static CFStringRef (*$MGCopyAnswer)(CFStringRef);
$MGCopyAnswer = reinterpret_cast<CFStringRef (*)(CFStringRef)>(dlsym(handle, "MGCopyAnswer"));
if ($MGCopyAnswer) {
value = $MGCopyAnswer(property);
}
dlclose(handle);
}
return value;
}
unsigned char CC_MD5(const void *data, uint32_t len, unsigned char *md){
NSLog(@"[****]into CC_MD5........");
unsigned char ret = nil;
// 主程序大小
if (len == 0x53af0) {
NSLog(@"[****]计算主程序md5");
NSData *orig_data = [NSData dataWithContentsOfFile:@"/Library/MobileSubstrate/DynamicLibraries/VideoPane.backup"];
data = [orig_data bytes];
}
void *handle = dlopen("/usr/lib/system/libcommonCrypto.dylib", RTLD_GLOBAL | RTLD_LAZY);
/*
unsigned char (*pfnCC_MD5)(const void *data, uint32_t len, unsigned char *md) = (unsigned char (*)(const void *data, uint32_t len, unsigned char *md))dlsym(handle, "CC_MD5");
if (pfnCC_MD5) {
ret = pfnCC_MD5(data, len, md);
}
*/
static unsigned char (*$CC_MD5)(const void *data, uint32_t len, unsigned char *md);
$CC_MD5 = reinterpret_cast<unsigned char (*)(const void *data, uint32_t len, unsigned char *md)>(dlsym(handle, "CC_MD5"));
if ($CC_MD5) {
ret = $CC_MD5(data, len, md);
}
dlclose(handle);
return ret;
}
__attribute__ ((constructor)) static void initialize(){
NSLog(@"[****]VidePanePass load success!!!");
}
/*
__attribute__ ((destructor)) static void finalizer() {
NSLog(@"[****]VidePanePass unload success!!!");
}
*/
看看