Repository: CodeTips/BaiduNetdiskPlugin-macOS Branch: master Commit: 4f76434354ec Files: 37 Total size: 43.9 KB Directory structure: gitextract_afobkd10/ ├── .gitignore ├── LICENSE ├── Other/ │ ├── Install.sh │ ├── Products/ │ │ └── Debug/ │ │ └── libBaiduNetdiskPlugin.framework/ │ │ ├── Headers/ │ │ │ └── libBaiduNetdiskPlugin.h │ │ ├── Modules/ │ │ │ └── module.modulemap │ │ ├── Resources/ │ │ │ └── Info.plist │ │ ├── Versions/ │ │ │ ├── A/ │ │ │ │ ├── Headers/ │ │ │ │ │ └── libBaiduNetdiskPlugin.h │ │ │ │ ├── Modules/ │ │ │ │ │ └── module.modulemap │ │ │ │ ├── Resources/ │ │ │ │ │ └── Info.plist │ │ │ │ └── libBaiduNetdiskPlugin │ │ │ └── Current/ │ │ │ ├── Headers/ │ │ │ │ └── libBaiduNetdiskPlugin.h │ │ │ ├── Modules/ │ │ │ │ └── module.modulemap │ │ │ ├── Resources/ │ │ │ │ └── Info.plist │ │ │ └── libBaiduNetdiskPlugin │ │ └── libBaiduNetdiskPlugin │ ├── Uninstall.sh │ └── insert_dylib ├── README.md ├── Sources/ │ ├── BaiduNetdisk+Hook.h │ ├── BaiduNetdisk+Hook.m │ ├── CTSwizzledHelper.h │ └── CTSwizzledHelper.m ├── libBaiduNetdiskPlugin/ │ ├── Info.plist │ ├── libBaiduNetdiskPlugin.h │ └── main.mm └── libBaiduNetdiskPlugin.xcodeproj/ ├── project.pbxproj ├── project.xcworkspace/ │ ├── contents.xcworkspacedata │ ├── xcshareddata/ │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata/ │ ├── linden.xcuserdatad/ │ │ └── UserInterfaceState.xcuserstate │ ├── loveletter.xcuserdatad/ │ │ └── UserInterfaceState.xcuserstate │ └── timeaside.xcuserdatad/ │ └── UserInterfaceState.xcuserstate ├── xcshareddata/ │ └── xcschemes/ │ └── libBaiduNetdiskPlugin.xcscheme └── xcuserdata/ ├── linden.xcuserdatad/ │ └── xcschemes/ │ ├── libBaiduNetdiskPlugin.xcscheme │ └── xcschememanagement.plist ├── loveletter.xcuserdatad/ │ └── xcschemes/ │ └── xcschememanagement.plist └── timeaside.xcuserdatad/ └── xcschemes/ ├── libBaiduNetdiskPlugin.xcscheme └── xcschememanagement.plist ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ .DS_Store ================================================ FILE: LICENSE ================================================ MIT License Copyright (c) 2018 Loveletter Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: Other/Install.sh ================================================ #!/bin/bash app_name="BaiduNetdisk_mac" shell_path="$(dirname "$0")" wechat_path="/Applications/BaiduNetdisk_mac.app" framework_name="libBaiduNetdiskPlugin" app_bundle_path="/Applications/${app_name}.app/Contents/MacOS" app_executable_path="${app_bundle_path}/${app_name}" app_executable_backup_path="${app_executable_path}_backup" framework_path="${app_bundle_path}/${framework_name}.framework" # 备份原始可执行文件 if [ ! -f "$app_executable_backup_path" ] then cp "$app_executable_path" "$app_executable_backup_path" result="y" else read -t 150 -p "已安装补丁包,是否覆盖?[y/n]:" result fi if [[ "$result" == 'y' ]]; then cp -r "${shell_path}/Products/Debug/${framework_name}.framework" ${app_bundle_path} ${shell_path}/insert_dylib --all-yes "${framework_path}/${framework_name}" "$app_executable_backup_path" "$app_executable_path" echo -e "\n\tDone!" fi ================================================ FILE: Other/Products/Debug/libBaiduNetdiskPlugin.framework/Headers/libBaiduNetdiskPlugin.h ================================================ // // libBaiduNetdiskPlugin.h // libBaiduNetdiskPlugin // // Copyright © 2018 CodeTips. All rights reserved. // #import //! Project version number for libBaiduNetdiskPlugin. FOUNDATION_EXPORT double libBaiduNetdiskPluginVersionNumber; //! Project version string for libBaiduNetdiskPlugin. FOUNDATION_EXPORT const unsigned char libBaiduNetdiskPluginVersionString[]; @interface BandwidthManager : NSObject @property(nonatomic) unsigned long long maxBytesPerSecond; // @synthesize maxBytesPerSecond=_maxBytesPerSecond; - (void)request:(long long)arg1 increaseBytesTransferred:(unsigned long long)arg2; @end @interface BDUserPersonalInfo : NSObject @property(nonatomic) double svipExpireTime; // @synthesize @end @interface BDUser : NSObject - (BOOL)isSVip; @end @interface FileTransSpeedUpTrialManager : NSObject @property(nonatomic) long long probationaryDuration; + (id)sharedInstance; - (id)trialToken; - (void)resetTrialStatus; - (void)checkProbationary; - (void)startTrial; @end @interface ALModel : NSObject @end @interface SpeedUpTrialModel : ALModel @property(copy, nonatomic) NSString *token; // @synthesize token=_token; @end @interface AppVersionManager : NSObject - (unsigned long long)checkUpdate; @end ================================================ FILE: Other/Products/Debug/libBaiduNetdiskPlugin.framework/Modules/module.modulemap ================================================ framework module libBaiduNetdiskPlugin { umbrella header "libBaiduNetdiskPlugin.h" export * module * { export * } } ================================================ FILE: Other/Products/Debug/libBaiduNetdiskPlugin.framework/Resources/Info.plist ================================================ BuildMachineOSBuild 18G1012 CFBundleDevelopmentRegion en CFBundleExecutable libBaiduNetdiskPlugin CFBundleIdentifier Net.CodeTips.libBaiduNetdiskPlugin CFBundleInfoDictionaryVersion 6.0 CFBundleName libBaiduNetdiskPlugin CFBundlePackageType FMWK CFBundleShortVersionString 1.0 CFBundleSupportedPlatforms MacOSX CFBundleVersion 1 DTCompiler com.apple.compilers.llvm.clang.1_0 DTPlatformBuild 11B52 DTPlatformVersion GM DTSDKBuild 19B81 DTSDKName macosx10.15 DTXcode 1120 DTXcodeBuild 11B52 LSMinimumSystemVersion 10.13 NSHumanReadableCopyright Copyright © 2018 CodeTips. All rights reserved. ================================================ FILE: Other/Products/Debug/libBaiduNetdiskPlugin.framework/Versions/A/Headers/libBaiduNetdiskPlugin.h ================================================ // // libBaiduNetdiskPlugin.h // libBaiduNetdiskPlugin // // Copyright © 2018 CodeTips. All rights reserved. // #import //! Project version number for libBaiduNetdiskPlugin. FOUNDATION_EXPORT double libBaiduNetdiskPluginVersionNumber; //! Project version string for libBaiduNetdiskPlugin. FOUNDATION_EXPORT const unsigned char libBaiduNetdiskPluginVersionString[]; @interface BandwidthManager : NSObject @property(nonatomic) unsigned long long maxBytesPerSecond; // @synthesize maxBytesPerSecond=_maxBytesPerSecond; - (void)request:(long long)arg1 increaseBytesTransferred:(unsigned long long)arg2; @end @interface BDUserPersonalInfo : NSObject @property(nonatomic) double svipExpireTime; // @synthesize @end @interface BDUser : NSObject - (BOOL)isSVip; @end @interface FileTransSpeedUpTrialManager : NSObject @property(nonatomic) long long probationaryDuration; + (id)sharedInstance; - (id)trialToken; - (void)resetTrialStatus; - (void)checkProbationary; - (void)startTrial; @end @interface ALModel : NSObject @end @interface SpeedUpTrialModel : ALModel @property(copy, nonatomic) NSString *token; // @synthesize token=_token; @end @interface AppVersionManager : NSObject - (unsigned long long)checkUpdate; @end ================================================ FILE: Other/Products/Debug/libBaiduNetdiskPlugin.framework/Versions/A/Modules/module.modulemap ================================================ framework module libBaiduNetdiskPlugin { umbrella header "libBaiduNetdiskPlugin.h" export * module * { export * } } ================================================ FILE: Other/Products/Debug/libBaiduNetdiskPlugin.framework/Versions/A/Resources/Info.plist ================================================ BuildMachineOSBuild 18G1012 CFBundleDevelopmentRegion en CFBundleExecutable libBaiduNetdiskPlugin CFBundleIdentifier Net.CodeTips.libBaiduNetdiskPlugin CFBundleInfoDictionaryVersion 6.0 CFBundleName libBaiduNetdiskPlugin CFBundlePackageType FMWK CFBundleShortVersionString 1.0 CFBundleSupportedPlatforms MacOSX CFBundleVersion 1 DTCompiler com.apple.compilers.llvm.clang.1_0 DTPlatformBuild 11B52 DTPlatformVersion GM DTSDKBuild 19B81 DTSDKName macosx10.15 DTXcode 1120 DTXcodeBuild 11B52 LSMinimumSystemVersion 10.13 NSHumanReadableCopyright Copyright © 2018 CodeTips. All rights reserved. ================================================ FILE: Other/Products/Debug/libBaiduNetdiskPlugin.framework/Versions/Current/Headers/libBaiduNetdiskPlugin.h ================================================ // // libBaiduNetdiskPlugin.h // libBaiduNetdiskPlugin // // Copyright © 2018 CodeTips. All rights reserved. // #import //! Project version number for libBaiduNetdiskPlugin. FOUNDATION_EXPORT double libBaiduNetdiskPluginVersionNumber; //! Project version string for libBaiduNetdiskPlugin. FOUNDATION_EXPORT const unsigned char libBaiduNetdiskPluginVersionString[]; @interface BandwidthManager : NSObject @property(nonatomic) unsigned long long maxBytesPerSecond; // @synthesize maxBytesPerSecond=_maxBytesPerSecond; - (void)request:(long long)arg1 increaseBytesTransferred:(unsigned long long)arg2; @end @interface BDUserPersonalInfo : NSObject @property(nonatomic) double svipExpireTime; // @synthesize @end @interface BDUser : NSObject - (BOOL)isSVip; @end @interface FileTransSpeedUpTrialManager : NSObject @property(nonatomic) long long probationaryDuration; + (id)sharedInstance; - (id)trialToken; - (void)resetTrialStatus; - (void)checkProbationary; - (void)startTrial; @end @interface ALModel : NSObject @end @interface SpeedUpTrialModel : ALModel @property(copy, nonatomic) NSString *token; // @synthesize token=_token; @end @interface AppVersionManager : NSObject - (unsigned long long)checkUpdate; @end ================================================ FILE: Other/Products/Debug/libBaiduNetdiskPlugin.framework/Versions/Current/Modules/module.modulemap ================================================ framework module libBaiduNetdiskPlugin { umbrella header "libBaiduNetdiskPlugin.h" export * module * { export * } } ================================================ FILE: Other/Products/Debug/libBaiduNetdiskPlugin.framework/Versions/Current/Resources/Info.plist ================================================ BuildMachineOSBuild 18G1012 CFBundleDevelopmentRegion en CFBundleExecutable libBaiduNetdiskPlugin CFBundleIdentifier Net.CodeTips.libBaiduNetdiskPlugin CFBundleInfoDictionaryVersion 6.0 CFBundleName libBaiduNetdiskPlugin CFBundlePackageType FMWK CFBundleShortVersionString 1.0 CFBundleSupportedPlatforms MacOSX CFBundleVersion 1 DTCompiler com.apple.compilers.llvm.clang.1_0 DTPlatformBuild 11B52 DTPlatformVersion GM DTSDKBuild 19B81 DTSDKName macosx10.15 DTXcode 1120 DTXcodeBuild 11B52 LSMinimumSystemVersion 10.13 NSHumanReadableCopyright Copyright © 2018 CodeTips. All rights reserved. ================================================ FILE: Other/Uninstall.sh ================================================ # !/bin/bash app_name="BaiduNetdisk_mac" framework_name="libBaiduNetdiskPlugin" app_bundle_path="/Applications/${app_name}.app/Contents/MacOS" app_executable_path="${app_bundle_path}/${app_name}" app_executable_backup_path="${app_executable_path}_backup" framework_path="${app_bundle_path}/${framework_name}.framework" if [ -f "$app_executable_backup_path" ] then rm "$app_executable_path" rm -rf "$framework_path" mv "$app_executable_backup_path" "$app_executable_path" echo -e "\n\t卸载成功" else echo -e "\n\t未发现补丁包" fi ================================================ FILE: README.md ================================================ # BaiduNetdiskPlugin-macOS ![platform](https://img.shields.io/badge/platform-macos-lightgrey.svg) [![GitHub license](https://img.shields.io/github/license/CodeTips/BaiduNetdiskPlugin-macOS.svg)](https://github.com/CodeTips/BaiduNetdiskPlugin-macOS/blob/master/LICENSE) ![baidubetdiskplugin](./Other/Screenshots/baidubetdiskplugin.png) ![baidubetdiskplugin_1](./Other/Screenshots/baidubetdiskplugin_1.png) ### 说明 * **20191118更新,去掉自动检查更新功能。由于个人精力和能力有限,此项目不再更新支持新版网盘。如使用,请下载2.2.2版本 [官方下载地址][1]。** * **连续下载10G数据后,会被限制速度到单文件20kb。所以,这个补丁偶尔用用就行,别一直用。** * **免责声明:本项目旨在学习macOS 逆向的一点实践,不可使用于商业和个人其他意图。若使用不当,均由个人承担。** * **本项目只用于学习和交流,有能力的请购买官方VIP服务。** * **包含功能:本地SVIP图标显示,去除本地下载速度限制(服务端已添加限制单文件200kb左右),去除本地极速下载试用时长限制,倒计时永久显示8秒(服务的token大概3分钟过期。意思就是虽然不倒计时,但是3分钟后速度还是会降下来)。** * **破解完成后,下载速度还是没有变化,可能是资源热度问题,或者是你已经进入百度网盘黑名单。** * **此项目不再更新,有问题请Issue中找答案,或者添加我微信(博客关于有二维码),很高兴能帮到你。** * **不会用的伸手狗请滚粗,别出问题后在这里乱咬人。** ### 安装 1. 懒人安装 * 打开`应用程序`->`实用工具`->`Terminal(终端)`,执行以下命令即可。(需要git支持) `cd ~/Downloads && git clone https://github.com/CodeTips/BaiduNetdiskPlugin-macOS.git && ./BaiduNetdiskPlugin-macOS/Other/Install.sh` 2. 普通安装 * 点击`clone or download`下载项目并解压,打开`Terminal(终端)`,拖动解压后`Install.sh` 文件(在 Other 文件夹中)到 Terminal 回车即可。 3. 重编译安装 * 点击`clone or download`下载项目,解压运行`libBaiduNetdiskPlugin.xcodeproj`,然后`Edit Schemes`->`Executable`->`Other`->选择`百度网盘`。然后运行工程,因为百度网盘有 VMProtect加壳,运行后会有以下提示: ![baidubetdiskplugin_2](./Other/Screenshots/baidubetdiskplugin_2.png) 直接点击OK。 * 然后运行或者重启`百度网盘`,如果用户VIP状态改变,证明成功。 ### 卸载 1. 如果第一种方法安装的。 * 打开`应用程序`->`实用工具`->`Terminal(终端)`,执行以下命令即可。`cd ~/Downloads && ./BaiduNetdiskPlugin-macOS/Other/Uninstall.sh` 2. 通用卸载方法。 * 打开`应用程序`->`实用工具`->`Terminal(终端)`,执行以下命令即可。`cd /Applications/BaiduNetdisk_mac.app/Contents/MacOS/ && rm -rf BaiduNetdisk_mac libBaiduNetdiskPlugin.framework && mv BaiduNetdisk_mac_backup BaiduNetdisk_mac` **以上方法可以完全卸载此功能。如果还是不行的话,那么抱歉,可能您需要重新安装了** ### 依赖 * [insert_dylib](https://github.com/Tyilo/insert_dylib) ### 最后 * 使用愉快~ [1]: http://issuecdn.baidupcs.com/issue/netdisk/MACguanjia/BaiduNetdisk_mac_2.2.2.dmg ================================================ FILE: Sources/BaiduNetdisk+Hook.h ================================================ #import @interface NSObject (BaiduNetdisk) + (void)hookBaiduNetdisk; @end ================================================ FILE: Sources/BaiduNetdisk+Hook.m ================================================ #import "BaiduNetdisk+Hook.h" #import "libBaiduNetdiskPlugin.h" #import "CTSwizzledHelper.h" @implementation NSObject (BaiduNetdisk) + (void)hookBaiduNetdisk { ct_hookMethod(objc_getClass("BandwidthManager"), @selector(request:increaseBytesTransferred:), [self class], @selector(hook_request:increaseBytesTransferred:)); ct_hookMethod(objc_getClass("BandwidthManager"), @selector(setMaxBytesPerSecond:), [self class], @selector(hook_setMaxBytesPerSecond:)); ct_hookMethod(objc_getClass("BDUser"), @selector(isSVip), [self class], @selector(hook_isSVip)); ct_hookMethod(objc_getClass("BDUserPersonalInfo"), @selector(setSvipExpireTime:), [self class], @selector(hook_setSvipExpireTime:)); [[objc_getClass("FileTransSpeedUpTrialManager") sharedInstance] resetTrialStatus]; [[objc_getClass("FileTransSpeedUpTrialManager") sharedInstance] checkProbationary]; [[objc_getClass("FileTransSpeedUpTrialManager") sharedInstance] startTrial]; ct_hookMethod(objc_getClass("FileTransSpeedUpTrialManager"), @selector(setProbationaryDuration:), [self class], @selector(hook_setProbationaryDuration:)); ct_hookMethod(objc_getClass("FileTransSpeedUpTrialManager"), @selector(trialToken), [self class], @selector(hook_trialToken)); ct_hookMethod(objc_getClass("SpeedUpTrialModel"), @selector(setToken:), [self class], @selector(hook_setToken:)); ct_hookMethod(objc_getClass("AppVersionManager"), @selector(checkUpdate), [self class], @selector(hook_checkUpdate)); } - (void)hook_request:(long long)arg1 increaseBytesTransferred:(unsigned long long)arg2; { [self hook_request:MAXFLOAT increaseBytesTransferred:MAXFLOAT]; } - (void)hook_setMaxBytesPerSecond:(unsigned long long)arg1 { [self hook_setMaxBytesPerSecond:MAXFLOAT]; } - (BOOL)hook_isSVip { return YES; } - (void)hook_setSvipExpireTime:(double)arg1 { NSTimeInterval expireTime = [[NSDate dateWithTimeIntervalSinceNow:10 * 365 * 24 * 60 * 60] timeIntervalSince1970]; [self hook_setSvipExpireTime:expireTime]; } - (void)hook_setProbationaryDuration:(long long)probationaryDuration { [self hook_setProbationaryDuration:MAXFRAG]; } - (id)hook_trialToken { id token = [self hook_trialToken]; NSLog(@"trialtoken = %@",token); // if (!token) { // token = [[NSUserDefaults standardUserDefaults] objectForKey:@"token"]; // NSLog(@"localtrialtoken = %@",token); // } return token; } - (void)hook_setToken:(NSString*)token { if (token.length) { [[NSUserDefaults standardUserDefaults] setObject:token forKey:@"token"]; [[NSUserDefaults standardUserDefaults] synchronize]; } NSLog(@"token = %@",token); [self hook_setToken:token]; } - (unsigned long long)hook_checkUpdate { return NO; } @end ================================================ FILE: Sources/CTSwizzledHelper.h ================================================ #import #import @interface CTSwizzledHelper : NSObject void ct_hookMethod(Class originalClass, SEL originalSelector, Class swizzledClass, SEL swizzledSelector); void ct_hookClassMethod(Class originalClass, SEL originalSelector, Class swizzledClass, SEL swizzledSelector); void ct_addMethod(Class originalClass,Class swizzledClass, SEL swizzledSelector); @end ================================================ FILE: Sources/CTSwizzledHelper.m ================================================ #import "CTSwizzledHelper.h" @implementation CTSwizzledHelper void ct_hookMethod(Class originalClass, SEL originalSelector, Class swizzledClass, SEL swizzledSelector) { Method originalMethod = class_getInstanceMethod(originalClass, originalSelector); Method swizzledMethod = class_getInstanceMethod(swizzledClass, swizzledSelector); if(originalMethod && swizzledMethod) { method_exchangeImplementations(originalMethod, swizzledMethod); } } void ct_hookClassMethod(Class originalClass, SEL originalSelector, Class swizzledClass, SEL swizzledSelector) { Method originalMethod = class_getClassMethod(originalClass, originalSelector); Method swizzledMethod = class_getClassMethod(swizzledClass, swizzledSelector); if(originalMethod && swizzledMethod) { method_exchangeImplementations(originalMethod, swizzledMethod); } } void ct_addMethod(Class originalClass,Class swizzledClass, SEL swizzledSelector) { Method swizzledMethod = class_getInstanceMethod(swizzledClass, swizzledSelector); class_addMethod(originalClass,swizzledSelector,method_getImplementation(swizzledMethod),method_getTypeEncoding(swizzledMethod)); } @end ================================================ FILE: libBaiduNetdiskPlugin/Info.plist ================================================ CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName $(PRODUCT_NAME) CFBundlePackageType FMWK CFBundleShortVersionString 1.0 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSHumanReadableCopyright Copyright © 2018 CodeTips. All rights reserved. NSPrincipalClass ================================================ FILE: libBaiduNetdiskPlugin/libBaiduNetdiskPlugin.h ================================================ // // libBaiduNetdiskPlugin.h // libBaiduNetdiskPlugin // // Copyright © 2018 CodeTips. All rights reserved. // #import //! Project version number for libBaiduNetdiskPlugin. FOUNDATION_EXPORT double libBaiduNetdiskPluginVersionNumber; //! Project version string for libBaiduNetdiskPlugin. FOUNDATION_EXPORT const unsigned char libBaiduNetdiskPluginVersionString[]; @interface BandwidthManager : NSObject @property(nonatomic) unsigned long long maxBytesPerSecond; // @synthesize maxBytesPerSecond=_maxBytesPerSecond; - (void)request:(long long)arg1 increaseBytesTransferred:(unsigned long long)arg2; @end @interface BDUserPersonalInfo : NSObject @property(nonatomic) double svipExpireTime; // @synthesize @end @interface BDUser : NSObject - (BOOL)isSVip; @end @interface FileTransSpeedUpTrialManager : NSObject @property(nonatomic) long long probationaryDuration; + (id)sharedInstance; - (id)trialToken; - (void)resetTrialStatus; - (void)checkProbationary; - (void)startTrial; @end @interface ALModel : NSObject @end @interface SpeedUpTrialModel : ALModel @property(copy, nonatomic) NSString *token; // @synthesize token=_token; @end @interface AppVersionManager : NSObject - (unsigned long long)checkUpdate; @end ================================================ FILE: libBaiduNetdiskPlugin/main.mm ================================================ // // main.c // libBaiduNetdiskPlugin // // Copyright © 2018 CodeTips. All rights reserved. // #import #import "BaiduNetdisk+Hook.h" static void __attribute__((constructor)) initialize(void) { [NSObject hookBaiduNetdisk]; } ================================================ FILE: libBaiduNetdiskPlugin.xcodeproj/project.pbxproj ================================================ // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 48; objects = { /* Begin PBXBuildFile section */ E5A74336204E2B8D00FE63B1 /* libBaiduNetdiskPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = E5A74334204E2B8D00FE63B1 /* libBaiduNetdiskPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; }; E5A7433D204E2BE200FE63B1 /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = E5A7433C204E2BE200FE63B1 /* main.mm */; }; E5A74347204E2F0900FE63B1 /* BaiduNetdisk+Hook.h in Headers */ = {isa = PBXBuildFile; fileRef = E5A74345204E2F0900FE63B1 /* BaiduNetdisk+Hook.h */; }; E5A74348204E2F0900FE63B1 /* BaiduNetdisk+Hook.m in Sources */ = {isa = PBXBuildFile; fileRef = E5A74346204E2F0900FE63B1 /* BaiduNetdisk+Hook.m */; }; E5A7434B204E2FEC00FE63B1 /* CTSwizzledHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = E5A74349204E2FEC00FE63B1 /* CTSwizzledHelper.m */; }; E5A7434C204E2FEC00FE63B1 /* CTSwizzledHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = E5A7434A204E2FEC00FE63B1 /* CTSwizzledHelper.h */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ E5A74331204E2B8D00FE63B1 /* libBaiduNetdiskPlugin.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = libBaiduNetdiskPlugin.framework; sourceTree = BUILT_PRODUCTS_DIR; }; E5A74334204E2B8D00FE63B1 /* libBaiduNetdiskPlugin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = libBaiduNetdiskPlugin.h; sourceTree = ""; }; E5A74335204E2B8D00FE63B1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; E5A7433C204E2BE200FE63B1 /* main.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = main.mm; sourceTree = ""; }; E5A74345204E2F0900FE63B1 /* BaiduNetdisk+Hook.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "BaiduNetdisk+Hook.h"; sourceTree = ""; }; E5A74346204E2F0900FE63B1 /* BaiduNetdisk+Hook.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "BaiduNetdisk+Hook.m"; sourceTree = ""; }; E5A74349204E2FEC00FE63B1 /* CTSwizzledHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CTSwizzledHelper.m; sourceTree = ""; }; E5A7434A204E2FEC00FE63B1 /* CTSwizzledHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CTSwizzledHelper.h; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ E5A7432D204E2B8D00FE63B1 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ E5A74327204E2B8D00FE63B1 = { isa = PBXGroup; children = ( E5A74344204E2F0900FE63B1 /* Sources */, E5A74333204E2B8D00FE63B1 /* libBaiduNetdiskPlugin */, E5A74332204E2B8D00FE63B1 /* Products */, ); sourceTree = ""; }; E5A74332204E2B8D00FE63B1 /* Products */ = { isa = PBXGroup; children = ( E5A74331204E2B8D00FE63B1 /* libBaiduNetdiskPlugin.framework */, ); name = Products; sourceTree = ""; }; E5A74333204E2B8D00FE63B1 /* libBaiduNetdiskPlugin */ = { isa = PBXGroup; children = ( E5A74334204E2B8D00FE63B1 /* libBaiduNetdiskPlugin.h */, E5A7433C204E2BE200FE63B1 /* main.mm */, E5A74335204E2B8D00FE63B1 /* Info.plist */, ); path = libBaiduNetdiskPlugin; sourceTree = ""; }; E5A74344204E2F0900FE63B1 /* Sources */ = { isa = PBXGroup; children = ( E5A7434A204E2FEC00FE63B1 /* CTSwizzledHelper.h */, E5A74349204E2FEC00FE63B1 /* CTSwizzledHelper.m */, E5A74345204E2F0900FE63B1 /* BaiduNetdisk+Hook.h */, E5A74346204E2F0900FE63B1 /* BaiduNetdisk+Hook.m */, ); path = Sources; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ E5A7432E204E2B8D00FE63B1 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( E5A74347204E2F0900FE63B1 /* BaiduNetdisk+Hook.h in Headers */, E5A7434C204E2FEC00FE63B1 /* CTSwizzledHelper.h in Headers */, E5A74336204E2B8D00FE63B1 /* libBaiduNetdiskPlugin.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ E5A74330204E2B8D00FE63B1 /* libBaiduNetdiskPlugin */ = { isa = PBXNativeTarget; buildConfigurationList = E5A74339204E2B8D00FE63B1 /* Build configuration list for PBXNativeTarget "libBaiduNetdiskPlugin" */; buildPhases = ( E5A7432C204E2B8D00FE63B1 /* Sources */, E5A7432D204E2B8D00FE63B1 /* Frameworks */, E5A7432E204E2B8D00FE63B1 /* Headers */, E5A7432F204E2B8D00FE63B1 /* Resources */, E5A7433E204E2C7300FE63B1 /* ShellScript */, ); buildRules = ( ); dependencies = ( ); name = libBaiduNetdiskPlugin; productName = libBaiduNetdiskPlugin; productReference = E5A74331204E2B8D00FE63B1 /* libBaiduNetdiskPlugin.framework */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ E5A74328204E2B8D00FE63B1 /* Project object */ = { isa = PBXProject; attributes = { LastUpgradeCheck = 0920; ORGANIZATIONNAME = CodeTips; TargetAttributes = { E5A74330204E2B8D00FE63B1 = { CreatedOnToolsVersion = 9.2; ProvisioningStyle = Automatic; }; }; }; buildConfigurationList = E5A7432B204E2B8D00FE63B1 /* Build configuration list for PBXProject "libBaiduNetdiskPlugin" */; compatibilityVersion = "Xcode 8.0"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, ); mainGroup = E5A74327204E2B8D00FE63B1; productRefGroup = E5A74332204E2B8D00FE63B1 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( E5A74330204E2B8D00FE63B1 /* libBaiduNetdiskPlugin */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ E5A7432F204E2B8D00FE63B1 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ E5A7433E204E2C7300FE63B1 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "#!/bin/bash\napp_name=\"BaiduNetdisk_mac\"\nframework_name=\"libBaiduNetdiskPlugin\"\napp_bundle_path=\"/Applications/${app_name}.app/Contents/MacOS\"\napp_executable_path=\"${app_bundle_path}/${app_name}\"\napp_executable_backup_path=\"${app_executable_path}_backup\"\nframework_path=\"${app_bundle_path}/${framework_name}.framework\"\n# 备份原始可执行文件\nif [ ! -f \"$app_executable_backup_path\" ]\nthen\ncp \"$app_executable_path\" \"$app_executable_backup_path\"\nfi\n\nrm -rf \"./Other/Products/Debug/${framework_name}.framework\"\ncp -r \"${BUILT_PRODUCTS_DIR}/${framework_name}.framework\" \"./Other/Products/Debug/${framework_name}.framework\"\ncp -r \"${BUILT_PRODUCTS_DIR}/${framework_name}.framework\" ${app_bundle_path}\n./Other/insert_dylib --all-yes \"${framework_path}/${framework_name}\" \"$app_executable_backup_path\" \"$app_executable_path\""; }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ E5A7432C204E2B8D00FE63B1 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( E5A7433D204E2BE200FE63B1 /* main.mm in Sources */, E5A74348204E2F0900FE63B1 /* BaiduNetdisk+Hook.m in Sources */, E5A7434B204E2FEC00FE63B1 /* CTSwizzledHelper.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin XCBuildConfiguration section */ E5A74337204E2B8D00FE63B1 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "Mac Developer"; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.13; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; E5A74338204E2B8D00FE63B1 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "Mac Developer"; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.13; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; E5A7433A204E2B8D00FE63B1 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = HSF5STP9ZR; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; FRAMEWORK_VERSION = A; INFOPLIST_FILE = libBaiduNetdiskPlugin/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = Net.CodeTips.libBaiduNetdiskPlugin; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; }; name = Debug; }; E5A7433B204E2B8D00FE63B1 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = HSF5STP9ZR; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; FRAMEWORK_VERSION = A; INFOPLIST_FILE = libBaiduNetdiskPlugin/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = Net.CodeTips.libBaiduNetdiskPlugin; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ E5A7432B204E2B8D00FE63B1 /* Build configuration list for PBXProject "libBaiduNetdiskPlugin" */ = { isa = XCConfigurationList; buildConfigurations = ( E5A74337204E2B8D00FE63B1 /* Debug */, E5A74338204E2B8D00FE63B1 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; E5A74339204E2B8D00FE63B1 /* Build configuration list for PBXNativeTarget "libBaiduNetdiskPlugin" */ = { isa = XCConfigurationList; buildConfigurations = ( E5A7433A204E2B8D00FE63B1 /* Debug */, E5A7433B204E2B8D00FE63B1 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; rootObject = E5A74328204E2B8D00FE63B1 /* Project object */; } ================================================ FILE: libBaiduNetdiskPlugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata ================================================ ================================================ FILE: libBaiduNetdiskPlugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist ================================================ IDEDidComputeMac32BitWarning ================================================ FILE: libBaiduNetdiskPlugin.xcodeproj/xcshareddata/xcschemes/libBaiduNetdiskPlugin.xcscheme ================================================ ================================================ FILE: libBaiduNetdiskPlugin.xcodeproj/xcuserdata/linden.xcuserdatad/xcschemes/libBaiduNetdiskPlugin.xcscheme ================================================ ================================================ FILE: libBaiduNetdiskPlugin.xcodeproj/xcuserdata/linden.xcuserdatad/xcschemes/xcschememanagement.plist ================================================ SchemeUserState libBaiduNetdiskPlugin.xcscheme orderHint 0 SuppressBuildableAutocreation E5A74330204E2B8D00FE63B1 primary ================================================ FILE: libBaiduNetdiskPlugin.xcodeproj/xcuserdata/loveletter.xcuserdatad/xcschemes/xcschememanagement.plist ================================================ SchemeUserState libBaiduNetdiskPlugin.xcscheme_^#shared#^_ orderHint 0 SuppressBuildableAutocreation E5A74330204E2B8D00FE63B1 primary ================================================ FILE: libBaiduNetdiskPlugin.xcodeproj/xcuserdata/timeaside.xcuserdatad/xcschemes/libBaiduNetdiskPlugin.xcscheme ================================================ ================================================ FILE: libBaiduNetdiskPlugin.xcodeproj/xcuserdata/timeaside.xcuserdatad/xcschemes/xcschememanagement.plist ================================================ SchemeUserState libBaiduNetdiskPlugin.xcscheme orderHint 0 SuppressBuildableAutocreation E5A74330204E2B8D00FE63B1 primary