/*
VidePane 1.1.5  Cracked By PiaoYun
http://www.chinapyg.com
http://www.dllhook.com
2015-08-05
*/
#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!!!");
}
*/


正版uuid从老外泄漏~~


0.编译成dylib 放到 /usr/lib目录

1.复制一份 VideoPane.dylib  原版到 VideoPane.backup

2.十六进制工具修改 VideoPane.dylib   

---> /usr/lib/libMobileGestalt.dylib   改为  /usr/lib/libVidePanePass.dylib

你可能感兴趣的文章

评论区

发表评论

必填

选填

选填

必填

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。