├── .gitignore ├── Other ├── insert_dylib ├── Screenshots │ ├── baidubetdiskplugin.png │ ├── baidubetdiskplugin_1.png │ └── baidubetdiskplugin_2.png ├── Products │ └── Debug │ │ └── libBaiduNetdiskPlugin.framework │ │ ├── libBaiduNetdiskPlugin │ │ ├── Modules │ │ └── module.modulemap │ │ ├── Versions │ │ ├── A │ │ │ ├── Modules │ │ │ │ └── module.modulemap │ │ │ ├── libBaiduNetdiskPlugin │ │ │ ├── Headers │ │ │ │ └── libBaiduNetdiskPlugin.h │ │ │ └── Resources │ │ │ │ └── Info.plist │ │ └── Current │ │ │ ├── Modules │ │ │ └── module.modulemap │ │ │ ├── libBaiduNetdiskPlugin │ │ │ ├── Headers │ │ │ └── libBaiduNetdiskPlugin.h │ │ │ └── Resources │ │ │ └── Info.plist │ │ ├── Headers │ │ └── libBaiduNetdiskPlugin.h │ │ └── Resources │ │ └── Info.plist ├── Uninstall.sh └── Install.sh ├── Sources ├── BaiduNetdisk+Hook.h ├── CTSwizzledHelper.h ├── CTSwizzledHelper.m └── BaiduNetdisk+Hook.m ├── libBaiduNetdiskPlugin.xcodeproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcuserdata │ │ ├── linden.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ │ ├── loveletter.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ │ └── timeaside.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── xcuserdata │ ├── linden.xcuserdatad │ │ └── xcschemes │ │ │ ├── xcschememanagement.plist │ │ │ └── libBaiduNetdiskPlugin.xcscheme │ ├── timeaside.xcuserdatad │ │ └── xcschemes │ │ │ ├── xcschememanagement.plist │ │ │ └── libBaiduNetdiskPlugin.xcscheme │ └── loveletter.xcuserdatad │ │ └── xcschemes │ │ └── xcschememanagement.plist ├── xcshareddata │ └── xcschemes │ │ └── libBaiduNetdiskPlugin.xcscheme └── project.pbxproj ├── libBaiduNetdiskPlugin ├── main.mm ├── Info.plist └── libBaiduNetdiskPlugin.h ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /Other/insert_dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeTips/BaiduNetdiskPlugin-macOS/HEAD/Other/insert_dylib -------------------------------------------------------------------------------- /Other/Screenshots/baidubetdiskplugin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeTips/BaiduNetdiskPlugin-macOS/HEAD/Other/Screenshots/baidubetdiskplugin.png -------------------------------------------------------------------------------- /Other/Screenshots/baidubetdiskplugin_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeTips/BaiduNetdiskPlugin-macOS/HEAD/Other/Screenshots/baidubetdiskplugin_1.png -------------------------------------------------------------------------------- /Other/Screenshots/baidubetdiskplugin_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeTips/BaiduNetdiskPlugin-macOS/HEAD/Other/Screenshots/baidubetdiskplugin_2.png -------------------------------------------------------------------------------- /Sources/BaiduNetdisk+Hook.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface NSObject (BaiduNetdisk) 4 | 5 | + (void)hookBaiduNetdisk; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /Other/Products/Debug/libBaiduNetdiskPlugin.framework/libBaiduNetdiskPlugin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeTips/BaiduNetdiskPlugin-macOS/HEAD/Other/Products/Debug/libBaiduNetdiskPlugin.framework/libBaiduNetdiskPlugin -------------------------------------------------------------------------------- /Other/Products/Debug/libBaiduNetdiskPlugin.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module libBaiduNetdiskPlugin { 2 | umbrella header "libBaiduNetdiskPlugin.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Other/Products/Debug/libBaiduNetdiskPlugin.framework/Versions/A/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module libBaiduNetdiskPlugin { 2 | umbrella header "libBaiduNetdiskPlugin.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Other/Products/Debug/libBaiduNetdiskPlugin.framework/Versions/A/libBaiduNetdiskPlugin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeTips/BaiduNetdiskPlugin-macOS/HEAD/Other/Products/Debug/libBaiduNetdiskPlugin.framework/Versions/A/libBaiduNetdiskPlugin -------------------------------------------------------------------------------- /Other/Products/Debug/libBaiduNetdiskPlugin.framework/Versions/Current/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module libBaiduNetdiskPlugin { 2 | umbrella header "libBaiduNetdiskPlugin.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Other/Products/Debug/libBaiduNetdiskPlugin.framework/Versions/Current/libBaiduNetdiskPlugin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeTips/BaiduNetdiskPlugin-macOS/HEAD/Other/Products/Debug/libBaiduNetdiskPlugin.framework/Versions/Current/libBaiduNetdiskPlugin -------------------------------------------------------------------------------- /libBaiduNetdiskPlugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /libBaiduNetdiskPlugin.xcodeproj/project.xcworkspace/xcuserdata/linden.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeTips/BaiduNetdiskPlugin-macOS/HEAD/libBaiduNetdiskPlugin.xcodeproj/project.xcworkspace/xcuserdata/linden.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /libBaiduNetdiskPlugin.xcodeproj/project.xcworkspace/xcuserdata/loveletter.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeTips/BaiduNetdiskPlugin-macOS/HEAD/libBaiduNetdiskPlugin.xcodeproj/project.xcworkspace/xcuserdata/loveletter.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /libBaiduNetdiskPlugin.xcodeproj/project.xcworkspace/xcuserdata/timeaside.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeTips/BaiduNetdiskPlugin-macOS/HEAD/libBaiduNetdiskPlugin.xcodeproj/project.xcworkspace/xcuserdata/timeaside.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /libBaiduNetdiskPlugin/main.mm: -------------------------------------------------------------------------------- 1 | // 2 | // main.c 3 | // libBaiduNetdiskPlugin 4 | // 5 | // Copyright © 2018 CodeTips. All rights reserved. 6 | // 7 | 8 | #import 9 | #import "BaiduNetdisk+Hook.h" 10 | static void __attribute__((constructor)) initialize(void) { 11 | [NSObject hookBaiduNetdisk]; 12 | } 13 | -------------------------------------------------------------------------------- /libBaiduNetdiskPlugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Sources/CTSwizzledHelper.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface CTSwizzledHelper : NSObject 5 | 6 | void ct_hookMethod(Class originalClass, SEL originalSelector, Class swizzledClass, SEL swizzledSelector); 7 | void ct_hookClassMethod(Class originalClass, SEL originalSelector, Class swizzledClass, SEL swizzledSelector); 8 | void ct_addMethod(Class originalClass,Class swizzledClass, SEL swizzledSelector); 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /Other/Uninstall.sh: -------------------------------------------------------------------------------- 1 | # !/bin/bash 2 | 3 | app_name="BaiduNetdisk_mac" 4 | framework_name="libBaiduNetdiskPlugin" 5 | app_bundle_path="/Applications/${app_name}.app/Contents/MacOS" 6 | app_executable_path="${app_bundle_path}/${app_name}" 7 | app_executable_backup_path="${app_executable_path}_backup" 8 | framework_path="${app_bundle_path}/${framework_name}.framework" 9 | 10 | if [ -f "$app_executable_backup_path" ] 11 | then 12 | rm "$app_executable_path" 13 | rm -rf "$framework_path" 14 | mv "$app_executable_backup_path" "$app_executable_path" 15 | echo -e "\n\t卸载成功" 16 | else 17 | echo -e "\n\t未发现补丁包" 18 | fi 19 | -------------------------------------------------------------------------------- /libBaiduNetdiskPlugin.xcodeproj/xcuserdata/linden.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | libBaiduNetdiskPlugin.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | E5A74330204E2B8D00FE63B1 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /libBaiduNetdiskPlugin.xcodeproj/xcuserdata/timeaside.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | libBaiduNetdiskPlugin.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | E5A74330204E2B8D00FE63B1 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /libBaiduNetdiskPlugin.xcodeproj/xcuserdata/loveletter.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | libBaiduNetdiskPlugin.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | E5A74330204E2B8D00FE63B1 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Other/Install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | app_name="BaiduNetdisk_mac" 4 | shell_path="$(dirname "$0")" 5 | wechat_path="/Applications/BaiduNetdisk_mac.app" 6 | framework_name="libBaiduNetdiskPlugin" 7 | app_bundle_path="/Applications/${app_name}.app/Contents/MacOS" 8 | app_executable_path="${app_bundle_path}/${app_name}" 9 | app_executable_backup_path="${app_executable_path}_backup" 10 | framework_path="${app_bundle_path}/${framework_name}.framework" 11 | 12 | # 备份原始可执行文件 13 | if [ ! -f "$app_executable_backup_path" ] 14 | then 15 | cp "$app_executable_path" "$app_executable_backup_path" 16 | result="y" 17 | else 18 | read -t 150 -p "已安装补丁包,是否覆盖?[y/n]:" result 19 | fi 20 | 21 | if [[ "$result" == 'y' ]]; then 22 | cp -r "${shell_path}/Products/Debug/${framework_name}.framework" ${app_bundle_path} 23 | ${shell_path}/insert_dylib --all-yes "${framework_path}/${framework_name}" "$app_executable_backup_path" "$app_executable_path" 24 | echo -e "\n\tDone!" 25 | fi 26 | 27 | 28 | -------------------------------------------------------------------------------- /libBaiduNetdiskPlugin/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSHumanReadableCopyright 22 | Copyright © 2018 CodeTips. All rights reserved. 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Loveletter 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Sources/CTSwizzledHelper.m: -------------------------------------------------------------------------------- 1 | #import "CTSwizzledHelper.h" 2 | 3 | @implementation CTSwizzledHelper 4 | 5 | void ct_hookMethod(Class originalClass, SEL originalSelector, Class swizzledClass, SEL swizzledSelector) { 6 | Method originalMethod = class_getInstanceMethod(originalClass, originalSelector); 7 | Method swizzledMethod = class_getInstanceMethod(swizzledClass, swizzledSelector); 8 | if(originalMethod && swizzledMethod) { 9 | method_exchangeImplementations(originalMethod, swizzledMethod); 10 | } 11 | } 12 | 13 | void ct_hookClassMethod(Class originalClass, SEL originalSelector, Class swizzledClass, SEL swizzledSelector) { 14 | Method originalMethod = class_getClassMethod(originalClass, originalSelector); 15 | Method swizzledMethod = class_getClassMethod(swizzledClass, swizzledSelector); 16 | if(originalMethod && swizzledMethod) { 17 | method_exchangeImplementations(originalMethod, swizzledMethod); 18 | } 19 | } 20 | 21 | void ct_addMethod(Class originalClass,Class swizzledClass, SEL swizzledSelector) 22 | { 23 | Method swizzledMethod = class_getInstanceMethod(swizzledClass, swizzledSelector); 24 | class_addMethod(originalClass,swizzledSelector,method_getImplementation(swizzledMethod),method_getTypeEncoding(swizzledMethod)); 25 | } 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /libBaiduNetdiskPlugin/libBaiduNetdiskPlugin.h: -------------------------------------------------------------------------------- 1 | // 2 | // libBaiduNetdiskPlugin.h 3 | // libBaiduNetdiskPlugin 4 | // 5 | // Copyright © 2018 CodeTips. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | //! Project version number for libBaiduNetdiskPlugin. 11 | FOUNDATION_EXPORT double libBaiduNetdiskPluginVersionNumber; 12 | 13 | //! Project version string for libBaiduNetdiskPlugin. 14 | FOUNDATION_EXPORT const unsigned char libBaiduNetdiskPluginVersionString[]; 15 | 16 | @interface BandwidthManager : NSObject 17 | @property(nonatomic) unsigned long long maxBytesPerSecond; // @synthesize maxBytesPerSecond=_maxBytesPerSecond; 18 | - (void)request:(long long)arg1 increaseBytesTransferred:(unsigned long long)arg2; 19 | @end 20 | 21 | @interface BDUserPersonalInfo : NSObject 22 | @property(nonatomic) double svipExpireTime; // @synthesize 23 | @end 24 | 25 | @interface BDUser : NSObject 26 | - (BOOL)isSVip; 27 | @end 28 | 29 | @interface FileTransSpeedUpTrialManager : NSObject 30 | @property(nonatomic) long long probationaryDuration; 31 | + (id)sharedInstance; 32 | 33 | - (id)trialToken; 34 | - (void)resetTrialStatus; 35 | - (void)checkProbationary; 36 | - (void)startTrial; 37 | @end 38 | 39 | @interface ALModel : NSObject 40 | @end 41 | 42 | @interface SpeedUpTrialModel : ALModel 43 | @property(copy, nonatomic) NSString *token; // @synthesize token=_token; 44 | @end 45 | 46 | @interface AppVersionManager : NSObject 47 | - (unsigned long long)checkUpdate; 48 | @end 49 | -------------------------------------------------------------------------------- /Other/Products/Debug/libBaiduNetdiskPlugin.framework/Headers/libBaiduNetdiskPlugin.h: -------------------------------------------------------------------------------- 1 | // 2 | // libBaiduNetdiskPlugin.h 3 | // libBaiduNetdiskPlugin 4 | // 5 | // Copyright © 2018 CodeTips. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | //! Project version number for libBaiduNetdiskPlugin. 11 | FOUNDATION_EXPORT double libBaiduNetdiskPluginVersionNumber; 12 | 13 | //! Project version string for libBaiduNetdiskPlugin. 14 | FOUNDATION_EXPORT const unsigned char libBaiduNetdiskPluginVersionString[]; 15 | 16 | @interface BandwidthManager : NSObject 17 | @property(nonatomic) unsigned long long maxBytesPerSecond; // @synthesize maxBytesPerSecond=_maxBytesPerSecond; 18 | - (void)request:(long long)arg1 increaseBytesTransferred:(unsigned long long)arg2; 19 | @end 20 | 21 | @interface BDUserPersonalInfo : NSObject 22 | @property(nonatomic) double svipExpireTime; // @synthesize 23 | @end 24 | 25 | @interface BDUser : NSObject 26 | - (BOOL)isSVip; 27 | @end 28 | 29 | @interface FileTransSpeedUpTrialManager : NSObject 30 | @property(nonatomic) long long probationaryDuration; 31 | + (id)sharedInstance; 32 | 33 | - (id)trialToken; 34 | - (void)resetTrialStatus; 35 | - (void)checkProbationary; 36 | - (void)startTrial; 37 | @end 38 | 39 | @interface ALModel : NSObject 40 | @end 41 | 42 | @interface SpeedUpTrialModel : ALModel 43 | @property(copy, nonatomic) NSString *token; // @synthesize token=_token; 44 | @end 45 | 46 | @interface AppVersionManager : NSObject 47 | - (unsigned long long)checkUpdate; 48 | @end 49 | -------------------------------------------------------------------------------- /Other/Products/Debug/libBaiduNetdiskPlugin.framework/Versions/A/Headers/libBaiduNetdiskPlugin.h: -------------------------------------------------------------------------------- 1 | // 2 | // libBaiduNetdiskPlugin.h 3 | // libBaiduNetdiskPlugin 4 | // 5 | // Copyright © 2018 CodeTips. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | //! Project version number for libBaiduNetdiskPlugin. 11 | FOUNDATION_EXPORT double libBaiduNetdiskPluginVersionNumber; 12 | 13 | //! Project version string for libBaiduNetdiskPlugin. 14 | FOUNDATION_EXPORT const unsigned char libBaiduNetdiskPluginVersionString[]; 15 | 16 | @interface BandwidthManager : NSObject 17 | @property(nonatomic) unsigned long long maxBytesPerSecond; // @synthesize maxBytesPerSecond=_maxBytesPerSecond; 18 | - (void)request:(long long)arg1 increaseBytesTransferred:(unsigned long long)arg2; 19 | @end 20 | 21 | @interface BDUserPersonalInfo : NSObject 22 | @property(nonatomic) double svipExpireTime; // @synthesize 23 | @end 24 | 25 | @interface BDUser : NSObject 26 | - (BOOL)isSVip; 27 | @end 28 | 29 | @interface FileTransSpeedUpTrialManager : NSObject 30 | @property(nonatomic) long long probationaryDuration; 31 | + (id)sharedInstance; 32 | 33 | - (id)trialToken; 34 | - (void)resetTrialStatus; 35 | - (void)checkProbationary; 36 | - (void)startTrial; 37 | @end 38 | 39 | @interface ALModel : NSObject 40 | @end 41 | 42 | @interface SpeedUpTrialModel : ALModel 43 | @property(copy, nonatomic) NSString *token; // @synthesize token=_token; 44 | @end 45 | 46 | @interface AppVersionManager : NSObject 47 | - (unsigned long long)checkUpdate; 48 | @end 49 | -------------------------------------------------------------------------------- /Other/Products/Debug/libBaiduNetdiskPlugin.framework/Versions/Current/Headers/libBaiduNetdiskPlugin.h: -------------------------------------------------------------------------------- 1 | // 2 | // libBaiduNetdiskPlugin.h 3 | // libBaiduNetdiskPlugin 4 | // 5 | // Copyright © 2018 CodeTips. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | //! Project version number for libBaiduNetdiskPlugin. 11 | FOUNDATION_EXPORT double libBaiduNetdiskPluginVersionNumber; 12 | 13 | //! Project version string for libBaiduNetdiskPlugin. 14 | FOUNDATION_EXPORT const unsigned char libBaiduNetdiskPluginVersionString[]; 15 | 16 | @interface BandwidthManager : NSObject 17 | @property(nonatomic) unsigned long long maxBytesPerSecond; // @synthesize maxBytesPerSecond=_maxBytesPerSecond; 18 | - (void)request:(long long)arg1 increaseBytesTransferred:(unsigned long long)arg2; 19 | @end 20 | 21 | @interface BDUserPersonalInfo : NSObject 22 | @property(nonatomic) double svipExpireTime; // @synthesize 23 | @end 24 | 25 | @interface BDUser : NSObject 26 | - (BOOL)isSVip; 27 | @end 28 | 29 | @interface FileTransSpeedUpTrialManager : NSObject 30 | @property(nonatomic) long long probationaryDuration; 31 | + (id)sharedInstance; 32 | 33 | - (id)trialToken; 34 | - (void)resetTrialStatus; 35 | - (void)checkProbationary; 36 | - (void)startTrial; 37 | @end 38 | 39 | @interface ALModel : NSObject 40 | @end 41 | 42 | @interface SpeedUpTrialModel : ALModel 43 | @property(copy, nonatomic) NSString *token; // @synthesize token=_token; 44 | @end 45 | 46 | @interface AppVersionManager : NSObject 47 | - (unsigned long long)checkUpdate; 48 | @end 49 | -------------------------------------------------------------------------------- /Other/Products/Debug/libBaiduNetdiskPlugin.framework/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 18G1012 7 | CFBundleDevelopmentRegion 8 | en 9 | CFBundleExecutable 10 | libBaiduNetdiskPlugin 11 | CFBundleIdentifier 12 | Net.CodeTips.libBaiduNetdiskPlugin 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | libBaiduNetdiskPlugin 17 | CFBundlePackageType 18 | FMWK 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSupportedPlatforms 22 | 23 | MacOSX 24 | 25 | CFBundleVersion 26 | 1 27 | DTCompiler 28 | com.apple.compilers.llvm.clang.1_0 29 | DTPlatformBuild 30 | 11B52 31 | DTPlatformVersion 32 | GM 33 | DTSDKBuild 34 | 19B81 35 | DTSDKName 36 | macosx10.15 37 | DTXcode 38 | 1120 39 | DTXcodeBuild 40 | 11B52 41 | LSMinimumSystemVersion 42 | 10.13 43 | NSHumanReadableCopyright 44 | Copyright © 2018 CodeTips. All rights reserved. 45 | 46 | 47 | -------------------------------------------------------------------------------- /Other/Products/Debug/libBaiduNetdiskPlugin.framework/Versions/A/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 18G1012 7 | CFBundleDevelopmentRegion 8 | en 9 | CFBundleExecutable 10 | libBaiduNetdiskPlugin 11 | CFBundleIdentifier 12 | Net.CodeTips.libBaiduNetdiskPlugin 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | libBaiduNetdiskPlugin 17 | CFBundlePackageType 18 | FMWK 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSupportedPlatforms 22 | 23 | MacOSX 24 | 25 | CFBundleVersion 26 | 1 27 | DTCompiler 28 | com.apple.compilers.llvm.clang.1_0 29 | DTPlatformBuild 30 | 11B52 31 | DTPlatformVersion 32 | GM 33 | DTSDKBuild 34 | 19B81 35 | DTSDKName 36 | macosx10.15 37 | DTXcode 38 | 1120 39 | DTXcodeBuild 40 | 11B52 41 | LSMinimumSystemVersion 42 | 10.13 43 | NSHumanReadableCopyright 44 | Copyright © 2018 CodeTips. All rights reserved. 45 | 46 | 47 | -------------------------------------------------------------------------------- /Other/Products/Debug/libBaiduNetdiskPlugin.framework/Versions/Current/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 18G1012 7 | CFBundleDevelopmentRegion 8 | en 9 | CFBundleExecutable 10 | libBaiduNetdiskPlugin 11 | CFBundleIdentifier 12 | Net.CodeTips.libBaiduNetdiskPlugin 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | libBaiduNetdiskPlugin 17 | CFBundlePackageType 18 | FMWK 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSupportedPlatforms 22 | 23 | MacOSX 24 | 25 | CFBundleVersion 26 | 1 27 | DTCompiler 28 | com.apple.compilers.llvm.clang.1_0 29 | DTPlatformBuild 30 | 11B52 31 | DTPlatformVersion 32 | GM 33 | DTSDKBuild 34 | 19B81 35 | DTSDKName 36 | macosx10.15 37 | DTXcode 38 | 1120 39 | DTXcodeBuild 40 | 11B52 41 | LSMinimumSystemVersion 42 | 10.13 43 | NSHumanReadableCopyright 44 | Copyright © 2018 CodeTips. All rights reserved. 45 | 46 | 47 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # BaiduNetdiskPlugin-macOS 2 | 3 | ![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) 4 | 5 | ![baidubetdiskplugin](./Other/Screenshots/baidubetdiskplugin.png) 6 | ![baidubetdiskplugin_1](./Other/Screenshots/baidubetdiskplugin_1.png) 7 | ### 说明 8 | * **20191118更新,去掉自动检查更新功能。由于个人精力和能力有限,此项目不再更新支持新版网盘。如使用,请下载2.2.2版本 [官方下载地址][1]。** 9 | 10 | * **连续下载10G数据后,会被限制速度到单文件20kb。所以,这个补丁偶尔用用就行,别一直用。** 11 | 12 | * **免责声明:本项目旨在学习macOS 逆向的一点实践,不可使用于商业和个人其他意图。若使用不当,均由个人承担。** 13 | 14 | * **本项目只用于学习和交流,有能力的请购买官方VIP服务。** 15 | 16 | * **包含功能:本地SVIP图标显示,去除本地下载速度限制(服务端已添加限制单文件200kb左右),去除本地极速下载试用时长限制,倒计时永久显示8秒(服务的token大概3分钟过期。意思就是虽然不倒计时,但是3分钟后速度还是会降下来)。** 17 | 18 | * **破解完成后,下载速度还是没有变化,可能是资源热度问题,或者是你已经进入百度网盘黑名单。** 19 | 20 | * **此项目不再更新,有问题请Issue中找答案,或者添加我微信(博客关于有二维码),很高兴能帮到你。** 21 | 22 | * **不会用的伸手狗请滚粗,别出问题后在这里乱咬人。** 23 | 24 | ### 安装 25 | 26 | 1. 懒人安装 27 | * 打开`应用程序`->`实用工具`->`Terminal(终端)`,执行以下命令即可。(需要git支持) 28 | `cd ~/Downloads && git clone https://github.com/CodeTips/BaiduNetdiskPlugin-macOS.git && ./BaiduNetdiskPlugin-macOS/Other/Install.sh` 29 | 2. 普通安装 30 | * 点击`clone or download`下载项目并解压,打开`Terminal(终端)`,拖动解压后`Install.sh` 文件(在 Other 文件夹中)到 Terminal 回车即可。 31 | 3. 重编译安装 32 | * 点击`clone or download`下载项目,解压运行`libBaiduNetdiskPlugin.xcodeproj`,然后`Edit Schemes`->`Executable`->`Other`->选择`百度网盘`。然后运行工程,因为百度网盘有 VMProtect加壳,运行后会有以下提示: 33 | ![baidubetdiskplugin_2](./Other/Screenshots/baidubetdiskplugin_2.png) 34 | 直接点击OK。 35 | * 然后运行或者重启`百度网盘`,如果用户VIP状态改变,证明成功。 36 | 37 | ### 卸载 38 | 39 | 1. 如果第一种方法安装的。 40 | * 打开`应用程序`->`实用工具`->`Terminal(终端)`,执行以下命令即可。`cd ~/Downloads && ./BaiduNetdiskPlugin-macOS/Other/Uninstall.sh` 41 | 2. 通用卸载方法。 42 | * 打开`应用程序`->`实用工具`->`Terminal(终端)`,执行以下命令即可。`cd /Applications/BaiduNetdisk_mac.app/Contents/MacOS/ && rm -rf BaiduNetdisk_mac libBaiduNetdiskPlugin.framework && mv BaiduNetdisk_mac_backup BaiduNetdisk_mac` 43 | 44 | **以上方法可以完全卸载此功能。如果还是不行的话,那么抱歉,可能您需要重新安装了** 45 | 46 | ### 依赖 47 | 48 | * [insert_dylib](https://github.com/Tyilo/insert_dylib) 49 | 50 | ### 最后 51 | * 使用愉快~ 52 | 53 | 54 | [1]: http://issuecdn.baidupcs.com/issue/netdisk/MACguanjia/BaiduNetdisk_mac_2.2.2.dmg 55 | -------------------------------------------------------------------------------- /libBaiduNetdiskPlugin.xcodeproj/xcshareddata/xcschemes/libBaiduNetdiskPlugin.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 46 | 47 | 48 | 54 | 55 | 61 | 62 | 63 | 64 | 66 | 67 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /Sources/BaiduNetdisk+Hook.m: -------------------------------------------------------------------------------- 1 | #import "BaiduNetdisk+Hook.h" 2 | #import "libBaiduNetdiskPlugin.h" 3 | #import "CTSwizzledHelper.h" 4 | 5 | @implementation NSObject (BaiduNetdisk) 6 | 7 | + (void)hookBaiduNetdisk 8 | { 9 | ct_hookMethod(objc_getClass("BandwidthManager"), @selector(request:increaseBytesTransferred:), [self class], @selector(hook_request:increaseBytesTransferred:)); 10 | ct_hookMethod(objc_getClass("BandwidthManager"), @selector(setMaxBytesPerSecond:), [self class], @selector(hook_setMaxBytesPerSecond:)); 11 | 12 | ct_hookMethod(objc_getClass("BDUser"), @selector(isSVip), [self class], @selector(hook_isSVip)); 13 | ct_hookMethod(objc_getClass("BDUserPersonalInfo"), @selector(setSvipExpireTime:), [self class], @selector(hook_setSvipExpireTime:)); 14 | 15 | [[objc_getClass("FileTransSpeedUpTrialManager") sharedInstance] resetTrialStatus]; 16 | [[objc_getClass("FileTransSpeedUpTrialManager") sharedInstance] checkProbationary]; 17 | [[objc_getClass("FileTransSpeedUpTrialManager") sharedInstance] startTrial]; 18 | 19 | ct_hookMethod(objc_getClass("FileTransSpeedUpTrialManager"), @selector(setProbationaryDuration:), [self class], @selector(hook_setProbationaryDuration:)); 20 | ct_hookMethod(objc_getClass("FileTransSpeedUpTrialManager"), @selector(trialToken), [self class], @selector(hook_trialToken)); 21 | 22 | ct_hookMethod(objc_getClass("SpeedUpTrialModel"), @selector(setToken:), [self class], @selector(hook_setToken:)); 23 | 24 | ct_hookMethod(objc_getClass("AppVersionManager"), @selector(checkUpdate), [self class], @selector(hook_checkUpdate)); 25 | } 26 | 27 | - (void)hook_request:(long long)arg1 increaseBytesTransferred:(unsigned long long)arg2; 28 | { 29 | [self hook_request:MAXFLOAT increaseBytesTransferred:MAXFLOAT]; 30 | } 31 | 32 | - (void)hook_setMaxBytesPerSecond:(unsigned long long)arg1 33 | { 34 | [self hook_setMaxBytesPerSecond:MAXFLOAT]; 35 | } 36 | 37 | - (BOOL)hook_isSVip 38 | { 39 | return YES; 40 | } 41 | 42 | - (void)hook_setSvipExpireTime:(double)arg1 43 | { 44 | NSTimeInterval expireTime = [[NSDate dateWithTimeIntervalSinceNow:10 * 365 * 24 * 60 * 60] timeIntervalSince1970]; 45 | [self hook_setSvipExpireTime:expireTime]; 46 | } 47 | 48 | - (void)hook_setProbationaryDuration:(long long)probationaryDuration 49 | { 50 | [self hook_setProbationaryDuration:MAXFRAG]; 51 | } 52 | 53 | - (id)hook_trialToken 54 | { 55 | id token = [self hook_trialToken]; 56 | NSLog(@"trialtoken = %@",token); 57 | // if (!token) { 58 | // token = [[NSUserDefaults standardUserDefaults] objectForKey:@"token"]; 59 | // NSLog(@"localtrialtoken = %@",token); 60 | // } 61 | return token; 62 | } 63 | 64 | - (void)hook_setToken:(NSString*)token 65 | { 66 | if (token.length) { 67 | [[NSUserDefaults standardUserDefaults] setObject:token forKey:@"token"]; 68 | [[NSUserDefaults standardUserDefaults] synchronize]; 69 | } 70 | NSLog(@"token = %@",token); 71 | [self hook_setToken:token]; 72 | } 73 | 74 | - (unsigned long long)hook_checkUpdate 75 | { 76 | return NO; 77 | } 78 | 79 | @end 80 | -------------------------------------------------------------------------------- /libBaiduNetdiskPlugin.xcodeproj/xcuserdata/linden.xcuserdatad/xcschemes/libBaiduNetdiskPlugin.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 33 | 34 | 35 | 36 | 47 | 50 | 51 | 52 | 58 | 59 | 60 | 61 | 62 | 63 | 69 | 70 | 76 | 77 | 78 | 79 | 81 | 82 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /libBaiduNetdiskPlugin.xcodeproj/xcuserdata/timeaside.xcuserdatad/xcschemes/libBaiduNetdiskPlugin.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 33 | 34 | 35 | 36 | 47 | 50 | 51 | 52 | 58 | 59 | 60 | 61 | 62 | 63 | 69 | 70 | 76 | 77 | 78 | 79 | 81 | 82 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /libBaiduNetdiskPlugin.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 48; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | E5A74336204E2B8D00FE63B1 /* libBaiduNetdiskPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = E5A74334204E2B8D00FE63B1 /* libBaiduNetdiskPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; }; 11 | E5A7433D204E2BE200FE63B1 /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = E5A7433C204E2BE200FE63B1 /* main.mm */; }; 12 | E5A74347204E2F0900FE63B1 /* BaiduNetdisk+Hook.h in Headers */ = {isa = PBXBuildFile; fileRef = E5A74345204E2F0900FE63B1 /* BaiduNetdisk+Hook.h */; }; 13 | E5A74348204E2F0900FE63B1 /* BaiduNetdisk+Hook.m in Sources */ = {isa = PBXBuildFile; fileRef = E5A74346204E2F0900FE63B1 /* BaiduNetdisk+Hook.m */; }; 14 | E5A7434B204E2FEC00FE63B1 /* CTSwizzledHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = E5A74349204E2FEC00FE63B1 /* CTSwizzledHelper.m */; }; 15 | E5A7434C204E2FEC00FE63B1 /* CTSwizzledHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = E5A7434A204E2FEC00FE63B1 /* CTSwizzledHelper.h */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXFileReference section */ 19 | E5A74331204E2B8D00FE63B1 /* libBaiduNetdiskPlugin.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = libBaiduNetdiskPlugin.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 20 | E5A74334204E2B8D00FE63B1 /* libBaiduNetdiskPlugin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = libBaiduNetdiskPlugin.h; sourceTree = ""; }; 21 | E5A74335204E2B8D00FE63B1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 22 | E5A7433C204E2BE200FE63B1 /* main.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = main.mm; sourceTree = ""; }; 23 | E5A74345204E2F0900FE63B1 /* BaiduNetdisk+Hook.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "BaiduNetdisk+Hook.h"; sourceTree = ""; }; 24 | E5A74346204E2F0900FE63B1 /* BaiduNetdisk+Hook.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "BaiduNetdisk+Hook.m"; sourceTree = ""; }; 25 | E5A74349204E2FEC00FE63B1 /* CTSwizzledHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CTSwizzledHelper.m; sourceTree = ""; }; 26 | E5A7434A204E2FEC00FE63B1 /* CTSwizzledHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CTSwizzledHelper.h; sourceTree = ""; }; 27 | /* End PBXFileReference section */ 28 | 29 | /* Begin PBXFrameworksBuildPhase section */ 30 | E5A7432D204E2B8D00FE63B1 /* Frameworks */ = { 31 | isa = PBXFrameworksBuildPhase; 32 | buildActionMask = 2147483647; 33 | files = ( 34 | ); 35 | runOnlyForDeploymentPostprocessing = 0; 36 | }; 37 | /* End PBXFrameworksBuildPhase section */ 38 | 39 | /* Begin PBXGroup section */ 40 | E5A74327204E2B8D00FE63B1 = { 41 | isa = PBXGroup; 42 | children = ( 43 | E5A74344204E2F0900FE63B1 /* Sources */, 44 | E5A74333204E2B8D00FE63B1 /* libBaiduNetdiskPlugin */, 45 | E5A74332204E2B8D00FE63B1 /* Products */, 46 | ); 47 | sourceTree = ""; 48 | }; 49 | E5A74332204E2B8D00FE63B1 /* Products */ = { 50 | isa = PBXGroup; 51 | children = ( 52 | E5A74331204E2B8D00FE63B1 /* libBaiduNetdiskPlugin.framework */, 53 | ); 54 | name = Products; 55 | sourceTree = ""; 56 | }; 57 | E5A74333204E2B8D00FE63B1 /* libBaiduNetdiskPlugin */ = { 58 | isa = PBXGroup; 59 | children = ( 60 | E5A74334204E2B8D00FE63B1 /* libBaiduNetdiskPlugin.h */, 61 | E5A7433C204E2BE200FE63B1 /* main.mm */, 62 | E5A74335204E2B8D00FE63B1 /* Info.plist */, 63 | ); 64 | path = libBaiduNetdiskPlugin; 65 | sourceTree = ""; 66 | }; 67 | E5A74344204E2F0900FE63B1 /* Sources */ = { 68 | isa = PBXGroup; 69 | children = ( 70 | E5A7434A204E2FEC00FE63B1 /* CTSwizzledHelper.h */, 71 | E5A74349204E2FEC00FE63B1 /* CTSwizzledHelper.m */, 72 | E5A74345204E2F0900FE63B1 /* BaiduNetdisk+Hook.h */, 73 | E5A74346204E2F0900FE63B1 /* BaiduNetdisk+Hook.m */, 74 | ); 75 | path = Sources; 76 | sourceTree = ""; 77 | }; 78 | /* End PBXGroup section */ 79 | 80 | /* Begin PBXHeadersBuildPhase section */ 81 | E5A7432E204E2B8D00FE63B1 /* Headers */ = { 82 | isa = PBXHeadersBuildPhase; 83 | buildActionMask = 2147483647; 84 | files = ( 85 | E5A74347204E2F0900FE63B1 /* BaiduNetdisk+Hook.h in Headers */, 86 | E5A7434C204E2FEC00FE63B1 /* CTSwizzledHelper.h in Headers */, 87 | E5A74336204E2B8D00FE63B1 /* libBaiduNetdiskPlugin.h in Headers */, 88 | ); 89 | runOnlyForDeploymentPostprocessing = 0; 90 | }; 91 | /* End PBXHeadersBuildPhase section */ 92 | 93 | /* Begin PBXNativeTarget section */ 94 | E5A74330204E2B8D00FE63B1 /* libBaiduNetdiskPlugin */ = { 95 | isa = PBXNativeTarget; 96 | buildConfigurationList = E5A74339204E2B8D00FE63B1 /* Build configuration list for PBXNativeTarget "libBaiduNetdiskPlugin" */; 97 | buildPhases = ( 98 | E5A7432C204E2B8D00FE63B1 /* Sources */, 99 | E5A7432D204E2B8D00FE63B1 /* Frameworks */, 100 | E5A7432E204E2B8D00FE63B1 /* Headers */, 101 | E5A7432F204E2B8D00FE63B1 /* Resources */, 102 | E5A7433E204E2C7300FE63B1 /* ShellScript */, 103 | ); 104 | buildRules = ( 105 | ); 106 | dependencies = ( 107 | ); 108 | name = libBaiduNetdiskPlugin; 109 | productName = libBaiduNetdiskPlugin; 110 | productReference = E5A74331204E2B8D00FE63B1 /* libBaiduNetdiskPlugin.framework */; 111 | productType = "com.apple.product-type.framework"; 112 | }; 113 | /* End PBXNativeTarget section */ 114 | 115 | /* Begin PBXProject section */ 116 | E5A74328204E2B8D00FE63B1 /* Project object */ = { 117 | isa = PBXProject; 118 | attributes = { 119 | LastUpgradeCheck = 0920; 120 | ORGANIZATIONNAME = CodeTips; 121 | TargetAttributes = { 122 | E5A74330204E2B8D00FE63B1 = { 123 | CreatedOnToolsVersion = 9.2; 124 | ProvisioningStyle = Automatic; 125 | }; 126 | }; 127 | }; 128 | buildConfigurationList = E5A7432B204E2B8D00FE63B1 /* Build configuration list for PBXProject "libBaiduNetdiskPlugin" */; 129 | compatibilityVersion = "Xcode 8.0"; 130 | developmentRegion = en; 131 | hasScannedForEncodings = 0; 132 | knownRegions = ( 133 | en, 134 | ); 135 | mainGroup = E5A74327204E2B8D00FE63B1; 136 | productRefGroup = E5A74332204E2B8D00FE63B1 /* Products */; 137 | projectDirPath = ""; 138 | projectRoot = ""; 139 | targets = ( 140 | E5A74330204E2B8D00FE63B1 /* libBaiduNetdiskPlugin */, 141 | ); 142 | }; 143 | /* End PBXProject section */ 144 | 145 | /* Begin PBXResourcesBuildPhase section */ 146 | E5A7432F204E2B8D00FE63B1 /* Resources */ = { 147 | isa = PBXResourcesBuildPhase; 148 | buildActionMask = 2147483647; 149 | files = ( 150 | ); 151 | runOnlyForDeploymentPostprocessing = 0; 152 | }; 153 | /* End PBXResourcesBuildPhase section */ 154 | 155 | /* Begin PBXShellScriptBuildPhase section */ 156 | E5A7433E204E2C7300FE63B1 /* ShellScript */ = { 157 | isa = PBXShellScriptBuildPhase; 158 | buildActionMask = 2147483647; 159 | files = ( 160 | ); 161 | inputPaths = ( 162 | ); 163 | outputPaths = ( 164 | ); 165 | runOnlyForDeploymentPostprocessing = 0; 166 | shellPath = /bin/sh; 167 | 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\""; 168 | }; 169 | /* End PBXShellScriptBuildPhase section */ 170 | 171 | /* Begin PBXSourcesBuildPhase section */ 172 | E5A7432C204E2B8D00FE63B1 /* Sources */ = { 173 | isa = PBXSourcesBuildPhase; 174 | buildActionMask = 2147483647; 175 | files = ( 176 | E5A7433D204E2BE200FE63B1 /* main.mm in Sources */, 177 | E5A74348204E2F0900FE63B1 /* BaiduNetdisk+Hook.m in Sources */, 178 | E5A7434B204E2FEC00FE63B1 /* CTSwizzledHelper.m in Sources */, 179 | ); 180 | runOnlyForDeploymentPostprocessing = 0; 181 | }; 182 | /* End PBXSourcesBuildPhase section */ 183 | 184 | /* Begin XCBuildConfiguration section */ 185 | E5A74337204E2B8D00FE63B1 /* Debug */ = { 186 | isa = XCBuildConfiguration; 187 | buildSettings = { 188 | ALWAYS_SEARCH_USER_PATHS = NO; 189 | CLANG_ANALYZER_NONNULL = YES; 190 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 191 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 192 | CLANG_CXX_LIBRARY = "libc++"; 193 | CLANG_ENABLE_MODULES = YES; 194 | CLANG_ENABLE_OBJC_ARC = YES; 195 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 196 | CLANG_WARN_BOOL_CONVERSION = YES; 197 | CLANG_WARN_COMMA = YES; 198 | CLANG_WARN_CONSTANT_CONVERSION = YES; 199 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 200 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 201 | CLANG_WARN_EMPTY_BODY = YES; 202 | CLANG_WARN_ENUM_CONVERSION = YES; 203 | CLANG_WARN_INFINITE_RECURSION = YES; 204 | CLANG_WARN_INT_CONVERSION = YES; 205 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 206 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 207 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 208 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 209 | CLANG_WARN_STRICT_PROTOTYPES = YES; 210 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 211 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 212 | CLANG_WARN_UNREACHABLE_CODE = YES; 213 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 214 | CODE_SIGN_IDENTITY = "Mac Developer"; 215 | COPY_PHASE_STRIP = NO; 216 | CURRENT_PROJECT_VERSION = 1; 217 | DEBUG_INFORMATION_FORMAT = dwarf; 218 | ENABLE_STRICT_OBJC_MSGSEND = YES; 219 | ENABLE_TESTABILITY = YES; 220 | GCC_C_LANGUAGE_STANDARD = gnu11; 221 | GCC_DYNAMIC_NO_PIC = NO; 222 | GCC_NO_COMMON_BLOCKS = YES; 223 | GCC_OPTIMIZATION_LEVEL = 0; 224 | GCC_PREPROCESSOR_DEFINITIONS = ( 225 | "DEBUG=1", 226 | "$(inherited)", 227 | ); 228 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 229 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 230 | GCC_WARN_UNDECLARED_SELECTOR = YES; 231 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 232 | GCC_WARN_UNUSED_FUNCTION = YES; 233 | GCC_WARN_UNUSED_VARIABLE = YES; 234 | MACOSX_DEPLOYMENT_TARGET = 10.13; 235 | MTL_ENABLE_DEBUG_INFO = YES; 236 | ONLY_ACTIVE_ARCH = YES; 237 | SDKROOT = macosx; 238 | VERSIONING_SYSTEM = "apple-generic"; 239 | VERSION_INFO_PREFIX = ""; 240 | }; 241 | name = Debug; 242 | }; 243 | E5A74338204E2B8D00FE63B1 /* Release */ = { 244 | isa = XCBuildConfiguration; 245 | buildSettings = { 246 | ALWAYS_SEARCH_USER_PATHS = NO; 247 | CLANG_ANALYZER_NONNULL = YES; 248 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 249 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 250 | CLANG_CXX_LIBRARY = "libc++"; 251 | CLANG_ENABLE_MODULES = YES; 252 | CLANG_ENABLE_OBJC_ARC = YES; 253 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 254 | CLANG_WARN_BOOL_CONVERSION = YES; 255 | CLANG_WARN_COMMA = YES; 256 | CLANG_WARN_CONSTANT_CONVERSION = YES; 257 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 258 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 259 | CLANG_WARN_EMPTY_BODY = YES; 260 | CLANG_WARN_ENUM_CONVERSION = YES; 261 | CLANG_WARN_INFINITE_RECURSION = YES; 262 | CLANG_WARN_INT_CONVERSION = YES; 263 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 264 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 265 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 266 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 267 | CLANG_WARN_STRICT_PROTOTYPES = YES; 268 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 269 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 270 | CLANG_WARN_UNREACHABLE_CODE = YES; 271 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 272 | CODE_SIGN_IDENTITY = "Mac Developer"; 273 | COPY_PHASE_STRIP = NO; 274 | CURRENT_PROJECT_VERSION = 1; 275 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 276 | ENABLE_NS_ASSERTIONS = NO; 277 | ENABLE_STRICT_OBJC_MSGSEND = YES; 278 | GCC_C_LANGUAGE_STANDARD = gnu11; 279 | GCC_NO_COMMON_BLOCKS = YES; 280 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 281 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 282 | GCC_WARN_UNDECLARED_SELECTOR = YES; 283 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 284 | GCC_WARN_UNUSED_FUNCTION = YES; 285 | GCC_WARN_UNUSED_VARIABLE = YES; 286 | MACOSX_DEPLOYMENT_TARGET = 10.13; 287 | MTL_ENABLE_DEBUG_INFO = NO; 288 | SDKROOT = macosx; 289 | VERSIONING_SYSTEM = "apple-generic"; 290 | VERSION_INFO_PREFIX = ""; 291 | }; 292 | name = Release; 293 | }; 294 | E5A7433A204E2B8D00FE63B1 /* Debug */ = { 295 | isa = XCBuildConfiguration; 296 | buildSettings = { 297 | CODE_SIGN_IDENTITY = ""; 298 | CODE_SIGN_STYLE = Automatic; 299 | COMBINE_HIDPI_IMAGES = YES; 300 | DEFINES_MODULE = YES; 301 | DEVELOPMENT_TEAM = HSF5STP9ZR; 302 | DYLIB_COMPATIBILITY_VERSION = 1; 303 | DYLIB_CURRENT_VERSION = 1; 304 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 305 | FRAMEWORK_VERSION = A; 306 | INFOPLIST_FILE = libBaiduNetdiskPlugin/Info.plist; 307 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 308 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; 309 | PRODUCT_BUNDLE_IDENTIFIER = Net.CodeTips.libBaiduNetdiskPlugin; 310 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 311 | SKIP_INSTALL = YES; 312 | }; 313 | name = Debug; 314 | }; 315 | E5A7433B204E2B8D00FE63B1 /* Release */ = { 316 | isa = XCBuildConfiguration; 317 | buildSettings = { 318 | CODE_SIGN_IDENTITY = ""; 319 | CODE_SIGN_STYLE = Automatic; 320 | COMBINE_HIDPI_IMAGES = YES; 321 | DEFINES_MODULE = YES; 322 | DEVELOPMENT_TEAM = HSF5STP9ZR; 323 | DYLIB_COMPATIBILITY_VERSION = 1; 324 | DYLIB_CURRENT_VERSION = 1; 325 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 326 | FRAMEWORK_VERSION = A; 327 | INFOPLIST_FILE = libBaiduNetdiskPlugin/Info.plist; 328 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 329 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; 330 | PRODUCT_BUNDLE_IDENTIFIER = Net.CodeTips.libBaiduNetdiskPlugin; 331 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 332 | SKIP_INSTALL = YES; 333 | }; 334 | name = Release; 335 | }; 336 | /* End XCBuildConfiguration section */ 337 | 338 | /* Begin XCConfigurationList section */ 339 | E5A7432B204E2B8D00FE63B1 /* Build configuration list for PBXProject "libBaiduNetdiskPlugin" */ = { 340 | isa = XCConfigurationList; 341 | buildConfigurations = ( 342 | E5A74337204E2B8D00FE63B1 /* Debug */, 343 | E5A74338204E2B8D00FE63B1 /* Release */, 344 | ); 345 | defaultConfigurationIsVisible = 0; 346 | defaultConfigurationName = Release; 347 | }; 348 | E5A74339204E2B8D00FE63B1 /* Build configuration list for PBXNativeTarget "libBaiduNetdiskPlugin" */ = { 349 | isa = XCConfigurationList; 350 | buildConfigurations = ( 351 | E5A7433A204E2B8D00FE63B1 /* Debug */, 352 | E5A7433B204E2B8D00FE63B1 /* Release */, 353 | ); 354 | defaultConfigurationIsVisible = 0; 355 | defaultConfigurationName = Release; 356 | }; 357 | /* End XCConfigurationList section */ 358 | }; 359 | rootObject = E5A74328204E2B8D00FE63B1 /* Project object */; 360 | } 361 | --------------------------------------------------------------------------------