├── SpringbootProject ├── .gradle │ ├── 6.1 │ │ ├── gc.properties │ │ ├── fileChanges │ │ │ └── last-build.bin │ │ ├── fileHashes │ │ │ └── fileHashes.lock │ │ └── executionHistory │ │ │ └── executionHistory.lock │ ├── vcs-1 │ │ └── gc.properties │ ├── buildOutputCleanup │ │ ├── cache.properties │ │ └── buildOutputCleanup.lock │ └── checksums │ │ └── checksums.lock ├── src │ ├── main │ │ ├── resources │ │ │ └── application.properties │ │ └── java │ │ │ └── cn │ │ │ └── zxlee │ │ │ └── signatureanalysistest │ │ │ ├── vo │ │ │ ├── CommonVO.java │ │ │ └── LoginVO.java │ │ │ ├── SignatureAnalysisTestApplication.java │ │ │ ├── response │ │ │ └── CommonResponse.java │ │ │ ├── utils │ │ │ ├── AESUtils.java │ │ │ └── SignUtils.java │ │ │ └── controller │ │ │ └── LoginController.java │ └── test │ │ └── java │ │ └── cn │ │ └── zxlee │ │ └── signatureanalysistest │ │ └── SignatureAnalysisTestApplicationTests.java ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── .gitignore └── pom.xml ├── HookApp ├── HookApp │ ├── TargetApp │ │ ├── put ipa or app here │ │ └── TargetApp.app │ │ │ ├── PkgInfo │ │ │ ├── Assets.car │ │ │ ├── TargetApp │ │ │ ├── embedded.mobileprovision │ │ │ ├── LoginViewController.nib │ │ │ ├── runtime.nib │ │ │ └── objects-11.0+.nib │ │ │ ├── Base.lproj │ │ │ └── LaunchScreen.storyboardc │ │ │ │ ├── Info.plist │ │ │ │ ├── 01J-lp-oVM-view-Ze5-6b-2t3.nib │ │ │ │ └── UIViewController-01J-lp-oVM.nib │ │ │ └── Info.plist │ ├── icon.png │ ├── Scripts │ │ └── quick-resign.sh │ └── Info.plist ├── LatestBuild ├── HookAppDylib │ ├── Logos │ │ ├── HookAppDylib.xm │ │ ├── ZXHookUtil │ │ │ ├── Foundation │ │ │ │ ├── ZXDataHandle │ │ │ │ │ ├── ZXDataStore │ │ │ │ │ │ ├── SqlResult.m │ │ │ │ │ │ ├── SqlResult.h │ │ │ │ │ │ ├── ZXDataStoreSQlite.h │ │ │ │ │ │ ├── ZXClassArchived.m │ │ │ │ │ │ ├── NSObject+ZXSQliteHandle.h │ │ │ │ │ │ ├── ZXClassArchived.h │ │ │ │ │ │ └── ZXDataStoreCache.h │ │ │ │ │ ├── ZXDataHandle.h │ │ │ │ │ ├── ZXDataConvert │ │ │ │ │ │ ├── ZXDataConvertConfig.m │ │ │ │ │ │ ├── BaseTool │ │ │ │ │ │ │ ├── ZXClassPrint.h │ │ │ │ │ │ │ ├── ZXClassPrint.m │ │ │ │ │ │ │ ├── NSDictionary+ZXSafetySet.h │ │ │ │ │ │ │ ├── NSObject+ZXGetProperty.h │ │ │ │ │ │ │ ├── NSObject+ZXSafetySet.h │ │ │ │ │ │ │ ├── NSString+ZXDataConvert.h │ │ │ │ │ │ │ ├── NSMutableArray+ZXSafetySet.h │ │ │ │ │ │ │ ├── NSString+ZXRegular.h │ │ │ │ │ │ │ ├── NSDictionary+ZXSafetySet.m │ │ │ │ │ │ │ ├── ZXDecimalNumberTool.h │ │ │ │ │ │ │ ├── NSObject+ZXDataConvertRule.h │ │ │ │ │ │ │ ├── ZXDataType.h │ │ │ │ │ │ │ ├── ZXDecimalNumberTool.m │ │ │ │ │ │ │ ├── NSMutableArray+ZXSafetySet.m │ │ │ │ │ │ │ ├── NSObject+ZXSafetySet.m │ │ │ │ │ │ │ ├── NSObject+ZXDataConvertRule.m │ │ │ │ │ │ │ ├── NSObject+ZXGetProperty.m │ │ │ │ │ │ │ ├── NSString+ZXDataConvert.m │ │ │ │ │ │ │ └── NSString+ZXRegular.m │ │ │ │ │ │ ├── NSData+ZXDataConvert.h │ │ │ │ │ │ ├── NSData+ZXDataConvert.m │ │ │ │ │ │ ├── NSObject+ZXToDic.h │ │ │ │ │ │ ├── NSArray+ZXDataConvert.h │ │ │ │ │ │ ├── NSDictionary+ZXDataConvert.h │ │ │ │ │ │ ├── NSObject+ZXToModel.h │ │ │ │ │ │ ├── NSObject+ZXToJson.h │ │ │ │ │ │ ├── ZXDataConvertConfig.h │ │ │ │ │ │ ├── ZXDataConvert.h │ │ │ │ │ │ ├── NSArray+ZXDataConvert.m │ │ │ │ │ │ ├── NSDictionary+ZXDataConvert.m │ │ │ │ │ │ ├── NSObject+ZXToDic.m │ │ │ │ │ │ └── NSObject+ZXToJson.m │ │ │ │ │ ├── ZXDataHandleHeaders.h │ │ │ │ │ └── ZXDataHandleLog.h │ │ │ │ ├── ZXRequestBlock │ │ │ │ │ ├── ZXHttpIPGet.h │ │ │ │ │ ├── ZXURLProtocol.h │ │ │ │ │ ├── NSURLSession+ZXHttpProxy.h │ │ │ │ │ ├── ZXRequestBlock.h │ │ │ │ │ ├── NSURLSession+ZXHttpProxy.m │ │ │ │ │ ├── ZXHttpIPGet.m │ │ │ │ │ └── ZXURLProtocol.m │ │ │ │ ├── ZXBlockLog │ │ │ │ │ ├── ZXBlockLogTool.h │ │ │ │ │ ├── ZXBlockLog.h │ │ │ │ │ ├── ZXBlockLogResult.h │ │ │ │ │ ├── ZXBlockLog.m │ │ │ │ │ ├── CTBlockDescription.h │ │ │ │ │ ├── ZXBlockLogResult.m │ │ │ │ │ ├── CTBlockDescription.m │ │ │ │ │ └── ZXBlockLogTool.m │ │ │ │ ├── ZXPoll │ │ │ │ │ ├── ZXPoll.h │ │ │ │ │ └── ZXPoll.m │ │ │ │ ├── Encryption │ │ │ │ │ ├── ZXEncryption.h │ │ │ │ │ ├── ZXEncryption.m │ │ │ │ │ └── CocoaSecurity │ │ │ │ │ │ └── Base64 │ │ │ │ │ │ └── Base64.h │ │ │ │ ├── MethodLog │ │ │ │ │ ├── BaseClass │ │ │ │ │ │ ├── ZXHookClassPro.h │ │ │ │ │ │ ├── ZXHookClass.h │ │ │ │ │ │ ├── NSObject+ZXHookClassUtil.h │ │ │ │ │ │ ├── ZXHookClassMethod.h │ │ │ │ │ │ ├── ZXHookClass.m │ │ │ │ │ │ ├── ANYMethodLog.h │ │ │ │ │ │ ├── ZXHookClassPro.m │ │ │ │ │ │ └── ZXHookClassMethod.m │ │ │ │ │ └── ZXMethodLog.h │ │ │ │ └── HttpRequest │ │ │ │ │ ├── ZXHttpRequest.h │ │ │ │ │ └── ZXHttpRequest.m │ │ │ ├── Category │ │ │ │ ├── NSObject+ZXHandleLoad.h │ │ │ │ ├── UIViewController+ZXHandleLoad.h │ │ │ │ ├── NSObject+ZXHandleLoad.m │ │ │ │ ├── NSString+ZXHookRegular.h │ │ │ │ ├── UIViewController+ZXHandleLoad.m │ │ │ │ └── NSString+ZXHookRegular.m │ │ │ ├── UIKit │ │ │ │ ├── ShadowView │ │ │ │ │ ├── ZXShadowView.h │ │ │ │ │ ├── ZXShowImgView.h │ │ │ │ │ ├── UIView+ZXFrame.h │ │ │ │ │ ├── ZXShowImgView.m │ │ │ │ │ ├── UIView+ZXFrame.m │ │ │ │ │ └── ZXShadowView.m │ │ │ │ ├── UIButton │ │ │ │ │ ├── UIButton+ZXAddAction.h │ │ │ │ │ ├── UIButton+ZXHookAction.h │ │ │ │ │ ├── UIButton+ZXAddAction.m │ │ │ │ │ └── UIButton+ZXHookAction.m │ │ │ │ ├── UIAlert │ │ │ │ │ ├── UIViewController+ZXAlert.h │ │ │ │ │ └── UIViewController+ZXAlert.m │ │ │ │ ├── ImagePicker │ │ │ │ │ └── ZXImagePicker.h │ │ │ │ └── UIGet │ │ │ │ │ ├── UIView+ZXHookUIGet.h │ │ │ │ │ ├── ZXHookUIGet.h │ │ │ │ │ └── UIView+ZXHookUIGet.m │ │ │ ├── ZXCodeFloor.h │ │ │ └── ZXCodeFloor.m │ │ └── HookAppDylib.mm │ ├── HookAppDylib-Prefix.pch │ ├── HookAppDylib.h │ ├── Tools │ │ └── LLDBTools.h │ ├── Config │ │ ├── MDCycriptManager.h │ │ ├── MDMethodTrace.h │ │ ├── MDConfigManager.m │ │ └── MDConfigManager.h │ ├── Trace │ │ ├── OCSelectorTrampolines.h │ │ ├── selectortramps.mac │ │ ├── OCMethodTrace.h │ │ └── a1a2-selectortramps-arm64.s │ ├── HookAppDylib.m │ └── fishhook │ │ └── fishhook.h └── HookApp.xcodeproj │ └── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── .gitattributes ├── TargetApp ├── TargetApp │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── bird.imageset │ │ │ ├── yuanquanxiaoniao.png │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── LoginViewController │ │ ├── LoginViewController.h │ │ └── LoginViewController.m │ ├── AppDelegate.h │ ├── main.m │ ├── ThirdParty │ │ └── Encryption │ │ │ ├── EncryptionTool.h │ │ │ └── CocoaSecurity │ │ │ └── Base64 │ │ │ └── Base64.h │ ├── HttpRequest │ │ └── HttpRequest.h │ ├── Info.plist │ ├── AppDelegate.m │ └── Base.lproj │ │ └── LaunchScreen.storyboard ├── TargetApp.xcodeproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── TargetAppTests │ ├── Info.plist │ └── TargetAppTests.m └── TargetAppUITests │ ├── Info.plist │ └── TargetAppUITests.m ├── Headers ├── CocoaSecurityDecoder.h ├── CocoaSecurityEncoder.h ├── NSData-Base64.h ├── NSString-Base64.h ├── EncryptionTool.h ├── MBProgressHUDRoundedButton.h ├── CDStructures.h ├── HttpRequest.h ├── CocoaSecurityResult.h ├── LoginViewController.h ├── MBBarProgressView.h ├── MBRoundProgressView.h ├── NSObject-Protocol.h ├── AppDelegate.h ├── MBBackgroundView.h ├── UIView-Toast.h ├── CSToastManager.h ├── CocoaSecurity.h └── CSToastStyle.h ├── LICENSE └── .gitignore /SpringbootProject/.gradle/6.1/gc.properties: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /HookApp/HookApp/TargetApp/put ipa or app here: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /SpringbootProject/.gradle/vcs-1/gc.properties: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /HookApp/HookApp/TargetApp/TargetApp.app/PkgInfo: -------------------------------------------------------------------------------- 1 | APPL???? -------------------------------------------------------------------------------- /SpringbootProject/.gradle/6.1/fileChanges/last-build.bin: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /SpringbootProject/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /HookApp/HookApp/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmileZXLee/iOSSignatureAnalysis/HEAD/HookApp/HookApp/icon.png -------------------------------------------------------------------------------- /SpringbootProject/.gradle/buildOutputCleanup/cache.properties: -------------------------------------------------------------------------------- 1 | #Fri Jan 21 19:44:37 CST 2022 2 | gradle.version=6.1 3 | -------------------------------------------------------------------------------- /HookApp/LatestBuild: -------------------------------------------------------------------------------- 1 | /Users/mac/Library/Developer/Xcode/DerivedData/HookApp-bkkdrjtesmsmkjewkuuuxztembfp/Build/Products/Debug-iphoneos -------------------------------------------------------------------------------- /TargetApp/TargetApp/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /SpringbootProject/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmileZXLee/iOSSignatureAnalysis/HEAD/SpringbootProject/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /HookApp/HookApp/TargetApp/TargetApp.app/Assets.car: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmileZXLee/iOSSignatureAnalysis/HEAD/HookApp/HookApp/TargetApp/TargetApp.app/Assets.car -------------------------------------------------------------------------------- /HookApp/HookApp/TargetApp/TargetApp.app/TargetApp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmileZXLee/iOSSignatureAnalysis/HEAD/HookApp/HookApp/TargetApp/TargetApp.app/TargetApp -------------------------------------------------------------------------------- /SpringbootProject/.gradle/checksums/checksums.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmileZXLee/iOSSignatureAnalysis/HEAD/SpringbootProject/.gradle/checksums/checksums.lock -------------------------------------------------------------------------------- /SpringbootProject/.gradle/6.1/fileHashes/fileHashes.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmileZXLee/iOSSignatureAnalysis/HEAD/SpringbootProject/.gradle/6.1/fileHashes/fileHashes.lock -------------------------------------------------------------------------------- /HookApp/HookApp/TargetApp/TargetApp.app/embedded.mobileprovision: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmileZXLee/iOSSignatureAnalysis/HEAD/HookApp/HookApp/TargetApp/TargetApp.app/embedded.mobileprovision -------------------------------------------------------------------------------- /SpringbootProject/.gradle/6.1/executionHistory/executionHistory.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmileZXLee/iOSSignatureAnalysis/HEAD/SpringbootProject/.gradle/6.1/executionHistory/executionHistory.lock -------------------------------------------------------------------------------- /SpringbootProject/.gradle/buildOutputCleanup/buildOutputCleanup.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmileZXLee/iOSSignatureAnalysis/HEAD/SpringbootProject/.gradle/buildOutputCleanup/buildOutputCleanup.lock -------------------------------------------------------------------------------- /TargetApp/TargetApp/Assets.xcassets/bird.imageset/yuanquanxiaoniao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmileZXLee/iOSSignatureAnalysis/HEAD/TargetApp/TargetApp/Assets.xcassets/bird.imageset/yuanquanxiaoniao.png -------------------------------------------------------------------------------- /HookApp/HookApp/TargetApp/TargetApp.app/LoginViewController.nib/runtime.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmileZXLee/iOSSignatureAnalysis/HEAD/HookApp/HookApp/TargetApp/TargetApp.app/LoginViewController.nib/runtime.nib -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/HookAppDylib.xm: -------------------------------------------------------------------------------- 1 | // See http://iphonedevwiki.net/index.php/Logos 2 | 3 | #import 4 | 5 | #import "ZXCodeFloor.h" 6 | 7 | %ctor{ 8 | [ZXCodeFloor initAction]; 9 | } 10 | 11 | -------------------------------------------------------------------------------- /HookApp/HookApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /HookApp/HookApp/TargetApp/TargetApp.app/LoginViewController.nib/objects-11.0+.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmileZXLee/iOSSignatureAnalysis/HEAD/HookApp/HookApp/TargetApp/TargetApp.app/LoginViewController.nib/objects-11.0+.nib -------------------------------------------------------------------------------- /HookApp/HookApp/TargetApp/TargetApp.app/Base.lproj/LaunchScreen.storyboardc/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmileZXLee/iOSSignatureAnalysis/HEAD/HookApp/HookApp/TargetApp/TargetApp.app/Base.lproj/LaunchScreen.storyboardc/Info.plist -------------------------------------------------------------------------------- /TargetApp/TargetApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /HookApp/HookApp/TargetApp/TargetApp.app/Base.lproj/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmileZXLee/iOSSignatureAnalysis/HEAD/HookApp/HookApp/TargetApp/TargetApp.app/Base.lproj/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib -------------------------------------------------------------------------------- /HookApp/HookApp/TargetApp/TargetApp.app/Base.lproj/LaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmileZXLee/iOSSignatureAnalysis/HEAD/HookApp/HookApp/TargetApp/TargetApp.app/Base.lproj/LaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib -------------------------------------------------------------------------------- /SpringbootProject/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.3/apache-maven-3.8.3-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar 3 | -------------------------------------------------------------------------------- /TargetApp/TargetApp/LoginViewController/LoginViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // LoginViewController.h 3 | // TargetApp 4 | // 5 | // Created by 李兆祥 on 2022/1/20. 6 | // 7 | 8 | #import 9 | 10 | @interface LoginViewController : UIViewController 11 | 12 | 13 | @end 14 | 15 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/HookAppDylib-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'HookAppDylib' target in the 'HookAppDylib' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #import "/opt/theos/Prefix.pch" //path/to/theos/Prefix.pch 8 | #endif 9 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXDataHandle/ZXDataStore/SqlResult.m: -------------------------------------------------------------------------------- 1 | // 2 | // SqlResult.m 3 | // ZXDataHandleDemo 4 | // 5 | // Created by 李兆祥 on 2019/3/30. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import "SqlResult.h" 10 | 11 | @implementation SqlResult 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /HookApp/HookApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Category/NSObject+ZXHandleLoad.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+ZXHandleLoad.h 3 | // ZXHookUtilDemoDylib 4 | // 5 | // Created by 李兆祥 on 2019/3/10. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSObject (ZXHandleLoad) 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /TargetApp/TargetApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Category/UIViewController+ZXHandleLoad.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+ZXHandleLoad.h 3 | // ZXHookUtilDemoDylib 4 | // 5 | // Created by 李兆祥 on 2019/3/10. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIViewController (ZXHandleLoad) 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/UIKit/ShadowView/ZXShadowView.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZXShadowView.h 3 | // ZXHookUtilDemoDylib 4 | // 5 | // Created by 李兆祥 on 2019/3/11. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ZXShadowView : UIView 12 | -(void)show; 13 | -(void)disMiss; 14 | @end 15 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXDataHandle/ZXDataHandle.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZXDataHandle.h 3 | // ZXDataHandleDemo 4 | // 5 | // Created by 李兆祥 on 2019/3/30. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #ifndef ZXDataHandle_h 10 | #define ZXDataHandle_h 11 | #import "ZXDataHandleHeaders.h" 12 | #endif /* ZXDataHandle_h */ 13 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/UIKit/ShadowView/ZXShowImgView.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZXShowImgView.h 3 | // ZXHookUtilDemoDylib 4 | // 5 | // Created by 李兆祥 on 2019/3/11. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import "ZXShadowView.h" 10 | 11 | @interface ZXShowImgView : ZXShadowView 12 | -(void)showWithImg:(UIImage *)img; 13 | @end 14 | -------------------------------------------------------------------------------- /TargetApp/TargetApp/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // TargetApp 4 | // 5 | // Created by 李兆祥 on 2022/1/23. 6 | // Copyright © 2022 李兆祥. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/HookAppDylib.mm: -------------------------------------------------------------------------------- 1 | #line 1 "/Users/mac/Documents/GitHub/iOSSignatureAnalysis/HookApp/HookAppDylib/Logos/HookAppDylib.xm" 2 | 3 | 4 | #import 5 | 6 | #import "ZXCodeFloor.h" 7 | 8 | static __attribute__((constructor)) void _logosLocalCtor_f292e0e3(int __unused argc, char __unused **argv, char __unused **envp){ 9 | [ZXCodeFloor initAction]; 10 | } 11 | 12 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXRequestBlock/ZXHttpIPGet.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZXHttpIPGet.h 3 | // ZXRequestBlockDemo 4 | // 5 | // Created by 李兆祥 on 2018/8/26. 6 | // Copyright © 2018年 李兆祥. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ZXHttpIPGet : NSObject 12 | +(NSString *)getIPArrFromLocalDnsWithUrlStr:(NSString *)urlStr; 13 | @end 14 | -------------------------------------------------------------------------------- /SpringbootProject/src/test/java/cn/zxlee/signatureanalysistest/SignatureAnalysisTestApplicationTests.java: -------------------------------------------------------------------------------- 1 | package cn.zxlee.signatureanalysistest; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SignatureAnalysisTestApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /SpringbootProject/src/main/java/cn/zxlee/signatureanalysistest/vo/CommonVO.java: -------------------------------------------------------------------------------- 1 | package cn.zxlee.signatureanalysistest.vo; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * @program: signature-analysis-test 7 | * @description: CommonVO 8 | * @author: zxlee 9 | * @create: 2022-01-21 10 | **/ 11 | @Data 12 | public class CommonVO { 13 | private String timestamp; 14 | private String sign; 15 | } 16 | -------------------------------------------------------------------------------- /Headers/CocoaSecurityDecoder.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @interface CocoaSecurityDecoder : NSObject 10 | { 11 | } 12 | 13 | - (id)hex:(id)arg1; 14 | - (id)base64:(id)arg1; 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXDataHandle/ZXDataConvert/ZXDataConvertConfig.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZXDataConvertConfig.m 3 | // ZXDataHandleDemo 4 | // 5 | // Created by 李兆祥 on 2020/11/14. 6 | // Copyright © 2020 李兆祥. All rights reserved. 7 | // GitHub:https://github.com/SmileZXLee/ZXDataHandle 8 | 9 | #import "ZXDataConvertConfig.h" 10 | 11 | @implementation ZXDataConvertConfig 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /TargetApp/TargetApp/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // TargetApp 4 | // 5 | // Created by 李兆祥 on 2022/1/23. 6 | // Copyright © 2022 李兆祥. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/UIKit/UIButton/UIButton+ZXAddAction.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIButton+ZXAddAction.h 3 | // ZXHookUtilDemoDylib 4 | // 5 | // Created by 李兆祥 on 2019/3/10. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import 10 | typedef void(^ZXActionBlock)(UIButton *button); 11 | @interface UIButton (ZXAddAction) 12 | -(void)addClickAction:(ZXActionBlock)callBack; 13 | @end 14 | -------------------------------------------------------------------------------- /Headers/CocoaSecurityEncoder.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @interface CocoaSecurityEncoder : NSObject 10 | { 11 | } 12 | 13 | - (id)hex:(id)arg1 useLower:(_Bool)arg2; 14 | - (id)base64:(id)arg1; 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/UIKit/UIAlert/UIViewController+ZXAlert.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+ZXAlert.h 3 | // ZXHookUtilDemoDylib 4 | // 5 | // Created by 李兆祥 on 2019/3/11. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIViewController (ZXAlert) 12 | -(void)showAlert:(NSString *)text; 13 | -(void)showAlertWithTitle:(NSString *)title msg:(NSString *)msg; 14 | @end 15 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/ZXCodeFloor.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZXCodeFloor.h 3 | // ZXHookUtilDemoDylib 4 | // 5 | // Created by 李兆祥 on 2019/3/10. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 书写业务代码 8 | // Github:https://github.com/SmileZXLee/ZXHookUtil 9 | 10 | #import 11 | #import "ZXHookUtil.h" 12 | @interface ZXCodeFloor : NSObject 13 | +(void)handleObj:(id)obj; 14 | +(void)initAction; 15 | @end 16 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXBlockLog/ZXBlockLogTool.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZXBlockLogTool.h 3 | // ZXBlockLogDemo 4 | // 5 | // Created by 李兆祥 on 2019/5/20. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface ZXBlockLogTool : NSObject 14 | + (NSString *)getDecWithType:(const char *)type; 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/UIKit/UIButton/UIButton+ZXHookAction.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIButton+ZXHookEvent.h 3 | // ZXHookUtilDemoDylib 4 | // 5 | // Created by 李兆祥 on 2019/2/18. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIButton (ZXHookAction) 12 | ///获取按钮所有点击事件方法 13 | -(NSMutableDictionary *)getAllTouchUpAction; 14 | ///直接调用按钮的所有点击事件方法 15 | -(void)callBtnActions; 16 | @end 17 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXRequestBlock/ZXURLProtocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZXURLProtocol.h 3 | // ZXRequestBlockDemo 4 | // 5 | // Created by 李兆祥 on 2018/8/26. 6 | // Copyright © 2018年 李兆祥. All rights reserved. 7 | // 8 | 9 | #import 10 | @interface ZXURLProtocol : NSURLProtocol 11 | @property (nonatomic, copy) NSURLRequest *(^requestBlock)(NSURLRequest *request); 12 | +(instancetype)sharedInstance; 13 | @end 14 | -------------------------------------------------------------------------------- /TargetApp/TargetApp/Assets.xcassets/bird.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "yuanquanxiaoniao.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Headers/NSData-Base64.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @interface NSData (Base64) 10 | + (id)dataWithBase64EncodedString:(id)arg1; 11 | - (id)base64EncodedString; 12 | - (id)base64EncodedStringWithWrapWidth:(unsigned long long)arg1; 13 | @end 14 | 15 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXDataHandle/ZXDataConvert/BaseTool/ZXClassPrint.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZXClassPrint.h 3 | // ZXDataHandleDemo 4 | // 5 | // Created by 李兆祥 on 2019/1/27. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // GitHub:https://github.com/SmileZXLee/ZXDataHandle 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface ZXClassPrint : NSObject 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXDataHandle/ZXDataConvert/NSData+ZXDataConvert.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+ZXDataConvert.h 3 | // ZXDataHandleDemo 4 | // 5 | // Created by 李兆祥 on 2019/2/25. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface NSData (ZXDataConvert) 14 | ///data转json字符串 15 | -(NSString *)zx_dataToJsonStr; 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXDataHandle/ZXDataConvert/NSData+ZXDataConvert.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+ZXDataConvert.m 3 | // ZXDataHandleDemo 4 | // 5 | // Created by 李兆祥 on 2019/2/25. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import "NSData+ZXDataConvert.h" 10 | 11 | @implementation NSData (ZXDataConvert) 12 | -(NSString *)zx_dataToJsonStr{ 13 | return [[NSString alloc] initWithData:self encoding:NSUTF8StringEncoding]; 14 | } 15 | @end 16 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXRequestBlock/NSURLSession+ZXHttpProxy.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSURLSession+ZXHttpProxy.h 3 | // ZXRequestBlockDemo 4 | // 5 | // Created by 李兆祥 on 2019/4/10. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface NSURLSession (ZXHttpProxy) 14 | +(void)disableHttpProxy; 15 | +(void)enableHttpProxy; 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXPoll/ZXPoll.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZXPoll.h 3 | // ZXHookUtilDemoDylib 4 | // 5 | // Created by 李兆祥 on 2019/3/9. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import 10 | typedef void(^pollPerStepBlock)(void); 11 | @interface ZXPoll : NSObject 12 | @property(nonatomic,assign)BOOL run; 13 | -(void)addTimerWithSec:(long)sec callBack:(pollPerStepBlock)pollPerStepBlock; 14 | -(void)removeTimer; 15 | @end 16 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXDataHandle/ZXDataConvert/BaseTool/ZXClassPrint.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZXClassPrint.m 3 | // ZXDataHandleDemo 4 | // 5 | // Created by 李兆祥 on 2019/1/27. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // GitHub:https://github.com/SmileZXLee/ZXDataHandle 8 | 9 | #import "ZXClassPrint.h" 10 | #import "NSObject+ZXToJson.h" 11 | @implementation ZXClassPrint 12 | - (NSString *)description { 13 | return [self zx_toJsonStr]; 14 | } 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXDataHandle/ZXDataConvert/NSObject+ZXToDic.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+ZXToDic.h 3 | // ZXDataHandleDemo 4 | // 5 | // Created by 李兆祥 on 2019/1/27. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // GitHub:https://github.com/SmileZXLee/ZXDataHandle 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface NSObject (ZXToDic) 14 | ///任意类型转字典 15 | -(id)zx_toDic; 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/UIKit/ImagePicker/ZXImagePicker.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZXImagePicker.h 3 | // ZXHookUtilDemoDylib 4 | // 5 | // Created by 李兆祥 on 2019/3/11. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // From https://www.jianshu.com/p/d87ffcbbb53b 8 | 9 | #import 10 | #import 11 | typedef void (^ImagePickerBlock)(UIImage *image); 12 | @interface ZXImagePicker : NSObject 13 | - (void)getPhotoBlock:(ImagePickerBlock)photoBlock; 14 | @end 15 | -------------------------------------------------------------------------------- /SpringbootProject/src/main/java/cn/zxlee/signatureanalysistest/vo/LoginVO.java: -------------------------------------------------------------------------------- 1 | package cn.zxlee.signatureanalysistest.vo; 2 | 3 | import lombok.Data; 4 | import lombok.ToString; 5 | 6 | /** 7 | * @program: signature-analysis-test 8 | * @description: LoginVO 9 | * @author: zxlee 10 | * @create: 2022-01-21 11 | **/ 12 | @ToString(callSuper = true) 13 | @Data 14 | public class LoginVO extends CommonVO { 15 | //用户账号 16 | private String account; 17 | //用户密码 18 | private String password; 19 | } -------------------------------------------------------------------------------- /SpringbootProject/src/main/java/cn/zxlee/signatureanalysistest/SignatureAnalysisTestApplication.java: -------------------------------------------------------------------------------- 1 | package cn.zxlee.signatureanalysistest; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SignatureAnalysisTestApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SignatureAnalysisTestApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Category/NSObject+ZXHandleLoad.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+ZXHandleLoad.m 3 | // ZXHookUtilDemoDylib 4 | // 5 | // Created by 李兆祥 on 2019/3/10. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import "NSObject+ZXHandleLoad.h" 10 | #import "NSObject+ZXHookClassUtil.h" 11 | #import "ZXMethodLog.h" 12 | typedef void (* _VIMP)(id, SEL, ...); 13 | 14 | @implementation NSObject (ZXHandleLoad) 15 | 16 | + (void)load{ 17 | NSLog(@"loadClass[%@]",self); 18 | } 19 | @end 20 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXBlockLog/ZXBlockLog.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZXBlockLog.h 3 | // ZXBlockLogDemo 4 | // 5 | // Created by 李兆祥 on 2019/5/20. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "ZXBlockLogResult.h" 11 | NS_ASSUME_NONNULL_BEGIN 12 | #define ZXBlockLog(block) [ZXBlockLog logWithBlock:block].description 13 | @interface ZXBlockLog : NSObject 14 | + (ZXBlockLogResult *)logWithBlock:(id)block; 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /Headers/NSString-Base64.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @interface NSString (Base64) 10 | + (id)stringWithBase64EncodedString:(id)arg1; 11 | - (id)base64DecodedData; 12 | - (id)base64DecodedString; 13 | - (id)base64EncodedString; 14 | - (id)base64EncodedStringWithWrapWidth:(unsigned long long)arg1; 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXDataHandle/ZXDataStore/SqlResult.h: -------------------------------------------------------------------------------- 1 | // 2 | // SqlResult.h 3 | // ZXDataHandleDemo 4 | // 5 | // Created by 李兆祥 on 2019/3/30. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface SqlResult : NSObject 14 | @property(nonatomic,assign)BOOL success; 15 | @property(nonatomic,strong)NSArray *resData; 16 | @property(nonatomic,assign)char *error; 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXDataHandle/ZXDataConvert/BaseTool/NSDictionary+ZXSafetySet.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+ZXSafetySet.h 3 | // ZXDataHandleDemo 4 | // 5 | // Created by 李兆祥 on 2019/1/27. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // GitHub:https://github.com/SmileZXLee/ZXDataHandle 8 | 9 | #import 10 | 11 | @interface NSDictionary (ZXSafetySet) 12 | -(id)zx_dicSafetyReadForKey:(NSString *)key; 13 | -(void)zx_dicSaftySetValue:(id)value forKey:(NSString *)key; 14 | @end 15 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/Encryption/ZXEncryption.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZXEncryption.h 3 | // ZXHookUtilDemoDylib 4 | // 5 | // Created by 李兆祥 on 2019/3/11. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // From https://github.com/kelp404/CocoaSecurity 8 | 9 | #import 10 | 11 | @interface ZXEncryption : NSObject 12 | +(NSString *)aesDecryptWithBase64:(NSString *)data key:(NSString *)key; 13 | +(NSString *)aesEncrypt:(NSString *)data key:(NSString *)key; 14 | +(NSString *)md5:(NSString *)hashString; 15 | @end 16 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXDataHandle/ZXDataConvert/BaseTool/NSObject+ZXGetProperty.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+ZXGetProperty.h 3 | // ZXDataHandleDemo 4 | // 5 | // Created by 李兆祥 on 2019/1/27. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 获取类的属性 8 | 9 | #import 10 | typedef void(^kEnumEventHandler) (NSString *proName,NSString *proType); 11 | @interface NSObject (ZXGetProperty) 12 | +(void)getEnumPropertyNamesCallBack:(kEnumEventHandler)_result; 13 | +(NSMutableArray *)getAllPropertyNames; 14 | @end 15 | -------------------------------------------------------------------------------- /TargetApp/TargetApp/ThirdParty/Encryption/EncryptionTool.h: -------------------------------------------------------------------------------- 1 | // 2 | // EncryptionTool.h 3 | // TargetApp 4 | // 5 | // Created by 李兆祥 on 2019/3/8. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface EncryptionTool : NSObject 14 | 15 | +(NSString *)aesDecryptWithBase64:(NSString *)data key:(NSString *)key; 16 | +(NSString *)aesEncrypt:(NSString *)data key:(NSString *)key; 17 | + (NSString *)md5Hex:(NSString *)input; 18 | @end 19 | 20 | NS_ASSUME_NONNULL_END 21 | -------------------------------------------------------------------------------- /Headers/EncryptionTool.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @interface EncryptionTool : NSObject 10 | { 11 | } 12 | 13 | + (id)AES128Decrypt:(id)arg1 key:(id)arg2; 14 | + (id)AES128Encrypt:(id)arg1 key:(id)arg2; 15 | + (id)md5Hex:(id)arg1; 16 | + (id)aesDecryptWithBase64:(id)arg1 key:(id)arg2; 17 | + (id)aesEncrypt:(id)arg1 key:(id)arg2; 18 | 19 | @end 20 | 21 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/MethodLog/BaseClass/ZXHookClassPro.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZXHoolClassPro.h 3 | // ZXHookUtilDemoDylib 4 | // 5 | // Created by 李兆祥 on 2019/2/16. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | @interface ZXHookClassPro : NSObject 12 | @property(nonatomic, copy)NSString *proName; 13 | @property(nonatomic, copy)NSString *proType; 14 | @property(nonatomic, copy)NSString *proTypeOrg; 15 | @property(nonatomic, assign)objc_property_t pro; 16 | @end 17 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXDataHandle/ZXDataConvert/NSArray+ZXDataConvert.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+ZXDataConvert.h 3 | // ZXDataHandleDemo 4 | // 5 | // Created by 李兆祥 on 2019/1/27. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // GitHub:https://github.com/SmileZXLee/ZXDataHandle 8 | 9 | 10 | 11 | #import 12 | #import 13 | 14 | @interface NSArray (ZXDataConvert) 15 | ///字典数组转json字符串 16 | -(NSString *)zx_arrToJsonStr; 17 | ///字典数组转jsonData 18 | -(NSData *)zx_arrToJSONData; 19 | @end 20 | 21 | 22 | -------------------------------------------------------------------------------- /SpringbootProject/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/**/target/ 5 | !**/src/test/**/target/ 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | !**/src/main/**/build/ 30 | !**/src/test/**/build/ 31 | 32 | ### VS Code ### 33 | .vscode/ 34 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/MethodLog/BaseClass/ZXHookClass.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZXHookClass.h 3 | // ZXHookUtilDemoDylib 4 | // 5 | // Created by 李兆祥 on 2019/2/16. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import "ZXHookClassPro.h" 12 | #import "ZXHookClassMethod.h" 13 | @interface ZXHookClass : NSObject 14 | @property(nonatomic, strong)NSMutableArray *classProsArr; 15 | @property(nonatomic, strong)NSMutableArray *classMethodsArr; 16 | @end 17 | -------------------------------------------------------------------------------- /Headers/MBProgressHUDRoundedButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @interface MBProgressHUDRoundedButton : UIButton 10 | { 11 | } 12 | 13 | - (void)setHighlighted:(_Bool)arg1; 14 | - (void)setTitleColor:(id)arg1 forState:(unsigned long long)arg2; 15 | - (struct CGSize)intrinsicContentSize; 16 | - (void)layoutSubviews; 17 | - (id)initWithFrame:(struct CGRect)arg1; 18 | 19 | @end 20 | 21 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXDataHandle/ZXDataConvert/BaseTool/NSObject+ZXSafetySet.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+ZXSafetySet.h 3 | // ZXDataHandleDemo 4 | // 5 | // Created by 李兆祥 on 2019/1/27. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // GitHub:https://github.com/SmileZXLee/ZXDataHandle 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface NSObject (ZXSafetySet) 14 | -(id)zx_objSafetyReadForKey:(NSString *)key; 15 | -(void)zx_objSaftySetValue:(id)value forKey:(NSString *)key; 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXDataHandle/ZXDataConvert/NSDictionary+ZXDataConvert.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+ZXDataConvert.h 3 | // ZXDataHandleDemo 4 | // 5 | // Created by 李兆祥 on 2019/1/27. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // GitHub:https://github.com/SmileZXLee/ZXDataHandle 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface NSDictionary (ZXDataConvert) 14 | ///字典转json字符串 15 | -(NSString *)zx_dicToJsonStr; 16 | ///字典转jsonData 17 | -(NSData *)zx_dicToJSONData; 18 | @end 19 | 20 | NS_ASSUME_NONNULL_END 21 | -------------------------------------------------------------------------------- /TargetApp/TargetApp/HttpRequest/HttpRequest.h: -------------------------------------------------------------------------------- 1 | // 2 | // HttpRequest.h 3 | // TargetApp 4 | // 5 | // Created by 李兆祥 on 2022/1/20. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface HttpRequest : NSObject 13 | typedef void(^kGetDataEventHandler) (BOOL result, id data); 14 | ///post请求 postData是一个字典 15 | +(void)postInterface:(NSString *)interface postData:(id)postData callBack:(kGetDataEventHandler)_result; 16 | ///get请求 17 | +(void)getInterface:(NSString *)interface callBack:(kGetDataEventHandler)_result; 18 | @end 19 | 20 | NS_ASSUME_NONNULL_END 21 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/MethodLog/BaseClass/NSObject+ZXHookClassUtil.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+ZXHookClassUtil.h 3 | // ZXHookUtilDemoDylib 4 | // 5 | // Created by 李兆祥 on 2019/2/16. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "ZXHookClass.h" 11 | @interface NSObject (ZXHookClassUtil) 12 | +(ZXHookClass *)getClassContent; 13 | +(NSMutableDictionary *)getClassContentRecursive; 14 | +(NSArray *)getSubClass; 15 | +(NSArray *)getSuperClass; 16 | +(BOOL)isFoundationClass:(Class)cls; 17 | +(BOOL)isFoundationClass; 18 | @end 19 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXDataHandle/ZXDataConvert/BaseTool/NSString+ZXDataConvert.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+ZXDataConvert.h 3 | // ZXDataHandleDemo 4 | // 5 | // Created by 李兆祥 on 2019/1/27. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // GitHub:https://github.com/SmileZXLee/ZXDataHandle 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface NSString (ZXDataConvert) 14 | ///json转字典 15 | -(id)zx_jsonToDic; 16 | ///下划线转驼峰 17 | -(NSString *)strToHump; 18 | ///驼峰转下划线 19 | -(NSString *)strToUnderLine; 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /HookApp/HookApp/Scripts/quick-resign.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Usage 4 | # Must be an absolute path 5 | 6 | # ./quick-resign.sh [insert] "origin.ipa path" "resign.ipa path" 7 | 8 | INSERT_DYLIB=NO 9 | INPUT_PATH=$1 10 | OUTPUT_PATH=$2 11 | 12 | if [[ $1 == "insert" ]];then 13 | INSERT_DYLIB=YES 14 | INPUT_PATH=$2 15 | OUTPUT_PATH=$3 16 | fi 17 | 18 | if [[ ! $OUTPUT_PATH ]];then 19 | OUTPUT_PATH=$PWD 20 | fi 21 | 22 | cp -rf $INPUT_PATH ../TargetApp/ 23 | cd ../../ 24 | xcodebuild MONKEYDEV_INSERT_DYLIB=$INSERT_DYLIB | xcpretty 25 | cd LatestBuild 26 | ./createIPA.command 27 | cp -rf Target.ipa $OUTPUT_PATH 28 | exit 0 -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXBlockLog/ZXBlockLogResult.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZXBlockLogResult.h 3 | // ZXBlockLogDemo 4 | // 5 | // Created by 李兆祥 on 2019/5/20. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface ZXBlockLogResult : NSObject 14 | - (instancetype)initWithMethodSignature:(NSMethodSignature *)methodSignature; 15 | @property (copy, readonly, nonatomic) NSString *returnDecription; 16 | @property (strong, readonly, nonatomic) NSMutableArray *argDecriptions; 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXDataHandle/ZXDataConvert/NSObject+ZXToModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+ZXToModel.h 3 | // ZXDataHandleDemo 4 | // 5 | // Created by 李兆祥 on 2019/1/27. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // model赋值 8 | 9 | #import 10 | 11 | @interface NSObject (ZXToModel) 12 | ///字典转模型 13 | +(instancetype)zx_modelWithDic:(NSMutableDictionary *)dic; 14 | ///任意类型转模型 15 | +(id)zx_modelWithObj:(id)obj; 16 | 17 | +(NSDictionary *)zx_inArrModelName; 18 | +(NSDictionary *)zx_replaceProName; 19 | +(NSString *)zx_replaceProName121:(NSString *)proName; 20 | @end 21 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXDataHandle/ZXDataConvert/NSObject+ZXToJson.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+ZXToJson.h 3 | // ZXDataHandleDemo 4 | // 5 | // Created by 李兆祥 on 2019/1/28. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // GitHub:https://github.com/SmileZXLee/ZXDataHandle 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface NSObject (ZXToJson) 14 | ///任意类型转Json字符串 15 | -(NSString *)zx_toJsonStr; 16 | ///任意类型转keyValue的形式:name=123&dec=test 17 | -(NSString*)zx_kvStr; 18 | ///任意类型转JsonData 19 | -(NSData *)zx_toJsonData; 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /Headers/CDStructures.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. 5 | // 6 | 7 | #pragma mark Blocks 8 | 9 | typedef void (^CDUnknownBlockType)(void); // return type and parameters are unknown 10 | 11 | #pragma mark Named Structures 12 | 13 | struct CGPoint { 14 | double x; 15 | double y; 16 | }; 17 | 18 | struct CGRect { 19 | struct CGPoint _field1; 20 | struct CGSize _field2; 21 | }; 22 | 23 | struct CGSize { 24 | double width; 25 | double height; 26 | }; 27 | 28 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Category/NSString+ZXHookRegular.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+ZXHookRegular.h 3 | // 4 | // 5 | // Created by 李兆祥 on 2019/2/16. 6 | // 7 | 8 | #import 9 | 10 | @interface NSString (ZXHookRegular) 11 | -(NSString *)regularWithPattern:(NSString *)pattern; 12 | -(NSArray *)regularsWithPattern:(NSString *)pattern; 13 | -(NSString *)matchStrWithPre:(NSString *)pre sub:(NSString *)sub; 14 | -(NSArray *)matchsStrWithPre:(NSString *)pre sub:(NSString *)sub; 15 | -(NSString *)removeAllElement:(NSString *)element; 16 | -(NSString *)removeAllElements:(NSArray *)elements; 17 | -(NSString *)upperFirstCharacter; 18 | @end 19 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXDataHandle/ZXDataConvert/BaseTool/NSMutableArray+ZXSafetySet.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableArray+ZXSafetySet.h 3 | // ZXDataHandleDemo 4 | // 5 | // Created by 李兆祥 on 2019/1/29. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // GitHub:https://github.com/SmileZXLee/ZXDataHandle 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface NSMutableArray (ZXSafetySet) 14 | -(id)zx_arrSafetyObjAtIndex:(NSUInteger)index; 15 | -(void)zx_arrSafetyAddObj:(id)obj; 16 | -(void)zx_arrSafetyAddObjNORepetition:(id)obj; 17 | -(void)zx_arrSafetyRemoveObj:(id)obj; 18 | @end 19 | 20 | NS_ASSUME_NONNULL_END 21 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/HookAppDylib.h: -------------------------------------------------------------------------------- 1 | // weibo: http://weibo.com/xiaoqing28 2 | // blog: http://www.alonemonkey.com 3 | // 4 | // HookAppDylib.h 5 | // HookAppDylib 6 | // 7 | // Created by 李兆祥 on 2022/1/21. 8 | // Copyright (c) 2022 ___ORGANIZATIONNAME___. All rights reserved. 9 | // 10 | 11 | #import 12 | 13 | #define INSERT_SUCCESS_WELCOME " 🎉!!!congratulations!!!🎉\n👍----------------insert dylib success----------------👍\n" 14 | 15 | @interface CustomViewController 16 | 17 | @property (nonatomic, copy) NSString* newProperty; 18 | 19 | + (void)classMethod; 20 | 21 | - (NSString*)getMyName; 22 | 23 | - (void)newMethod:(NSString*) output; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/UIKit/ShadowView/UIView+ZXFrame.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+ZXFrame.h 3 | // ZXHookUtilDemoDylib 4 | // 5 | // Created by 李兆祥 on 2019/3/11. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIView (ZXFrame) 12 | @property (nonatomic) CGFloat x; 13 | @property (nonatomic) CGFloat y; 14 | @property (nonatomic) CGFloat width; 15 | @property (nonatomic) CGFloat height; 16 | @property (nonatomic) CGFloat right; 17 | @property (nonatomic) CGFloat bottom; 18 | @property (nonatomic) CGFloat centerX; 19 | @property (nonatomic) CGFloat centerY; 20 | @property (nonatomic) CGPoint origin; 21 | @property (nonatomic) CGSize size; 22 | @end 23 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Tools/LLDBTools.h: -------------------------------------------------------------------------------- 1 | // weibo: http://weibo.com/xiaoqing28 2 | // blog: http://www.alonemonkey.com 3 | // 4 | // LLDBTools.h 5 | // MonkeyDev 6 | // 7 | // Created by AloneMonkey on 2018/3/8. 8 | // Copyright © 2018年 AloneMonkey. All rights reserved. 9 | // 10 | 11 | #import 12 | #import 13 | 14 | //(lldb) po pviews() 15 | 16 | NSString* pvc(void); 17 | 18 | NSString* pviews(void); 19 | 20 | NSString* pactions(vm_address_t address); 21 | 22 | NSString* pblock(vm_address_t address); 23 | 24 | NSString* methods(const char * classname); 25 | 26 | NSString* ivars(vm_address_t address); 27 | 28 | NSString* choose(const char* classname); 29 | 30 | NSString* vmmap(); 31 | -------------------------------------------------------------------------------- /Headers/HttpRequest.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @interface HttpRequest : NSObject 10 | { 11 | } 12 | 13 | + (id)getTimeStamp; 14 | + (id)getSignWithDic:(id)arg1 interface:(id)arg2; 15 | + (id)getDicWithStr:(id)arg1; 16 | + (id)getJsonStrWithDic:(id)arg1; 17 | + (void)baseInterface:(id)arg1 postData:(id)arg2 callBack:(CDUnknownBlockType)arg3; 18 | + (void)getInterface:(id)arg1 callBack:(CDUnknownBlockType)arg2; 19 | + (void)postInterface:(id)arg1 postData:(id)arg2 callBack:(CDUnknownBlockType)arg3; 20 | 21 | @end 22 | 23 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/ZXCodeFloor.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZXCodeFloor.m 3 | // ZXHookUtilDemoDylib 4 | // 5 | // Created by 李兆祥 on 2019/3/10. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 书写业务代码 8 | // Github:https://github.com/SmileZXLee/ZXHookUtil 9 | 10 | #import "ZXCodeFloor.h" 11 | 12 | @implementation ZXCodeFloor 13 | +(void)initAction{ 14 | [ZXHookUtil addClassTrace:@"EncryptionTool"]; 15 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ 16 | [ZXHookUtil addBtnCallBack:^(UIButton *button) { 17 | NSLog(@"当前控制器--%@",[ZXHookUtil getTopVC]); 18 | }]; 19 | }); 20 | 21 | } 22 | +(void)handleObj:(id)obj{ 23 | 24 | } 25 | @end 26 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXDataHandle/ZXDataConvert/BaseTool/NSString+ZXRegular.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+ZXRegular.h 3 | // ZXDataHandleDemo 4 | // 5 | // Created by 李兆祥 on 2019/1/27. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // GitHub:https://github.com/SmileZXLee/ZXDataHandle 8 | 9 | #import 10 | 11 | @interface NSString (ZXRegular) 12 | -(NSString *)regularWithPattern:(NSString *)pattern; 13 | -(NSArray *)regularsWithPattern:(NSString *)pattern; 14 | -(NSString *)matchStrWithPre:(NSString *)pre sub:(NSString *)sub; 15 | -(NSArray *)matchsStrWithPre:(NSString *)pre sub:(NSString *)sub; 16 | -(NSString *)removeAllElement:(NSString *)element; 17 | -(NSString *)removeAllElements:(NSArray *)elements; 18 | @end 19 | -------------------------------------------------------------------------------- /Headers/CocoaSecurityResult.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @class NSData, NSString; 10 | 11 | @interface CocoaSecurityResult : NSObject 12 | { 13 | NSData *_data; 14 | } 15 | 16 | - (void).cxx_destruct; 17 | @property(readonly, nonatomic) NSData *data; // @synthesize data=_data; 18 | @property(readonly, nonatomic) NSString *base64; 19 | @property(readonly, nonatomic) NSString *hexLower; 20 | @property(readonly, nonatomic) NSString *hex; 21 | @property(readonly, nonatomic) NSString *utf8String; 22 | - (id)initWithBytes:(char *)arg1 length:(unsigned long long)arg2; 23 | 24 | @end 25 | 26 | -------------------------------------------------------------------------------- /TargetApp/TargetAppTests/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 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /TargetApp/TargetAppUITests/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 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/UIKit/UIButton/UIButton+ZXAddAction.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIButton+ZXAddAction.m 3 | // ZXHookUtilDemoDylib 4 | // 5 | // Created by 李兆祥 on 2019/3/10. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import "UIButton+ZXAddAction.h" 10 | #import 11 | static char overViewKey; 12 | @implementation UIButton (ZXAddAction) 13 | -(void)addClickAction:(ZXActionBlock)callBack{ 14 | objc_setAssociatedObject(self, &overViewKey, callBack, OBJC_ASSOCIATION_COPY_NONATOMIC); 15 | [self addTarget:self action:@selector(buttonClick) forControlEvents:UIControlEventTouchUpInside]; 16 | } 17 | - (void)buttonClick{ 18 | ZXActionBlock actionBlock = objc_getAssociatedObject(self, &overViewKey); 19 | if(actionBlock){ 20 | actionBlock(self); 21 | } 22 | } 23 | @end 24 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/HttpRequest/ZXHttpRequest.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZXHttpRequest.h 3 | // ZXHookUtilDemoDylib 4 | // 5 | // Created by 李兆祥 on 2019/3/10. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import 10 | typedef void(^kGetDataEventHandler) (BOOL result, id data); 11 | @interface ZXHttpRequest : NSObject 12 | ///post请求 传入interface 13 | +(void)postInterface:(NSString *)interface postData:(id)postData callBack:(kGetDataEventHandler)_result; 14 | ///post请求 传入全路径 15 | +(void)postUrl:(NSString *)urlStr postData:(id)postData callBack:(kGetDataEventHandler)_result; 16 | ///get请求 传入interface 17 | +(void)getInterface:(NSString *)interface callBack:(kGetDataEventHandler)_result; 18 | ///get请求 传入全路径 19 | +(void)getUrl:(NSString *)urlStr callBack:(kGetDataEventHandler)_result; 20 | @end 21 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXDataHandle/ZXDataConvert/BaseTool/NSDictionary+ZXSafetySet.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+ZXSafetySet.m 3 | // ZXDataHandleDemo 4 | // 5 | // Created by 李兆祥 on 2019/1/27. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // GitHub:https://github.com/SmileZXLee/ZXDataHandle 8 | 9 | #import "NSDictionary+ZXSafetySet.h" 10 | 11 | @implementation NSDictionary (ZXSafetySet) 12 | -(id)zx_dicSafetyReadForKey:(NSString *)key{ 13 | id returnObj = nil; 14 | if([self.allKeys containsObject:key]){ 15 | returnObj = [self valueForKey:key]; 16 | }else{ 17 | //ZXDataHandleLog(@"字典Value获取失败,对象中不包含属性:%@",key); 18 | } 19 | return returnObj; 20 | } 21 | -(void)zx_dicSaftySetValue:(id)value forKey:(NSString *)key{ 22 | [self setValue:value forKey:key]; 23 | } 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXDataHandle/ZXDataConvert/BaseTool/ZXDecimalNumberTool.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZXDecimalNumberTool.h 3 | // ZXDataHandleDemo 4 | // 5 | // Created by 李兆祥 on 2019/1/27. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 精度处理 8 | 9 | #import 10 | 11 | @interface ZXDecimalNumberTool : NSObject 12 | ///利用DecimalNumber将double转为float 13 | + (float)zx_toFloatWithNumber:(double)num; 14 | ///利用DecimalNumber将double转为double 15 | + (double)zx_toDoubleWithNumber:(double)num; 16 | ///利用DecimalNumber将double转为string 17 | + (NSString *)zx_toStringWithNumber:(double)num; 18 | ///利用DecimalNumber将double转为NSDecimalNumber 19 | + (NSDecimalNumber *)zx_decimalNumber:(double)num; 20 | ///利用DecimalNumber将str转为NSDecimalNumber 21 | + (NSDecimalNumber *)zx_decimalNumberWithStr:(NSString *)str; 22 | @end 23 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/MethodLog/BaseClass/ZXHookClassMethod.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZXHoolClassMethod.h 3 | // ZXHookUtilDemoDylib 4 | // 5 | // Created by 李兆祥 on 2019/2/16. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | typedef NS_OPTIONS(NSUInteger, ZXMethodType) { 12 | ZXMethodTypeInstance = 0, 13 | ZXMethodTypeStatic, 14 | }; 15 | @interface ZXHookClassMethod : NSObject 16 | -(instancetype)initWithMethod:(Method)method; 17 | @property(nonatomic, copy,readonly)NSString *methodName; 18 | @property(nonatomic, copy,readonly)NSString *methodDescription; 19 | @property(nonatomic, copy,readonly)NSString *methodReturnType; 20 | @property(nonatomic, assign)ZXMethodType methodType; 21 | @property(nonatomic, assign,readonly)Method method; 22 | @end 23 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXDataHandle/ZXDataHandleHeaders.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZXDataHandleHeaders.h 3 | // ZXDataHandleDemo 4 | // 5 | // Created by 李兆祥 on 2019/1/27. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // GitHub:https://github.com/SmileZXLee/ZXDataHandle 8 | 9 | #ifndef ZXDataHandleHeaders_h 10 | #define ZXDataHandleHeaders_h 11 | #import "ZXDataType.h" 12 | #import "ZXDataConvert.h" 13 | #import "NSDictionary+ZXSafetySet.h" 14 | #import "NSMutableArray+ZXSafetySet.h" 15 | #import "NSString+ZXDataConvert.h" 16 | #import "NSString+ZXRegular.h" 17 | #import "NSObject+ZXToModel.h" 18 | #import "NSObject+ZXToDic.h" 19 | #import "NSObject+ZXToJson.h" 20 | 21 | #import "ZXClassArchived.h" 22 | #import "ZXDataStoreCache.h" 23 | #import "ZXDataStoreSQlite.h" 24 | #import "NSObject+ZXSQliteHandle.h" 25 | 26 | #endif /* ZXDataHandleHeaders_h */ 27 | -------------------------------------------------------------------------------- /Headers/LoginViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @class UIButton, UITextField; 10 | 11 | @interface LoginViewController : UIViewController 12 | { 13 | UITextField *_accountTf; 14 | UITextField *_pwdTf; 15 | UIButton *_loginBtn; 16 | } 17 | 18 | - (void).cxx_destruct; 19 | @property(nonatomic) __weak UIButton *loginBtn; // @synthesize loginBtn=_loginBtn; 20 | @property(nonatomic) __weak UITextField *pwdTf; // @synthesize pwdTf=_pwdTf; 21 | @property(nonatomic) __weak UITextField *accountTf; // @synthesize accountTf=_accountTf; 22 | - (void)touchesBegan:(id)arg1 withEvent:(id)arg2; 23 | - (void)loginAction:(id)arg1; 24 | - (void)viewDidLoad; 25 | 26 | @end 27 | 28 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/UIKit/UIGet/UIView+ZXHookUIGet.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+ZXHookUIGet.h 3 | // ZXHookUtilDemoDylib 4 | // 5 | // Created by 李兆祥 on 2019/2/16. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "ZXHookUIGet.h" 11 | @interface UIView (ZXHookUIGet) 12 | ///获取Tfs 13 | -(NSMutableArray *)getTfs; 14 | ///根据类型获取UI 15 | -(NSMutableArray *)getUIWithType:(UIType)type; 16 | ///根据占位符获取Tf 17 | -(UITextField *)getTfWithPlaceHolder:(NSString *)placeHolder; 18 | ///根据颜色和类型获取UI 19 | -(NSMutableArray *)getUIWithColor:(UIColor *)color type:(UIType)type; 20 | ///根据高度和类型获取UI 21 | -(NSMutableArray *)getUIWithHeight:(CGFloat)height type:(UIType)type; 22 | ///根据Frame和类型获取UI 23 | -(NSMutableArray *)getUIWithFrame:(CGRect)frame type:(UIType)type; 24 | ///根据Text和类型获取UI 25 | -(NSMutableArray *)getUIWithText:(NSString *)text type:(UIType)type; 26 | @end 27 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/Encryption/ZXEncryption.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZXEncryption.m 3 | // ZXHookUtilDemoDylib 4 | // 5 | // Created by 李兆祥 on 2019/3/11. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // From https://github.com/kelp404/CocoaSecurity 8 | 9 | #import "ZXEncryption.h" 10 | #import "CocoaSecurity.h" 11 | @implementation ZXEncryption 12 | +(NSString *)aesEncrypt:(NSString *)data key:(NSString *)key{ 13 | CocoaSecurityResult *res = [CocoaSecurity aesEncrypt:data key:key]; 14 | return res.base64; 15 | } 16 | +(NSString *)aesDecryptWithBase64:(NSString *)data key:(NSString *)key{ 17 | CocoaSecurityResult *res = [CocoaSecurity aesDecryptWithBase64:data key:key]; 18 | return res.utf8String; 19 | } 20 | +(NSString *)md5:(NSString *)hashString{ 21 | CocoaSecurityResult *res = [CocoaSecurity md5:hashString]; 22 | return res.utf8String; 23 | } 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/MethodLog/BaseClass/ZXHookClass.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZXHookClass.m 3 | // ZXHookUtilDemoDylib 4 | // 5 | // Created by 李兆祥 on 2019/2/16. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import "ZXHookClass.h" 10 | 11 | @implementation ZXHookClass 12 | -(instancetype)init{ 13 | if(self = [super init]){ 14 | self.classProsArr = [NSMutableArray array]; 15 | self.classMethodsArr = [NSMutableArray array]; 16 | } 17 | return self; 18 | } 19 | -(NSMutableArray *)classProsArr{ 20 | if(!_classProsArr){ 21 | _classProsArr = [NSMutableArray array]; 22 | } 23 | return _classProsArr; 24 | } 25 | -(NSMutableArray *)classMethodsArr{ 26 | if(!_classMethodsArr){ 27 | _classMethodsArr = [NSMutableArray array]; 28 | } 29 | return _classMethodsArr; 30 | } 31 | @end 32 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Config/MDCycriptManager.h: -------------------------------------------------------------------------------- 1 | // weibo: http://weibo.com/xiaoqing28 2 | // blog: http://www.alonemonkey.com 3 | // 4 | // MDCycriptManager.h 5 | // MonkeyDev 6 | // 7 | // Created by AloneMonkey on 2018/3/8. 8 | // Copyright © 2018年 AloneMonkey. All rights reserved. 9 | // 10 | 11 | #ifndef __OPTIMIZE__ 12 | 13 | #import 14 | 15 | #define PORT 6666 16 | 17 | @interface MDCycriptManager : NSObject 18 | 19 | + (instancetype)sharedInstance; 20 | 21 | 22 | /** 23 | Download script by config.plist 24 | 25 | @param update Force update of all scripts 26 | */ 27 | -(void)loadCycript:(BOOL) update; 28 | 29 | /** 30 | eval javascript by cycript 31 | 32 | @param cycript javascript string 33 | @param error error happened 34 | @return eval result 35 | */ 36 | -(NSString*)evaluateCycript:(NSString*) cycript error:(NSError **) error; 37 | 38 | @end 39 | 40 | #endif -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Config/MDMethodTrace.h: -------------------------------------------------------------------------------- 1 | // weibo: http://weibo.com/xiaoqing28 2 | // blog: http://www.alonemonkey.com 3 | // 4 | // MDMethodTrace.h 5 | // MonkeyDev 6 | // 7 | // Created by AloneMonkey on 2017/9/7. 8 | // Copyright © 2017年 AloneMonkey. All rights reserved. 9 | // 10 | 11 | #ifndef MethodTrace_h 12 | #define MethodTrace_h 13 | 14 | #define TRACE_README @"\n📚--------------------OCMethodTrace(Usage)-------------------📚\nhttps://github.com/omxcodec/OCMethodTrace/blob/master/README.md\n📚--------------------OCMethodTrace(Usage)-------------------📚" 15 | 16 | #import 17 | 18 | @interface MDMethodTrace : NSObject 19 | 20 | + (instancetype)sharedInstance; 21 | 22 | - (void)addClassTrace:(NSString *) className; 23 | 24 | - (void)addClassTrace:(NSString *)className methodName:(NSString *)methodName; 25 | 26 | - (void)addClassTrace:(NSString *)className methodList:(NSArray *)methodList; 27 | 28 | @end 29 | 30 | #endif /* MethodTrace_h */ 31 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXDataHandle/ZXDataConvert/BaseTool/NSObject+ZXDataConvertRule.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+ZXDataConvertRule.h 3 | // ZXDataHandleDemo 4 | // 5 | // Created by 李兆祥 on 2019/1/28. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // GitHub:https://github.com/SmileZXLee/ZXDataHandle 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @protocol DeclarationProtocol 14 | #pragma mark ZXDataConvert相关 15 | +(void)zx_inArrModelName; 16 | +(void)zx_ignorePros; 17 | +(void)zx_replaceProName; 18 | +(NSString *)zx_replaceProName121:(NSString *)proName; 19 | +(BOOL)isinIgnorePros:(NSString *)proStr; 20 | #pragma mark ZXDataStore相关 21 | + (NSDictionary *)zx_tbConfig; 22 | @end 23 | @interface NSObject (ZXDataConvertRule) 24 | +(NSDictionary *)getInArrModelNameDic; 25 | +(NSDictionary *)getReplaceProNameDic; 26 | +(NSString *)getReplacedProName:(NSString *)proName; 27 | @end 28 | 29 | NS_ASSUME_NONNULL_END 30 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXDataHandle/ZXDataConvert/BaseTool/ZXDataType.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZXDataType.h 3 | // ZXDataHandleDemo 4 | // 5 | // Created by 李兆祥 on 2019/1/27. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 判断数据类型 8 | 9 | #import 10 | typedef enum { 11 | DataTypeNormalObj = 0x00, // 其他对象类型 12 | DataTypeBool = 0x01, // 布尔类型 13 | DataTypeInt = 0x02, // int类型 14 | DataTypeLong = 0x03, // long类型 15 | DataTypeFloat = 0x04, // float类型 16 | DataTypeDouble = 0x05, // double类型 17 | DataTypeDic = 0x06, //字典类型 18 | DataTypeArr = 0x07, //数组类型 19 | DataTypeStr = 0x08, //字符串类型 20 | DataTypeUnknown = 0x09, //未知类型 21 | 22 | }DataType; 23 | @interface ZXDataType : NSObject 24 | +(DataType)zx_dataType:(id)data; 25 | +(BOOL)isNumberType:(NSString *)str; 26 | +(BOOL)isFoudationClass:(id)obj; 27 | + (NSString *)getPropertyDecWithType:(NSString *)typeStr; 28 | @end 29 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXDataHandle/ZXDataHandleLog.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZXDataHandleLog.h 3 | // ZXDataHandleDemo 4 | // 5 | // Created by 李兆祥 on 2019/3/30. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #ifndef ZXDataHandleLog_h 10 | #define ZXDataHandleLog_h 11 | #define ZXDocPath [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject] 12 | #define DbPath [ZXDocPath stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.sqlite",[NSBundle mainBundle].bundleIdentifier]] 13 | #ifdef DEBUG 14 | #define ZXDataHandleLog(FORMAT, ...) fprintf(stderr,"------------------------- ZXDataHandleLog -------------------------\n编译时间:%s\n文件名:%s\n方法名:%s\n行号:%d\n打印信息:%s\n\n", __TIME__,[[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String],__func__,__LINE__,[[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]) 15 | #else 16 | #define ZXDataHandleLog(FORMAT, ...) nil 17 | #endif 18 | 19 | #endif /* ZXDataHandleLog_h */ 20 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXDataHandle/ZXDataConvert/ZXDataConvertConfig.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZXDataConvertConfig.h 3 | // ZXDataHandleDemo 4 | // 5 | // Created by 李兆祥 on 2020/11/14. 6 | // Copyright © 2020 李兆祥. All rights reserved. 7 | // GitHub:https://github.com/SmileZXLee/ZXDataHandle 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | typedef enum { 13 | ZXDataValueAutoConvertModeEmpty = 0x00,// 当json/字典的value类型与model不一致时,model中对应value将被赋值为空,如NSArray,将被赋值为@[] 14 | ZXDataValueAutoConvertModeNil = 0x01,// 当json/字典的value类型与model不一致时,model中对应value将被赋值为nil 15 | ZXDataValueAutoConvertModeOrg = 0x02,// 当json/字典的value类型与model不一致时,model中对应value将被赋值为原json/字典的value 16 | 17 | }ZXDataValueAutoConvertMode; 18 | 19 | @interface ZXDataConvertConfig : NSObject 20 | /// 当json/字典的value类型与model不一致时处理模式,默认为ZXDataValueAutoConvertModeEmpty 21 | @property(nonatomic,assign) ZXDataValueAutoConvertMode zx_dataValueAutoConvertMode; 22 | @end 23 | 24 | NS_ASSUME_NONNULL_END 25 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXBlockLog/ZXBlockLog.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZXBlockLog.m 3 | // ZXBlockLogDemo 4 | // 5 | // Created by 李兆祥 on 2019/5/20. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 基于CTBlockDescription 8 | 9 | #import "ZXBlockLog.h" 10 | #import "CTBlockDescription.h" 11 | 12 | @implementation ZXBlockLog 13 | + (ZXBlockLogResult *)logWithBlock:(id)block{ 14 | if(!block){ 15 | NSAssert(NO, @"参数block为空"); 16 | } 17 | NSString *blockClassName = NSStringFromClass([block class]); 18 | if(!([blockClassName isEqualToString:@"__NSGlobalBlock__"] || [blockClassName isEqualToString:@"__NSStackBlock__"] || [blockClassName isEqualToString:@"__NSMallocBlock__"])){ 19 | NSAssert(NO, @"参数block不是block对象"); 20 | } 21 | CTBlockDescription *blockDec = [[CTBlockDescription alloc]initWithBlock:block]; 22 | ZXBlockLogResult *logResult = [[ZXBlockLogResult alloc]initWithMethodSignature:blockDec.blockSignature]; 23 | return logResult; 24 | } 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /Headers/MBBarProgressView.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @class UIColor; 10 | 11 | @interface MBBarProgressView : UIView 12 | { 13 | float _progress; 14 | UIColor *_lineColor; 15 | UIColor *_progressRemainingColor; 16 | UIColor *_progressColor; 17 | } 18 | 19 | - (void).cxx_destruct; 20 | @property(retain, nonatomic) UIColor *progressColor; // @synthesize progressColor=_progressColor; 21 | @property(retain, nonatomic) UIColor *progressRemainingColor; // @synthesize progressRemainingColor=_progressRemainingColor; 22 | @property(retain, nonatomic) UIColor *lineColor; // @synthesize lineColor=_lineColor; 23 | @property(nonatomic) float progress; // @synthesize progress=_progress; 24 | - (void)drawRect:(struct CGRect)arg1; 25 | - (struct CGSize)intrinsicContentSize; 26 | - (id)initWithFrame:(struct CGRect)arg1; 27 | - (id)init; 28 | 29 | @end 30 | 31 | -------------------------------------------------------------------------------- /Headers/MBRoundProgressView.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @class UIColor; 10 | 11 | @interface MBRoundProgressView : UIView 12 | { 13 | _Bool _annular; 14 | float _progress; 15 | UIColor *_progressTintColor; 16 | UIColor *_backgroundTintColor; 17 | } 18 | 19 | - (void).cxx_destruct; 20 | @property(nonatomic, getter=isAnnular) _Bool annular; // @synthesize annular=_annular; 21 | @property(retain, nonatomic) UIColor *backgroundTintColor; // @synthesize backgroundTintColor=_backgroundTintColor; 22 | @property(retain, nonatomic) UIColor *progressTintColor; // @synthesize progressTintColor=_progressTintColor; 23 | @property(nonatomic) float progress; // @synthesize progress=_progress; 24 | - (void)drawRect:(struct CGRect)arg1; 25 | - (struct CGSize)intrinsicContentSize; 26 | - (id)initWithFrame:(struct CGRect)arg1; 27 | - (id)init; 28 | 29 | @end 30 | 31 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/MethodLog/ZXMethodLog.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZXMethodLog.h 3 | // ZXHookUtilDemoDylib 4 | // 5 | // Created by 李兆祥 on 2019/2/18. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | @interface ZXMethodLog : NSObject 12 | +(instancetype)sharedInstance; 13 | +(NSDictionary *)getTypeMapperDic; 14 | +(NSString *)getTypeWithOrgType:(NSString *)orgType; 15 | +(id)getValueFromDicWithArrType:(NSDictionary *)dic key:(NSString *)key; 16 | +(NSArray *)getBlackList; 17 | 18 | +(void)addClassTrace:(NSString *)className; 19 | +(void)addClassTrace:(NSString *)className methodList:(NSArray *)methodList; 20 | +(void)addClassTrace:(NSString *)className methodList:(NSArray *)methodList jsonClassList:(NSArray *)jsonClassList; 21 | +(void)addClassTrace:(NSString *)className jsonClassList:(NSArray *)jsonClassList; 22 | +(void)addClassesTrace:(NSArray *)classNames; 23 | 24 | @property(nonatomic, strong)NSMutableDictionary *methodTraceDic; 25 | @end 26 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Trace/OCSelectorTrampolines.h: -------------------------------------------------------------------------------- 1 | /* 2 | * OCSelectorTrampolines.mm 3 | * OCMethodTrace 4 | * 5 | * https://github.com/omxcodec/OCMethodTrace.git 6 | * 7 | * Copyright (C) 2018 Michael Chen 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | #import 23 | 24 | FOUNDATION_EXTERN IMP imp_implementationWithSelector(SEL aSel, const char *signature); 25 | FOUNDATION_EXTERN SEL imp_getSelector(IMP anImp); 26 | FOUNDATION_EXTERN BOOL imp_removeSelector(IMP anImp); 27 | -------------------------------------------------------------------------------- /TargetApp/TargetAppTests/TargetAppTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // TargetAppTests.m 3 | // TargetAppTests 4 | // 5 | // Created by 李兆祥 on 2022/1/23. 6 | // Copyright © 2022 李兆祥. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface TargetAppTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation TargetAppTests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | // Put setup code here. This method is called before the invocation of each test method in the class. 20 | } 21 | 22 | - (void)tearDown { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | [super tearDown]; 25 | } 26 | 27 | - (void)testExample { 28 | // This is an example of a functional test case. 29 | // Use XCTAssert and related functions to verify your tests produce the correct results. 30 | } 31 | 32 | - (void)testPerformanceExample { 33 | // This is an example of a performance test case. 34 | [self measureBlock:^{ 35 | // Put the code you want to measure the time of here. 36 | }]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /Headers/NSObject-Protocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. 5 | // 6 | 7 | @class NSString, Protocol; 8 | 9 | @protocol NSObject 10 | @property(readonly, copy) NSString *description; 11 | @property(readonly) Class superclass; 12 | @property(readonly) unsigned long long hash; 13 | - (struct _NSZone *)zone; 14 | - (unsigned long long)retainCount; 15 | - (id)autorelease; 16 | - (oneway void)release; 17 | - (id)retain; 18 | - (_Bool)respondsToSelector:(SEL)arg1; 19 | - (_Bool)conformsToProtocol:(Protocol *)arg1; 20 | - (_Bool)isMemberOfClass:(Class)arg1; 21 | - (_Bool)isKindOfClass:(Class)arg1; 22 | - (_Bool)isProxy; 23 | - (id)performSelector:(SEL)arg1 withObject:(id)arg2 withObject:(id)arg3; 24 | - (id)performSelector:(SEL)arg1 withObject:(id)arg2; 25 | - (id)performSelector:(SEL)arg1; 26 | - (id)self; 27 | - (Class)class; 28 | - (_Bool)isEqual:(id)arg1; 29 | 30 | @optional 31 | @property(readonly, copy) NSString *debugDescription; 32 | @end 33 | 34 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXDataHandle/ZXDataStore/ZXDataStoreSQlite.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZXDataStoreSQlite.h 3 | // ZXDataHandleDemo 4 | // 5 | // Created by 李兆祥 on 2019/1/28. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // GitHub:https://github.com/SmileZXLee/ZXDataHandle 8 | 9 | #import 10 | #import "SqlResult.h" 11 | ///数据库存储路径 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | @interface ZXDataStoreSQlite : NSObject 15 | + (instancetype)shareInstance; 16 | ///获取当前db 17 | +(id)getDb; 18 | ///删除当前数据库 19 | +(BOOL)dropDb; 20 | ///执行一句sql语句,hasRes为是否需要查询结果,执行查询语句时才需要查询结果 21 | +(SqlResult *)executeSql:(NSString *)sql res:(BOOL)hasRes; 22 | ///批量执行sql语句 23 | +(SqlResult *)executeSqls:(NSArray *)sqls; 24 | ///将对象属性的类型转化为sql字段的类型 25 | +(NSString *)getSqlValueTypeWithProType:(NSString *)proType; 26 | ///获取可以识别的运算符数组 27 | +(NSArray *)sqlSymbolArr; 28 | ///存储所有已经存在的table名 29 | @property(nonatomic,strong)NSMutableArray *allJudgedExistTb; 30 | ///存储所有已判断是否需要更新的table名 31 | @property(nonatomic,strong)NSMutableArray *allJudgedUpdateTb; 32 | @end 33 | 34 | NS_ASSUME_NONNULL_END 35 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXDataHandle/ZXDataConvert/BaseTool/ZXDecimalNumberTool.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZXDecimalNumberTool.m 3 | // ZXDataHandleDemo 4 | // 5 | // Created by 李兆祥 on 2019/1/27. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // GitHub:https://github.com/SmileZXLee/ZXDataHandle 8 | 9 | #import "ZXDecimalNumberTool.h" 10 | 11 | @implementation ZXDecimalNumberTool 12 | + (float)zx_toFloatWithNumber:(double)num{ 13 | return [[self zx_decimalNumber:num] floatValue]; 14 | } 15 | 16 | + (double)zx_toDoubleWithNumber:(double)num { 17 | return [[self zx_decimalNumber:num] doubleValue]; 18 | } 19 | 20 | + (NSString *)zx_toStringWithNumber:(double)num { 21 | return [[self zx_decimalNumber:num] stringValue]; 22 | } 23 | 24 | + (NSDecimalNumber *)zx_decimalNumber:(double)num { 25 | NSString *numString = [NSString stringWithFormat:@"%lf", num]; 26 | return [NSDecimalNumber decimalNumberWithString:numString]; 27 | } 28 | 29 | + (NSDecimalNumber *)zx_decimalNumberWithStr:(NSString *)str { 30 | return [NSDecimalNumber decimalNumberWithString:str]; 31 | } 32 | @end 33 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXDataHandle/ZXDataConvert/ZXDataConvert.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZXDataConvert.h 3 | // ZXDataHandleDemo 4 | // 5 | // Created by 李兆祥 on 2019/1/27. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // GitHub:https://github.com/SmileZXLee/ZXDataHandle 8 | 9 | #import 10 | #import "ZXDataConvertConfig.h" 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface ZXDataConvert : NSObject 14 | + (instancetype)shareInstance; 15 | @property(nonatomic,strong)NSMutableDictionary *allPropertyDic; 16 | 17 | /** 18 | 字典转模型model赋值前都会走这个回调,可以在赋值之前对其进行修改 19 | key:属性名 20 | orgValue:属性名对应的即将被赋值的Value 21 | owner:属性所属的对象 22 | */ 23 | @property(nonatomic,copy)id(^zx_dataConvertSetterBlock)(NSString *key, id orgValue,id owner); 24 | 25 | @property(nonatomic,strong)ZXDataConvertConfig *zx_dataConvertConfig; 26 | 27 | /** 28 | 字典转模型时,自动调整赋值的value,使其类型与模型中对应属性类型一致 29 | 30 | @param value 赋值的value 31 | @param proType 模型中对应属性类型 32 | */ 33 | + (id)handleValueToMatchModelPropertyTypeWithValue:(id)value type:(NSString *)proType; 34 | @end 35 | 36 | NS_ASSUME_NONNULL_END 37 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/MethodLog/BaseClass/ANYMethodLog.h: -------------------------------------------------------------------------------- 1 | // 2 | // ANYMethodLog.h 3 | // ANYMethodLog 4 | // 5 | // Created by qiuhaodong on 2017/1/14. 6 | // Copyright © 2017年 qiuhaodong. All rights reserved. 7 | // 8 | // https://github.com/qhd/ANYMethodLog.git 9 | // 10 | 11 | #import 12 | 13 | typedef BOOL (^ConditionBlock)(SEL sel); 14 | typedef void (^BeforeBlock)(id target, SEL sel, NSArray *args, int deep); 15 | typedef void (^AfterBlock)(id target, SEL sel, NSArray *args, NSTimeInterval interval, int deep, id retValue); 16 | 17 | @interface ANYMethodLog : NSObject 18 | 19 | /** 20 | 打印对象的方法调用 21 | 22 | @param aClass 要打印的类 23 | @param condition 根据此 block 来决定是否追踪方法(sel 是方法名) 24 | @param before 方法调用前会调用该 block(target 是检测的对象,sel 是方法名,args 是参数列表,deep 是调用层级) 25 | @param after 方法调用后会调用该 block(interval 是执行方法的耗时,retValue 是返回值) 26 | */ 27 | + (void)logMethodWithClass:(Class)aClass 28 | condition:(ConditionBlock) condition 29 | before:(BeforeBlock) before 30 | after:(AfterBlock) after; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXDataHandle/ZXDataConvert/NSArray+ZXDataConvert.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+ZXDataConvert.m 3 | // ZXDataHandleDemo 4 | // 5 | // Created by 李兆祥 on 2019/1/27. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // GitHub:https://github.com/SmileZXLee/ZXDataHandle 8 | 9 | #import "NSArray+ZXDataConvert.h" 10 | #import "ZXDataHandleLog.h" 11 | @implementation NSArray (ZXDataConvert) 12 | -(NSString *)zx_arrToJsonStr{ 13 | NSData *jsonData = [self zx_arrToJSONData]; 14 | return [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; 15 | } 16 | 17 | -(NSData *)zx_arrToJSONData{ 18 | NSError *error = nil; 19 | NSData *jsonData = [NSJSONSerialization dataWithJSONObject:self 20 | options:NSJSONWritingPrettyPrinted 21 | error:&error]; 22 | if ([jsonData length] > 0 && error == nil){ 23 | return jsonData; 24 | }else{ 25 | ZXDataHandleLog(@"数组%@无法转化为Json字符串--error:%@",self,error); 26 | return nil; 27 | } 28 | } 29 | @end 30 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/UIKit/ShadowView/ZXShowImgView.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZXShowImgView.m 3 | // ZXHookUtilDemoDylib 4 | // 5 | // Created by 李兆祥 on 2019/3/11. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import "ZXShowImgView.h" 10 | @interface ZXShowImgView() 11 | @property(nonatomic,weak)UIImageView *imgV; 12 | @end 13 | @implementation ZXShowImgView 14 | 15 | -(instancetype)initWithFrame:(CGRect)frame{ 16 | if(self = [super initWithFrame:frame]){ 17 | UIImageView *imgV = [[UIImageView alloc]init]; 18 | imgV.userInteractionEnabled = YES; 19 | imgV.backgroundColor = [UIColor clearColor]; 20 | [imgV addGestureRecognizer:[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(imgVTap)]]; 21 | imgV.contentMode = UIViewContentModeScaleAspectFit; 22 | [self addSubview:imgV]; 23 | self.imgV = imgV; 24 | } 25 | return self; 26 | } 27 | -(void)imgVTap{ 28 | [self disMiss]; 29 | 30 | } 31 | -(void)showWithImg:(UIImage *)img{ 32 | [self show]; 33 | self.imgV.frame = self.frame; 34 | self.imgV.image = img; 35 | } 36 | @end 37 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 v-zhaoxiang.li 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 | -------------------------------------------------------------------------------- /Headers/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | #import "UIApplicationDelegate-Protocol.h" 10 | 11 | @class NSString, UIWindow; 12 | 13 | @interface AppDelegate : UIResponder 14 | { 15 | UIWindow *_window; 16 | } 17 | 18 | - (void).cxx_destruct; 19 | @property(retain, nonatomic) UIWindow *window; // @synthesize window=_window; 20 | - (void)applicationWillTerminate:(id)arg1; 21 | - (void)applicationDidBecomeActive:(id)arg1; 22 | - (void)applicationWillEnterForeground:(id)arg1; 23 | - (void)applicationDidEnterBackground:(id)arg1; 24 | - (void)applicationWillResignActive:(id)arg1; 25 | - (_Bool)application:(id)arg1 didFinishLaunchingWithOptions:(id)arg2; 26 | 27 | // Remaining properties 28 | @property(readonly, copy) NSString *debugDescription; 29 | @property(readonly, copy) NSString *description; 30 | @property(readonly) unsigned long long hash; 31 | @property(readonly) Class superclass; 32 | 33 | @end 34 | 35 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXDataHandle/ZXDataConvert/NSDictionary+ZXDataConvert.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+ZXDataConvert.m 3 | // ZXDataHandleDemo 4 | // 5 | // Created by 李兆祥 on 2019/1/27. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // GitHub:https://github.com/SmileZXLee/ZXDataHandle 8 | 9 | #import "NSDictionary+ZXDataConvert.h" 10 | #import "ZXDataHandleLog.h" 11 | @implementation NSDictionary (ZXDataConvert) 12 | -(NSString *)zx_dicToJsonStr{ 13 | NSData *jsonData = [self zx_dicToJSONData]; 14 | return [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; 15 | } 16 | 17 | -(NSData *)zx_dicToJSONData{ 18 | NSError *error = nil; 19 | NSData *jsonData = [NSJSONSerialization dataWithJSONObject:self 20 | options:NSJSONWritingPrettyPrinted 21 | error:&error]; 22 | if ([jsonData length] > 0 && error == nil){ 23 | return jsonData; 24 | }else{ 25 | ZXDataHandleLog(@"字典%@无法转化为Json字符串--error:%@",self,error); 26 | return nil; 27 | } 28 | } 29 | @end 30 | -------------------------------------------------------------------------------- /Headers/MBBackgroundView.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @class UIColor, UIToolbar, UIVisualEffectView; 10 | 11 | @interface MBBackgroundView : UIView 12 | { 13 | long long _style; 14 | long long _blurEffectStyle; 15 | UIColor *_color; 16 | UIVisualEffectView *_effectView; 17 | UIToolbar *_toolbar; 18 | } 19 | 20 | - (void).cxx_destruct; 21 | @property(retain) UIToolbar *toolbar; // @synthesize toolbar=_toolbar; 22 | @property(retain) UIVisualEffectView *effectView; // @synthesize effectView=_effectView; 23 | @property(retain, nonatomic) UIColor *color; // @synthesize color=_color; 24 | @property(nonatomic) long long blurEffectStyle; // @synthesize blurEffectStyle=_blurEffectStyle; 25 | @property(nonatomic) long long style; // @synthesize style=_style; 26 | - (void)updateViewsForColor:(id)arg1; 27 | - (void)updateForBackgroundStyle; 28 | - (struct CGSize)intrinsicContentSize; 29 | - (id)initWithFrame:(struct CGRect)arg1; 30 | 31 | @end 32 | 33 | -------------------------------------------------------------------------------- /SpringbootProject/src/main/java/cn/zxlee/signatureanalysistest/response/CommonResponse.java: -------------------------------------------------------------------------------- 1 | package cn.zxlee.signatureanalysistest.response; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * @program: signature-analysis-test 7 | * @description: CommonResponse 8 | * @author: zxlee 9 | * @create: 2022-01-21 10 | **/ 11 | @Data 12 | public class CommonResponse { 13 | static private Integer commonSuccessCode = 0; 14 | static private Integer commonErrorCode = 400; 15 | 16 | private String message; 17 | private Integer code; 18 | private T data; 19 | 20 | public CommonResponse(){ 21 | 22 | } 23 | 24 | public CommonResponse(T data){ 25 | this.data = data; 26 | } 27 | 28 | public CommonResponse success(){ 29 | this.code = commonSuccessCode; 30 | this.message = "success"; 31 | System.out.println("响应=> " + this.toString()); 32 | return this; 33 | } 34 | 35 | public CommonResponse error(String message){ 36 | this.code = commonErrorCode; 37 | this.message = message; 38 | System.out.println("响应=> " + this.toString()); 39 | return this; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXDataHandle/ZXDataConvert/BaseTool/NSMutableArray+ZXSafetySet.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableArray+ZXSafetySet.m 3 | // ZXDataHandleDemo 4 | // 5 | // Created by 李兆祥 on 2019/1/29. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // GitHub:https://github.com/SmileZXLee/ZXDataHandle 8 | 9 | #import "NSMutableArray+ZXSafetySet.h" 10 | #import "ZXDataHandleLog.h" 11 | @implementation NSMutableArray (ZXSafetySet) 12 | -(id)zx_arrSafetyObjAtIndex:(NSUInteger)index{ 13 | if(index < self.count){ 14 | return [self objectAtIndex:index]; 15 | }else{ 16 | ZXDataHandleLog(@"数组:%@的索引%lu不存在",self,(unsigned long)index); 17 | return nil; 18 | } 19 | } 20 | -(void)zx_arrSafetyAddObj:(id)obj{ 21 | if(obj){ 22 | [self addObject:obj]; 23 | }else{ 24 | ZXDataHandleLog(@"加入数组的对象不存在"); 25 | } 26 | } 27 | -(void)zx_arrSafetyAddObjNORepetition:(id)obj{ 28 | if(![self containsObject:obj]){ 29 | [self zx_arrSafetyAddObj:obj]; 30 | } 31 | } 32 | 33 | -(void)zx_arrSafetyRemoveObj:(id)obj{ 34 | if([self containsObject:obj]){ 35 | [self removeObject:obj]; 36 | } 37 | } 38 | @end 39 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXPoll/ZXPoll.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZXPoll.m 3 | // ZXHookUtilDemoDylib 4 | // 5 | // Created by 李兆祥 on 2019/3/9. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import "ZXPoll.h" 10 | @interface ZXPoll() 11 | @property(nonatomic,strong)dispatch_source_t timer; 12 | @end 13 | @implementation ZXPoll 14 | -(void)addTimerWithSec:(long)sec callBack:(pollPerStepBlock)pollPerStepBlock{ 15 | self.run = YES; 16 | if(self.timer){ 17 | dispatch_source_cancel(self.timer); 18 | self.timer = nil; 19 | } 20 | dispatch_queue_t queue = dispatch_get_main_queue(); 21 | dispatch_source_t timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, queue); 22 | dispatch_source_set_timer(timer, DISPATCH_TIME_NOW, sec * NSEC_PER_SEC, 0 * NSEC_PER_SEC); 23 | dispatch_source_set_event_handler(timer, ^{ 24 | if(self.run){ 25 | pollPerStepBlock(); 26 | } 27 | }); 28 | dispatch_resume(timer); 29 | self.timer = timer; 30 | } 31 | -(void)removeTimer{ 32 | if(self.timer){ 33 | dispatch_source_cancel(self.timer); 34 | self.timer = nil; 35 | } 36 | } 37 | @end 38 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/MethodLog/BaseClass/ZXHookClassPro.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZXHoolClassPro.m 3 | // ZXHookUtilDemoDylib 4 | // 5 | // Created by 李兆祥 on 2019/2/16. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import "ZXHookClassPro.h" 10 | #import "NSString+ZXHookRegular.h" 11 | @implementation ZXHookClassPro 12 | -(void)setProType:(NSString *)proType{ 13 | _proTypeOrg = proType; 14 | NSString *resProType = [proType containsString:@"@"] ? [proType matchStrWithPre:@"T@" sub:@","] : [proType matchStrWithPre:@"T" sub:@","]; 15 | NSDictionary *proTypeMapper = [self getProTypeMapper]; 16 | if([proTypeMapper.allKeys containsObject:resProType]){ 17 | resProType = [proTypeMapper valueForKey:resProType]; 18 | }else{ 19 | resProType = [resProType removeAllElements:@[@"@\"",@"\""]]; 20 | } 21 | _proType = resProType; 22 | } 23 | 24 | -(NSDictionary *)getProTypeMapper{ 25 | return 26 | @{@"i":@"int",@"s":@"short",@"f":@"float",@"d":@"double",@"l":@"long",@"q":@"longlong",@"c":@"char",@"b":@"Bool",@"^{objc_ivar=}":@"Ivar",@"^{objc_method=}":@"Method",@"@?":@"Block",@"#":@"Class",@":":@"SEL",@"@":@"id"}; 27 | } 28 | @end 29 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/UIKit/UIAlert/UIViewController+ZXAlert.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+ZXAlert.m 3 | // ZXHookUtilDemoDylib 4 | // 5 | // Created by 李兆祥 on 2019/3/11. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import "UIViewController+ZXAlert.h" 10 | 11 | @implementation UIViewController (ZXAlert) 12 | -(void)showAlert:(NSString *)text{ 13 | UIAlertController *alert = [UIAlertController alertControllerWithTitle: @"提示" message:text preferredStyle: UIAlertControllerStyleAlert]; 14 | UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"好" style: UIAlertActionStyleCancel handler: nil]; 15 | [alert addAction:okAction]; 16 | [self presentViewController: alert animated: YES completion: nil]; 17 | } 18 | -(void)showAlertWithTitle:(NSString *)title msg:(NSString *)msg{ 19 | UIAlertController *alert = [UIAlertController alertControllerWithTitle: title message:msg preferredStyle: UIAlertControllerStyleAlert]; 20 | UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"好" style: UIAlertActionStyleCancel handler: nil]; 21 | [alert addAction:okAction]; 22 | [self presentViewController: alert animated: YES completion: nil]; 23 | } 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Category/UIViewController+ZXHandleLoad.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+ZXHandleLoad.m 3 | // ZXHookUtilDemoDylib 4 | // 5 | // Created by 李兆祥 on 2019/3/10. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import "UIViewController+ZXHandleLoad.h" 10 | #import 11 | #import "ZXMethodLog.h" 12 | typedef void (* _VIMP)(id, SEL, ...); 13 | 14 | @implementation UIViewController (ZXHandleLoad) 15 | 16 | + (void)load 17 | { 18 | static dispatch_once_t onceToken; 19 | dispatch_once(&onceToken, ^{ 20 | Method viewDidLoad = class_getInstanceMethod(self, @selector(viewDidLoad)); 21 | _VIMP viewDidLoad_VIMP = (_VIMP)method_getImplementation(viewDidLoad); 22 | 23 | method_setImplementation(viewDidLoad, imp_implementationWithBlock(^ (id target , SEL action){ 24 | 25 | // the system viewDidLoad method 26 | viewDidLoad_VIMP(target , @selector(viewDidLoad)); 27 | 28 | // the new add NSLog method 29 | //NSLog(@"自定义log :%@ did load",target); 30 | //[ZXMethodLog addClassTrace:NSStringFromClass(self)]; 31 | 32 | })); 33 | 34 | 35 | }); 36 | } 37 | @end 38 | -------------------------------------------------------------------------------- /SpringbootProject/src/main/java/cn/zxlee/signatureanalysistest/utils/AESUtils.java: -------------------------------------------------------------------------------- 1 | package cn.zxlee.signatureanalysistest.utils; 2 | 3 | import javax.crypto.Cipher; 4 | import javax.crypto.spec.SecretKeySpec; 5 | import java.util.Base64; 6 | 7 | public class AESUtils { 8 | 9 | private static final String AES_ALGORITHM = "AES/ECB/PKCS5Padding"; 10 | 11 | //获取 cipher 12 | private static Cipher getCipher(byte[] key, int model) throws Exception { 13 | SecretKeySpec secretKeySpec = new SecretKeySpec(key, "AES"); 14 | Cipher cipher = Cipher.getInstance(AES_ALGORITHM); 15 | cipher.init(model, secretKeySpec); 16 | return cipher; 17 | } 18 | 19 | //AES加密 20 | public static String encrypt(String data, String key) throws Exception { 21 | Cipher cipher = getCipher(key.getBytes("UTF-8"), Cipher.ENCRYPT_MODE); 22 | return Base64.getEncoder().encodeToString(cipher.doFinal(data.getBytes("UTF-8"))); 23 | } 24 | 25 | //AES解密 26 | public static String decrypt(String data, String key) throws Exception { 27 | Cipher cipher = getCipher(key.getBytes("UTF-8"), Cipher.DECRYPT_MODE); 28 | return new String(cipher.doFinal(Base64.getDecoder().decode(data.getBytes("UTF-8"))), "UTF-8"); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXRequestBlock/ZXRequestBlock.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZXRequestBlock.h 3 | // ZXRequestBlockDemo 4 | // 5 | // Created by 李兆祥 on 2018/8/25. 6 | // Copyright © 2018年 李兆祥. All rights reserved. 7 | // 8 | 9 | #import 10 | typedef NSURLRequest *(^requestBlock) (NSURLRequest *request); 11 | @interface ZXRequestBlock : NSObject 12 | @property (nonatomic, copy) NSURLRequest *(^requestBlock)(NSURLRequest *request); 13 | 14 | /** 15 | 启用ZXRequestBlock(一般情况下无需手动调用) 16 | */ 17 | +(void)addRequestBlock; 18 | 19 | /** 20 | 禁用ZXRequestBlock(一般情况下无需手动调用) 21 | */ 22 | +(void)removeRequestBlock; 23 | 24 | /** 25 | 拦截全局请求 26 | 27 | @param block 请求回调,block返回修改后的请求 28 | */ 29 | +(void)handleRequest:(requestBlock)block; 30 | 31 | /** 32 | 启用HttpDns 33 | */ 34 | +(void)enableHttpDns; 35 | 36 | /** 37 | 关闭HttpDns 38 | */ 39 | +(void)disableHttpDns; 40 | 41 | /** 42 | 禁止网络代理抓包(开启后使用代理方式抓包的程序无法抓到此App中的请求,且计时处于代理网络下也不会影响App本身的请求) 43 | 44 | @return 若不为nil,则代表检测到了网络代理,可进行额外操作 45 | */ 46 | +(id)disableHttpProxy; 47 | 48 | /** 49 | 允许网络代理抓包 50 | */ 51 | +(void)enableHttpProxy; 52 | 53 | /** 54 | 禁止所有网络请求 55 | */ 56 | +(void)cancelAllRequest; 57 | 58 | /** 59 | 恢复所有网络请求 60 | */ 61 | +(void)resumeAllRequest; 62 | @end 63 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/UIKit/UIButton/UIButton+ZXHookAction.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIButton+ZXHookEvent.m 3 | // ZXHookUtilDemoDylib 4 | // 5 | // Created by 李兆祥 on 2019/2/18. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import "UIButton+ZXHookAction.h" 10 | 11 | @implementation UIButton (ZXHookAction) 12 | -(NSMutableDictionary *)getAllTouchUpAction{ 13 | NSMutableDictionary *allTouchUpAction = [NSMutableDictionary dictionary]; 14 | NSArray *allTargets = self.allTargets.allObjects; 15 | for (id target in allTargets) { 16 | NSString *targetClassName = NSStringFromClass([target class]); 17 | NSArray *action = [self actionsForTarget:target forControlEvent:UIControlEventTouchUpInside]; 18 | [allTouchUpAction setValue:action forKey:targetClassName]; 19 | } 20 | return allTouchUpAction; 21 | } 22 | -(void)callBtnActions{ 23 | NSArray *allTargets = self.allTargets.allObjects; 24 | for (id target in allTargets) { 25 | NSArray *actions = [self actionsForTarget:target forControlEvent:UIControlEventTouchUpInside]; 26 | for (NSString *action in actions) { 27 | [target performSelector:NSSelectorFromString(action) withObject:self afterDelay:0]; 28 | } 29 | } 30 | } 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /Headers/UIView-Toast.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @interface UIView (Toast) 10 | - (struct CGPoint)cs_centerPointForPosition:(id)arg1 withToast:(id)arg2; 11 | - (void)hideToastActivity; 12 | - (void)makeToastActivity:(id)arg1; 13 | - (void)cs_handleToastTapped:(id)arg1; 14 | - (void)cs_toastTimerDidFinish:(id)arg1; 15 | - (id)cs_toastQueue; 16 | - (id)toastViewForMessage:(id)arg1 title:(id)arg2 image:(id)arg3 style:(id)arg4; 17 | - (void)cs_hideToast:(id)arg1 fromTap:(_Bool)arg2; 18 | - (void)cs_hideToast:(id)arg1; 19 | - (void)cs_showToast:(id)arg1 duration:(double)arg2 position:(id)arg3; 20 | - (void)showToast:(id)arg1 duration:(double)arg2 position:(id)arg3 completion:(CDUnknownBlockType)arg4; 21 | - (void)showToast:(id)arg1; 22 | - (void)makeToast:(id)arg1 duration:(double)arg2 position:(id)arg3 title:(id)arg4 image:(id)arg5 style:(id)arg6 completion:(CDUnknownBlockType)arg7; 23 | - (void)makeToast:(id)arg1 duration:(double)arg2 position:(id)arg3 style:(id)arg4; 24 | - (void)makeToast:(id)arg1 duration:(double)arg2 position:(id)arg3; 25 | - (void)makeToast:(id)arg1; 26 | @end 27 | 28 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Config/MDConfigManager.m: -------------------------------------------------------------------------------- 1 | // weibo: http://weibo.com/xiaoqing28 2 | // blog: http://www.alonemonkey.com 3 | // 4 | // MDConfigManager.m 5 | // MonkeyDev 6 | // 7 | // Created by AloneMonkey on 2018/4/24. 8 | // Copyright © 2018年 AloneMonkey. All rights reserved. 9 | // 10 | 11 | #define CONFIG_FILE_NAME @"MDConfig" 12 | 13 | #import "MDConfigManager.h" 14 | 15 | @implementation MDConfigManager{ 16 | NSString* _filepath; 17 | } 18 | 19 | + (instancetype)sharedInstance{ 20 | static MDConfigManager *sharedInstance = nil; 21 | if (!sharedInstance){ 22 | sharedInstance = [[MDConfigManager alloc] init]; 23 | } 24 | return sharedInstance; 25 | } 26 | 27 | - (BOOL)isActive{ 28 | _filepath = [[NSBundle mainBundle] pathForResource:CONFIG_FILE_NAME ofType:@"plist"]; 29 | if(_filepath == nil){ 30 | return NO; 31 | } 32 | return YES; 33 | } 34 | 35 | - (NSDictionary*) readConfigByKey:(NSString*) key{ 36 | if([self isActive]){ 37 | NSDictionary* contentDict = [NSDictionary dictionaryWithContentsOfFile:_filepath]; 38 | if([contentDict.allKeys containsObject:key]){ 39 | return contentDict[key]; 40 | }else{ 41 | return nil; 42 | } 43 | }else{ 44 | return nil; 45 | } 46 | } 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXDataHandle/ZXDataConvert/BaseTool/NSObject+ZXSafetySet.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+ZXSafetySet.m 3 | // ZXDataHandleDemo 4 | // 5 | // Created by 李兆祥 on 2019/1/27. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // GitHub:https://github.com/SmileZXLee/ZXDataHandle 8 | 9 | #import "NSObject+ZXSafetySet.h" 10 | #import "NSObject+ZXGetProperty.h" 11 | #import "ZXDataHandleLog.h" 12 | #import "ZXDataConvert.h" 13 | @implementation NSObject (ZXSafetySet) 14 | -(id)zx_objSafetyReadForKey:(NSString *)key{ 15 | ///因为模型取值此时不存在找不到key的情况,因此直接返回 16 | return [self valueForKey:key]; 17 | id returnObj = nil; 18 | NSArray *proNamesArr = [[self class] getAllPropertyNames]; 19 | if([proNamesArr containsObject:key]){ 20 | returnObj = [self valueForKey:key]; 21 | }else{ 22 | ZXDataHandleLog(@"对象Value获取失败,对象中不包含属性:%@",key); 23 | } 24 | return returnObj; 25 | } 26 | -(void)zx_objSaftySetValue:(id)value forKey:(NSString *)key{ 27 | if([ZXDataConvert shareInstance].zx_dataConvertSetterBlock){ 28 | id resValue = [ZXDataConvert shareInstance].zx_dataConvertSetterBlock(key,value,self); 29 | value = resValue; 30 | } 31 | if(value && ![value isKindOfClass:[NSNull class]]){ 32 | [self setValue:value forKey:key]; 33 | } 34 | } 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /TargetApp/TargetAppUITests/TargetAppUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // TargetAppUITests.m 3 | // TargetAppUITests 4 | // 5 | // Created by 李兆祥 on 2022/1/23. 6 | // Copyright © 2022 李兆祥. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface TargetAppUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation TargetAppUITests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | 22 | // In UI tests it is usually best to stop immediately when a failure occurs. 23 | self.continueAfterFailure = NO; 24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 25 | [[[XCUIApplication alloc] init] launch]; 26 | 27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 28 | } 29 | 30 | - (void)tearDown { 31 | // Put teardown code here. This method is called after the invocation of each test method in the class. 32 | [super tearDown]; 33 | } 34 | 35 | - (void)testExample { 36 | // Use recording to get started writing UI tests. 37 | // Use XCTAssert and related functions to verify your tests produce the correct results. 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Trace/selectortramps.mac: -------------------------------------------------------------------------------- 1 | /* 2 | * selectortramps.mac 3 | * OCMethodTrace 4 | * 5 | * https://github.com/omxcodec/OCMethodTrace.git 6 | * 7 | * Copyright (C) 2018 Michael Chen 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | #ifdef __x86_64__ 23 | #define PRELOAD(x,f) movq x@GOTPCREL(%rip), %r10; 24 | #define LABEL_ADDR(x,f) %r10 25 | #define LABEL_VALUE(x,f) (%r10) 26 | #define INIT_PIC(f) 27 | #define END_PIC(f) 28 | #elif __i386__ 29 | #define PRELOAD(x,f) leal x-L0## f ##$pb(%ebx), %eax; 30 | #define LABEL_ADDR(x,f) %eax 31 | #define LABEL_VALUE(x,f) (%eax) 32 | #define INIT_PIC(x) \ 33 | push %ebx; \ 34 | call L0## x ##$pb; \ 35 | L0## x ##$pb:; \ 36 | pop %ebx; 37 | #define END_PIC(x) pop %ebx 38 | #endif 39 | -------------------------------------------------------------------------------- /Headers/CSToastManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @class CSToastStyle; 10 | 11 | @interface CSToastManager : NSObject 12 | { 13 | _Bool _tapToDismissEnabled; 14 | _Bool _queueEnabled; 15 | CSToastStyle *_sharedStyle; 16 | double _defaultDuration; 17 | id _defaultPosition; 18 | } 19 | 20 | + (id)defaultPosition; 21 | + (void)setDefaultPosition:(id)arg1; 22 | + (double)defaultDuration; 23 | + (void)setDefaultDuration:(double)arg1; 24 | + (_Bool)isQueueEnabled; 25 | + (void)setQueueEnabled:(_Bool)arg1; 26 | + (_Bool)isTapToDismissEnabled; 27 | + (void)setTapToDismissEnabled:(_Bool)arg1; 28 | + (id)sharedStyle; 29 | + (void)setSharedStyle:(id)arg1; 30 | + (id)sharedManager; 31 | - (void).cxx_destruct; 32 | @property(retain, nonatomic) id defaultPosition; // @synthesize defaultPosition=_defaultPosition; 33 | @property(nonatomic) double defaultDuration; // @synthesize defaultDuration=_defaultDuration; 34 | @property(nonatomic, getter=isQueueEnabled) _Bool queueEnabled; // @synthesize queueEnabled=_queueEnabled; 35 | @property(nonatomic, getter=isTapToDismissEnabled) _Bool tapToDismissEnabled; // @synthesize tapToDismissEnabled=_tapToDismissEnabled; 36 | @property(retain, nonatomic) CSToastStyle *sharedStyle; // @synthesize sharedStyle=_sharedStyle; 37 | - (id)init; 38 | 39 | @end 40 | 41 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/UIKit/UIGet/ZXHookUIGet.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZXHookUIGet.h 3 | // ZXHookUtilDemoDylib 4 | // 5 | // Created by 李兆祥 on 2019/2/16. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | typedef NS_OPTIONS(NSUInteger, UIType) { 12 | UITypeView = 0, 13 | UITypeTextField, 14 | UITypeLabel, 15 | UITypeButton, 16 | UITypeImageView 17 | }; 18 | @interface ZXHookUIGet : NSObject 19 | + (instancetype)sharedInstance; 20 | ///获取父控件对应类型UI recursive:是否递归 type:查找的UIType类型 21 | -(NSMutableArray *)getUIInView:(UIView *)view type:(UIType)type recursive:(BOOL)recursive; 22 | ///获取父控件对应类型UI recursive:是否递归 cls:查找的类名 23 | -(NSMutableArray *)getUIInView:(UIView *)view class:(Class)cls recursive:(BOOL)recursive; 24 | ///根据placeHolder从父控件中获取UITextField 25 | -(UITextField *)getTfInView:(UIView *)view placeHolder:(NSString *)placeHolder; 26 | ///根据颜色获取控件 27 | -(NSMutableArray *)getUIInView:(UIView *)view color:(UIColor *)color type:(UIType)type; 28 | ///根据frame获取控件 29 | -(NSMutableArray *)getUIInView:(UIView *)view frame:(CGRect)frame type:(UIType)type; 30 | ///根据高度获取控件 31 | -(NSMutableArray *)getUIInView:(UIView *)view height:(CGFloat)height type:(UIType)type; 32 | ///根据显示内容获取控件 33 | -(NSMutableArray *)getUIInView:(UIView *)view text:(NSString *)text type:(UIType)type; 34 | ///获取keyWindow 35 | +(UIWindow *)getKeyWindow; 36 | ///获取根控制器 37 | +(UIViewController *)getRootVC; 38 | ///获取最前面的控制器 39 | +(UIViewController *)getTopVC; 40 | @end 41 | -------------------------------------------------------------------------------- /TargetApp/TargetApp/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSAppTransportSecurity 6 | 7 | NSAllowsArbitraryLoads 8 | 9 | 10 | CFBundleDevelopmentRegion 11 | $(DEVELOPMENT_LANGUAGE) 12 | CFBundleExecutable 13 | $(EXECUTABLE_NAME) 14 | CFBundleIdentifier 15 | $(PRODUCT_BUNDLE_IDENTIFIER) 16 | CFBundleInfoDictionaryVersion 17 | 6.0 18 | CFBundleName 19 | $(PRODUCT_NAME) 20 | CFBundlePackageType 21 | APPL 22 | CFBundleShortVersionString 23 | 1.0 24 | CFBundleVersion 25 | 1 26 | LSRequiresIPhoneOS 27 | 28 | UILaunchStoryboardName 29 | LaunchScreen 30 | UIRequiredDeviceCapabilities 31 | 32 | armv7 33 | 34 | UISupportedInterfaceOrientations 35 | 36 | UIInterfaceOrientationPortrait 37 | UIInterfaceOrientationLandscapeLeft 38 | UIInterfaceOrientationLandscapeRight 39 | 40 | UISupportedInterfaceOrientations~ipad 41 | 42 | UIInterfaceOrientationPortrait 43 | UIInterfaceOrientationPortraitUpsideDown 44 | UIInterfaceOrientationLandscapeLeft 45 | UIInterfaceOrientationLandscapeRight 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/UIKit/UIGet/UIView+ZXHookUIGet.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+ZXHookUIGet.m 3 | // ZXHookUtilDemoDylib 4 | // 5 | // Created by 李兆祥 on 2019/2/16. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import "UIView+ZXHookUIGet.h" 10 | @implementation UIView (ZXHookUIGet) 11 | -(NSMutableArray *)getUIWithType:(UIType)type{ 12 | ZXHookUIGet *uiget = [ZXHookUIGet sharedInstance]; 13 | return [uiget getUIInView:self type:type recursive:YES]; 14 | } 15 | -(NSMutableArray *)getUIWithClass:(Class)cls{ 16 | ZXHookUIGet *uiget = [ZXHookUIGet sharedInstance]; 17 | return [uiget getUIInView:self class:cls recursive:YES]; 18 | } 19 | -(UITextField *)getTfWithPlaceHolder:(NSString *)placeHolder{ 20 | ZXHookUIGet *uiget = [ZXHookUIGet sharedInstance]; 21 | return [uiget getTfInView:self placeHolder:placeHolder]; 22 | } 23 | -(NSMutableArray *)getTfs{ 24 | return [self getUIWithType:UITypeTextField]; 25 | } 26 | -(NSMutableArray *)getUIWithColor:(UIColor *)color type:(UIType)type{ 27 | ZXHookUIGet *uiget = [ZXHookUIGet sharedInstance]; 28 | return [uiget getUIInView:self color:color type:type]; 29 | } 30 | -(NSMutableArray *)getUIWithHeight:(CGFloat)height type:(UIType)type{ 31 | ZXHookUIGet *uiget = [ZXHookUIGet sharedInstance]; 32 | return [uiget getUIInView:self height:height type:type]; 33 | } 34 | -(NSMutableArray *)getUIWithFrame:(CGRect)frame type:(UIType)type{ 35 | ZXHookUIGet *uiget = [ZXHookUIGet sharedInstance]; 36 | return [uiget getUIInView:self frame:frame type:type]; 37 | } 38 | -(NSMutableArray *)getUIWithText:(NSString *)text type:(UIType)type{ 39 | ZXHookUIGet *uiget = [ZXHookUIGet sharedInstance]; 40 | return [uiget getUIInView:self text:text type:type]; 41 | } 42 | @end 43 | -------------------------------------------------------------------------------- /Headers/CocoaSecurity.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @interface CocoaSecurity : NSObject 10 | { 11 | } 12 | 13 | + (id)hmacSha512WithData:(id)arg1 hmacKey:(id)arg2; 14 | + (id)hmacSha512:(id)arg1 hmacKey:(id)arg2; 15 | + (id)hmacSha384WithData:(id)arg1 hmacKey:(id)arg2; 16 | + (id)hmacSha384:(id)arg1 hmacKey:(id)arg2; 17 | + (id)hmacSha256WithData:(id)arg1 hmacKey:(id)arg2; 18 | + (id)hmacSha256:(id)arg1 hmacKey:(id)arg2; 19 | + (id)hmacSha224WithData:(id)arg1 hmacKey:(id)arg2; 20 | + (id)hmacSha224:(id)arg1 hmacKey:(id)arg2; 21 | + (id)hmacSha1WithData:(id)arg1 hmacKey:(id)arg2; 22 | + (id)hmacSha1:(id)arg1 hmacKey:(id)arg2; 23 | + (id)sha512WithData:(id)arg1; 24 | + (id)sha512:(id)arg1; 25 | + (id)sha384WithData:(id)arg1; 26 | + (id)sha384:(id)arg1; 27 | + (id)sha256WithData:(id)arg1; 28 | + (id)sha256:(id)arg1; 29 | + (id)sha224WithData:(id)arg1; 30 | + (id)sha224:(id)arg1; 31 | + (id)sha1WithData:(id)arg1; 32 | + (id)sha1:(id)arg1; 33 | + (id)hmacMd5WithData:(id)arg1 hmacKey:(id)arg2; 34 | + (id)hmacMd5:(id)arg1 hmacKey:(id)arg2; 35 | + (id)md5WithData:(id)arg1; 36 | + (id)md5:(id)arg1; 37 | + (id)aesDecryptWithData:(id)arg1 key:(id)arg2 iv:(id)arg3; 38 | + (id)aesDecryptWithBase64:(id)arg1 key:(id)arg2 iv:(id)arg3; 39 | + (id)aesDecryptWithBase64:(id)arg1 hexKey:(id)arg2 hexIv:(id)arg3; 40 | + (id)aesDecryptWithBase64:(id)arg1 key:(id)arg2; 41 | + (id)aesEncryptWithData:(id)arg1 key:(id)arg2 iv:(id)arg3; 42 | + (id)aesEncrypt:(id)arg1 key:(id)arg2 iv:(id)arg3; 43 | + (id)aesEncrypt:(id)arg1 hexKey:(id)arg2 hexIv:(id)arg3; 44 | + (id)aesEncrypt:(id)arg1 key:(id)arg2; 45 | 46 | @end 47 | 48 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXBlockLog/CTBlockDescription.h: -------------------------------------------------------------------------------- 1 | // 2 | // CTBlockDescription.h 3 | // CTBlockDescription 4 | // 5 | // Created by Oliver Letterer on 01.09.12. 6 | // Copyright (c) 2012 olettere. All rights reserved. 7 | // 8 | #import 9 | struct CTBlockLiteral { 10 | void *isa; // initialized to &_NSConcreteStackBlock or &_NSConcreteGlobalBlock 11 | int flags; 12 | int reserved; 13 | void (*invoke)(void *, ...); 14 | struct block_descriptor { 15 | unsigned long int reserved; // NULL 16 | unsigned long int size; // sizeof(struct Block_literal_1) 17 | // optional helper functions 18 | void (*copy_helper)(void *dst, void *src); // IFF (1<<25) 19 | void (*dispose_helper)(void *src); // IFF (1<<25) 20 | // required ABI.2010.3.16 21 | const char *signature; // IFF (1<<30) 22 | } *descriptor; 23 | // imported variables 24 | }; 25 | 26 | enum { 27 | CTBlockDescriptionFlagsHasCopyDispose = (1 << 25), 28 | CTBlockDescriptionFlagsHasCtor = (1 << 26), // helpers have C++ code 29 | CTBlockDescriptionFlagsIsGlobal = (1 << 28), 30 | CTBlockDescriptionFlagsHasStret = (1 << 29), // IFF BLOCK_HAS_SIGNATURE 31 | CTBlockDescriptionFlagsHasSignature = (1 << 30) 32 | }; 33 | typedef int CTBlockDescriptionFlags; 34 | 35 | 36 | 37 | @interface CTBlockDescription : NSObject 38 | 39 | @property (nonatomic, readonly) CTBlockDescriptionFlags flags; 40 | @property (nonatomic, readonly) NSMethodSignature *blockSignature; 41 | @property (nonatomic, readonly) unsigned long int size; 42 | @property (nonatomic, readonly) id block; 43 | 44 | - (id)initWithBlock:(id)block; 45 | 46 | - (BOOL)isCompatibleForBlockSwizzlingWithMethodSignature:(NSMethodSignature *)methodSignature; 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xccheckout 23 | *.xcscmblueprint 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | *.ipa 28 | *.dSYM.zip 29 | *.dSYM 30 | 31 | # CocoaPods 32 | # 33 | # We recommend against adding the Pods directory to your .gitignore. However 34 | # you should judge for yourself, the pros and cons are mentioned at: 35 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 36 | # 37 | # Pods/ 38 | # 39 | # Add this line if you want to avoid checking in source code from the Xcode workspace 40 | # *.xcworkspace 41 | 42 | # Carthage 43 | # 44 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 45 | # Carthage/Checkouts 46 | 47 | Carthage/Build 48 | 49 | # fastlane 50 | # 51 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 52 | # screenshots whenever they are needed. 53 | # For more information about the recommended setup visit: 54 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 55 | 56 | fastlane/report.xml 57 | fastlane/Preview.html 58 | fastlane/screenshots/**/*.png 59 | fastlane/test_output 60 | 61 | # Code Injection 62 | # 63 | # After new code Injection tools there's a generated folder /iOSInjectionProject 64 | # https://github.com/johnno1962/injectionforxcode 65 | 66 | iOSInjectionProject/ 67 | 68 | # Ignore System File 69 | .DS_Store 70 | Thumbs.db 71 | -------------------------------------------------------------------------------- /TargetApp/TargetApp/ThirdParty/Encryption/CocoaSecurity/Base64/Base64.h: -------------------------------------------------------------------------------- 1 | // 2 | // Base64.h 3 | // 4 | // Version 1.2 5 | // 6 | // Created by Nick Lockwood on 12/01/2012. 7 | // Copyright (C) 2012 Charcoal Design 8 | // 9 | // Distributed under the permissive zlib License 10 | // Get the latest version from here: 11 | // 12 | // https://github.com/nicklockwood/Base64 13 | // 14 | // This software is provided 'as-is', without any express or implied 15 | // warranty. In no event will the authors be held liable for any damages 16 | // arising from the use of this software. 17 | // 18 | // Permission is granted to anyone to use this software for any purpose, 19 | // including commercial applications, and to alter it and redistribute it 20 | // freely, subject to the following restrictions: 21 | // 22 | // 1. The origin of this software must not be misrepresented; you must not 23 | // claim that you wrote the original software. If you use this software 24 | // in a product, an acknowledgment in the product documentation would be 25 | // appreciated but is not required. 26 | // 27 | // 2. Altered source versions must be plainly marked as such, and must not be 28 | // misrepresented as being the original software. 29 | // 30 | // 3. This notice may not be removed or altered from any source distribution. 31 | // 32 | 33 | #import 34 | 35 | 36 | @interface NSData (Base64) 37 | 38 | + (NSData *)dataWithBase64EncodedString:(NSString *)string; 39 | - (NSString *)base64EncodedStringWithWrapWidth:(NSUInteger)wrapWidth; 40 | - (NSString *)base64EncodedString; 41 | 42 | @end 43 | 44 | 45 | @interface NSString (Base64) 46 | 47 | + (NSString *)stringWithBase64EncodedString:(NSString *)string; 48 | - (NSString *)base64EncodedStringWithWrapWidth:(NSUInteger)wrapWidth; 49 | - (NSString *)base64EncodedString; 50 | - (NSString *)base64DecodedString; 51 | - (NSData *)base64DecodedData; 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/Encryption/CocoaSecurity/Base64/Base64.h: -------------------------------------------------------------------------------- 1 | // 2 | // Base64.h 3 | // 4 | // Version 1.2 5 | // 6 | // Created by Nick Lockwood on 12/01/2012. 7 | // Copyright (C) 2012 Charcoal Design 8 | // 9 | // Distributed under the permissive zlib License 10 | // Get the latest version from here: 11 | // 12 | // https://github.com/nicklockwood/Base64 13 | // 14 | // This software is provided 'as-is', without any express or implied 15 | // warranty. In no event will the authors be held liable for any damages 16 | // arising from the use of this software. 17 | // 18 | // Permission is granted to anyone to use this software for any purpose, 19 | // including commercial applications, and to alter it and redistribute it 20 | // freely, subject to the following restrictions: 21 | // 22 | // 1. The origin of this software must not be misrepresented; you must not 23 | // claim that you wrote the original software. If you use this software 24 | // in a product, an acknowledgment in the product documentation would be 25 | // appreciated but is not required. 26 | // 27 | // 2. Altered source versions must be plainly marked as such, and must not be 28 | // misrepresented as being the original software. 29 | // 30 | // 3. This notice may not be removed or altered from any source distribution. 31 | // 32 | 33 | #import 34 | 35 | 36 | @interface NSData (Base64) 37 | 38 | + (NSData *)dataWithBase64EncodedString:(NSString *)string; 39 | - (NSString *)base64EncodedStringWithWrapWidth:(NSUInteger)wrapWidth; 40 | - (NSString *)base64EncodedString; 41 | 42 | @end 43 | 44 | 45 | @interface NSString (Base64) 46 | 47 | + (NSString *)stringWithBase64EncodedString:(NSString *)string; 48 | - (NSString *)base64EncodedStringWithWrapWidth:(NSUInteger)wrapWidth; 49 | - (NSString *)base64EncodedString; 50 | - (NSString *)base64DecodedString; 51 | - (NSData *)base64DecodedData; 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXDataHandle/ZXDataStore/ZXClassArchived.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZXArchived.m 3 | // ZXDataHandleDemo 4 | // 5 | // Created by 李兆祥 on 2019/1/28. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // GitHub:https://github.com/SmileZXLee/ZXDataHandle 8 | 9 | #import "ZXClassArchived.h" 10 | 11 | @implementation ZXClassArchived 12 | -(void)encodeWithCoder:(NSCoder *)enCoder{ 13 | u_int count; 14 | objc_property_t *properties = class_copyPropertyList([self class],&count); 15 | for(int i = 0;i < count;i++){ 16 | const char *propertyNameChar = property_getName(properties[i]); 17 | NSString *propertyNameStr = [NSString stringWithUTF8String: propertyNameChar]; 18 | if([enCoder respondsToSelector:@selector(encodeObject:forKey:)]){ 19 | id obj = [self valueForKeyPath:propertyNameStr]; 20 | if([obj respondsToSelector:@selector(encodeWithCoder:)]){ 21 | [enCoder encodeObject:obj forKey:propertyNameStr]; 22 | } 23 | 24 | } 25 | 26 | } 27 | free(properties); 28 | 29 | } 30 | -(id)initWithCoder:(NSCoder *)decoder{ 31 | if(self = [super init]){ 32 | u_int count; 33 | objc_property_t *properties = class_copyPropertyList([self class],&count); 34 | for(int i = 0;i < count;i++){ 35 | const char *propertyNameChar = property_getName(properties[i]); 36 | NSString *propertyNameStr = [NSString stringWithUTF8String: propertyNameChar]; 37 | if([decoder respondsToSelector:@selector(decodeObjectForKey:)]){ 38 | id obj = [decoder decodeObjectForKey:propertyNameStr]; 39 | if([obj respondsToSelector:@selector(initWithCoder:)]){ 40 | [self setValue:obj forKeyPath:propertyNameStr]; 41 | } 42 | } 43 | } 44 | free(properties); 45 | } 46 | return self; 47 | } 48 | @end 49 | -------------------------------------------------------------------------------- /SpringbootProject/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.6.3 9 | 10 | 11 | cn.zxlee 12 | signature-analysis-test 13 | 0.0.1-SNAPSHOT 14 | signature-analysis-test 15 | 签名校验测试 16 | 17 | 1.8 18 | 19 | 20 | 21 | org.springframework.boot 22 | spring-boot-starter-web 23 | 24 | 25 | 26 | org.springframework.boot 27 | spring-boot-starter-test 28 | test 29 | 30 | 31 | 32 | org.projectlombok 33 | lombok 34 | 1.18.20 35 | provided 36 | 37 | 38 | 39 | com.alibaba 40 | fastjson 41 | 1.2.79 42 | 43 | 44 | 45 | 46 | 47 | 48 | org.springframework.boot 49 | spring-boot-maven-plugin 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /TargetApp/TargetApp/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /TargetApp/TargetApp/LoginViewController/LoginViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // LoginViewController.m 3 | // TargetApp 4 | // 5 | // Created by 李兆祥 on 2022/1/20. 6 | // 7 | 8 | #import "LoginViewController.h" 9 | #import "HttpRequest.h" 10 | #import "EncryptionTool.h" 11 | #import "UIView+Toast.h" 12 | @interface LoginViewController () 13 | @property (weak, nonatomic) IBOutlet UITextField *accountTf; 14 | @property (weak, nonatomic) IBOutlet UITextField *pwdTf; 15 | @property (weak, nonatomic) IBOutlet UIButton *loginBtn; 16 | 17 | @end 18 | 19 | @implementation LoginViewController 20 | 21 | - (void)viewDidLoad { 22 | [super viewDidLoad]; 23 | self.loginBtn.clipsToBounds = YES; 24 | self.loginBtn.layer.cornerRadius = 10; 25 | } 26 | 27 | 28 | //点击了登录按钮 29 | - (IBAction)loginAction:(id)sender { 30 | [self.view endEditing:YES]; 31 | NSString *account = self.accountTf.text; 32 | NSString *password = self.pwdTf.text; 33 | if(account.length && password.length){ 34 | //对密码进行aes加密,key是xsahdjsad890dsaf 35 | password = [EncryptionTool aesEncrypt:password key:@"xsahdjsad890dsaf"]; 36 | //发送登录请求 37 | [HttpRequest postInterface:@"/login" postData:@{@"account":account,@"password":password} callBack:^(BOOL result, id _Nonnull data) { 38 | if(result && data){ 39 | int code = [data[@"code"] intValue]; 40 | NSString *msg = data[@"message"]; 41 | if(code == 0){ 42 | [self.view makeToast:@"登录成功" duration:1.5 position:CSToastPositionCenter]; 43 | }else{ 44 | [self.view makeToast:msg duration:1.5 position:CSToastPositionCenter]; 45 | } 46 | }else{ 47 | [self.view makeToast:@"请求失败" duration:1.5 position:CSToastPositionCenter]; 48 | } 49 | }]; 50 | }else{ 51 | [self.view makeToast:@"账号或密码不得为空" duration:1.5 position:CSToastPositionCenter]; 52 | } 53 | } 54 | 55 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { 56 | [self.view endEditing:YES]; 57 | } 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXDataHandle/ZXDataStore/NSObject+ZXSQliteHandle.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+ZXSQliteHandle.h 3 | // ZXDataHandleDemo 4 | // 5 | // Created by 李兆祥 on 2019/1/28. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // GitHub:https://github.com/SmileZXLee/ZXDataHandle 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | typedef enum { 13 | AlertTypeInsert = 0x00, // 修改类型:插入数据 14 | AlertTypeUpdate = 0x01, // 修改类型:更新数据 15 | }AlertType; 16 | 17 | typedef enum { 18 | ConnTypeAnd = 0x00, // where语句字典连接词AND 19 | ConnTypeOr = 0x01, // where语句字典连接词OR 20 | }ConnType; 21 | 22 | typedef enum { 23 | ReturnTypeBool = 0x00, // zx_dbAlertWhereArg返回类型Bool 24 | ReturnTypeArr = 0x01, // zx_dbAlertWhereArg返回类型Arr 25 | }ReturnType; 26 | 27 | @interface NSObject (ZXSQliteHandle) 28 | #pragma mark 以下三个一般由内部自动处理,真正需要的时候再自行调用 29 | ///创建与当前类同名的table,字段对应类的属性 30 | +(BOOL)zx_dbCreatTable; 31 | ///删除与当前类同名的table 32 | +(BOOL)zx_dbDropTable; 33 | ///更新当前表字段 34 | +(BOOL)zx_dbUpdateTableFields; 35 | 36 | ///将当前对象存储到同名表中 37 | -(BOOL)zx_dbSave; 38 | 39 | ///删除一条或多条数据,where可以是字典或一段where之后的运算符,nil或空字符串代表所有数据 40 | +(BOOL)zx_dbDropWhere:(id)where; 41 | ///删除一条或多条数据,可以传入多个参数,多个参数拼接成where语句,nil或空字符串代表所有数据 42 | +(BOOL)zx_dbDropWhereArg:(NSString *)arg1,...; 43 | 44 | 45 | ///根据当前对象更新一条或多条数据,where可以是字典或一段where之后的运算符,nil或空字符串代表所有数据 46 | -(BOOL)zx_dbUpdateWhere:(id)where; 47 | ///根据当前对象更新一条或多条数据,可以传入多个参数,多个参数拼接成where语句,nil或空字符串代表所有数据 48 | -(BOOL)zx_dbUpdateWhereArg:(NSString *)arg1,...; 49 | ///根据字典更新一条或多条数据,where可以是字典或一段where之后的运算符,nil或空字符串代表所有数据 50 | +(BOOL)zx_dbUpdateDic:(NSDictionary *)updateDic where:(id)where; 51 | ///根据字典更新一条或多条数据,可以传入多个参数,多个参数拼接成where语句,nil或空字符串代表所有数据 52 | +(BOOL)zx_dbUpdateDic:(NSDictionary *)updateDic whereArg:(NSString *)arg1,...; 53 | 54 | ///从当前表中查询数据并直接返回对象数组,where语句支持字典或sql字符串,字典默认使用AND连接,键值对比较为等号,其他情况请使用zx_dbQuaryWhereArg 55 | +(NSArray *)zx_dbQuaryWhere:(id)where; 56 | ///从当前表中查询数据,where语句多参数拼接 57 | +(NSArray *)zx_dbQuaryWhereArg:(NSString *)arg1,...; 58 | ///查询当前表中所有数据 59 | +(NSArray *)zx_dbQuaryAll; 60 | @end 61 | 62 | NS_ASSUME_NONNULL_END 63 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXDataHandle/ZXDataStore/ZXClassArchived.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZXArchived.h 3 | // ZXDataHandleDemo 4 | // 5 | // Created by 李兆祥 on 2019/1/28. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 继承这个类即可直接将自定义的对象归档存储 8 | 9 | #import 10 | #import 11 | #define ZXClassArchivedImplementation \ 12 | -(void)encodeWithCoder:(NSCoder *)enCoder{\ 13 | u_int count;\ 14 | objc_property_t *properties = class_copyPropertyList([self class],&count);\ 15 | for(int i = 0;i < count;i++){\ 16 | const char *propertyNameChar = property_getName(properties[i]);\ 17 | NSString *propertyNameStr = [NSString stringWithUTF8String: propertyNameChar];\ 18 | if([enCoder respondsToSelector:@selector(encodeObject:forKey:)]){\ 19 | id obj = [self valueForKeyPath:propertyNameStr];\ 20 | if([obj respondsToSelector:@selector(encodeWithCoder:)]){\ 21 | [enCoder encodeObject:obj forKey:propertyNameStr];\ 22 | }\ 23 | \ 24 | }\ 25 | \ 26 | }\ 27 | free(properties);\ 28 | \ 29 | }\ 30 | -(id)initWithCoder:(NSCoder *)decoder{\ 31 | if(self = [super init]){\ 32 | u_int count;\ 33 | objc_property_t *properties = class_copyPropertyList([self class],&count);\ 34 | for(int i = 0;i < count;i++){\ 35 | const char *propertyNameChar = property_getName(properties[i]);\ 36 | NSString *propertyNameStr = [NSString stringWithUTF8String: propertyNameChar];\ 37 | if([decoder respondsToSelector:@selector(decodeObjectForKey:)]){\ 38 | id obj = [decoder decodeObjectForKey:propertyNameStr];\ 39 | if([obj respondsToSelector:@selector(initWithCoder:)]){\ 40 | [self setValue:obj forKeyPath:propertyNameStr];\ 41 | }\ 42 | }\ 43 | }\ 44 | free(properties);\ 45 | }\ 46 | return self;\ 47 | } 48 | 49 | NS_ASSUME_NONNULL_BEGIN 50 | 51 | @interface ZXClassArchived : NSObject 52 | -(void)encodeWithCoder:(NSCoder *)enCoder; 53 | -(id)initWithCoder:(NSCoder *)decoder; 54 | @end 55 | 56 | NS_ASSUME_NONNULL_END 57 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXDataHandle/ZXDataConvert/BaseTool/NSObject+ZXDataConvertRule.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+ZXDataConvertRule.m 3 | // ZXDataHandleDemo 4 | // 5 | // Created by 李兆祥 on 2019/1/28. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // GitHub:https://github.com/SmileZXLee/ZXDataHandle 8 | 9 | #import "NSObject+ZXDataConvertRule.h" 10 | #import "NSDictionary+ZXSafetySet.h" 11 | @implementation NSObject (ZXDataConvertRule) 12 | +(NSDictionary *)getInArrModelNameDic{ 13 | if([self respondsToSelector:@selector(zx_inArrModelName)]){ 14 | NSDictionary *inArrModelNameDic = [self performSelector:@selector(zx_inArrModelName)]; 15 | return inArrModelNameDic; 16 | } 17 | return nil; 18 | } 19 | +(NSDictionary *)getReplaceProNameDic{ 20 | if([self respondsToSelector:@selector(zx_replaceProName)]){ 21 | NSDictionary *replaceProNameDic = [self performSelector:@selector(zx_replaceProName)]; 22 | return replaceProNameDic; 23 | } 24 | return nil; 25 | } 26 | +(NSString *)getReplacedProName:(NSString *)proName{ 27 | NSDictionary *replaceProNameDic = [self getReplaceProNameDic]; 28 | if(replaceProNameDic){ 29 | NSString *repKey = [replaceProNameDic zx_dicSafetyReadForKey:proName]; 30 | if(repKey.length){ 31 | return repKey; 32 | } 33 | } 34 | if([self respondsToSelector:@selector(zx_replaceProName121:)]){ 35 | NSString *replacedProStr = [self performSelector:@selector(zx_replaceProName121:) withObject:proName]; 36 | if(replacedProStr.length){ 37 | return replacedProStr; 38 | } 39 | } 40 | return proName; 41 | } 42 | 43 | +(NSArray *)getIgnorePros{ 44 | if([self respondsToSelector:@selector(zx_ignorePros)]){ 45 | NSArray *ignorePros = [self performSelector:@selector(zx_ignorePros)]; 46 | return ignorePros; 47 | } 48 | return nil; 49 | } 50 | 51 | +(BOOL)isinIgnorePros:(NSString *)proStr{ 52 | NSArray *ignoreProsArr = [self getIgnorePros]; 53 | if(!ignoreProsArr.count){ 54 | return NO; 55 | } 56 | return [ignoreProsArr containsObject:proStr]; 57 | } 58 | @end 59 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXDataHandle/ZXDataStore/ZXDataStoreCache.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZXDataStoreCache.h 3 | // ZXDataHandleDemo 4 | // 5 | // Created by 李兆祥 on 2019/1/28. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // GitHub:https://github.com/SmileZXLee/ZXDataHandle 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface ZXDataStoreCache : NSObject 14 | ///将数据写入用户偏好 15 | +(void)saveObj:(id)obj forKey:(NSString *)key; 16 | ///从用户偏好设置中读取数据 17 | +(id)readObjForKey:(NSString *)key; 18 | ///将数据(NSUInteger)写入用户偏好 19 | +(void)saveInteger:(NSUInteger)integerValue forKey:(NSString *)key; 20 | ///从用户偏好设置中读取数据(NSUInteger) 21 | +(NSUInteger)readIntegerForKey:(NSString *)key; 22 | ///将数据(BOOL)写入用户偏好 23 | +(void)saveBool:(BOOL)boolValue forKey:(NSString *)key; 24 | ///从用户偏好设置中读取数据(BOOL) 25 | +(BOOL)readBoolForKey:(NSString *)key; 26 | ///将数据(Float)写入用户偏好 27 | +(void)saveFloat:(float)floatValue forKey:(NSString *)key; 28 | ///从用户偏好设置中读取数据(Float) 29 | +(float)readFloatForKey:(NSString *)key; 30 | ///将数据(Double)写入用户偏好 31 | +(void)saveDouble:(double)doubleValue forKey:(NSString *)key; 32 | ///从用户偏好设置中读取数据(Double) 33 | +(double)readDoubleForKey:(NSString *)key; 34 | ///将数据(NSURL)写入用户偏好 35 | +(void)saveUrl:(NSURL *)urlValue forKey:(NSString *)key; 36 | ///从用户偏好设置中读取数据(NSURL) 37 | +(NSURL *)readUrlForKey:(NSString *)key; 38 | ///#pragma mark 归档存储数据 39 | +(void)arcObj:(id)obj pathComponent:(NSString *)pathComponent; 40 | ///读档读取数据 41 | +(id)unArcObjPathComponent:(NSString *)pathComponent; 42 | ///设置用户数据存储的account,若使用了saveUserObj:pathComponent:则此项必须设置,否则saveUserObj:pathComponent:与arcObj:pathComponent:等同 43 | +(void)saveUserAccount:(NSString *)userAccount; 44 | ///读取用户数据存储的account 45 | +(NSString *)readUserAccount; 46 | ///根据用户将对象存储至沙盒,请注意务必配置saveUserAccount:,否则saveUserObj:pathComponent:与arcObj:pathComponent:等同 47 | +(void)saveUserObj:(id)obj pathComponent:(NSString *)pathComponent; 48 | ///根据用户从沙盒中读取数据,请注意务必配置saveUserAccount:,否则readUserObjPathComponent:与unArcObjPathComponent:等同 49 | +(instancetype)readUserObjPathComponent:(NSString *)pathComponent; 50 | ///清除沙盒数据 51 | +(void)cleanCacheData; 52 | ///清除NSUserDefalut数据 53 | +(void)cleanUserDefault; 54 | 55 | @end 56 | 57 | NS_ASSUME_NONNULL_END 58 | -------------------------------------------------------------------------------- /SpringbootProject/src/main/java/cn/zxlee/signatureanalysistest/controller/LoginController.java: -------------------------------------------------------------------------------- 1 | package cn.zxlee.signatureanalysistest.controller; 2 | 3 | import cn.zxlee.signatureanalysistest.response.CommonResponse; 4 | import cn.zxlee.signatureanalysistest.utils.AESUtils; 5 | import cn.zxlee.signatureanalysistest.utils.SignUtils; 6 | import cn.zxlee.signatureanalysistest.vo.LoginVO; 7 | import org.springframework.web.bind.annotation.RequestBody; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | import org.springframework.web.bind.annotation.RestController; 10 | 11 | /** 12 | * @program: signature-analysis-test 13 | * @description: LoginController 14 | * @author: zxlee 15 | * @create: 2022-01-21 16 | **/ 17 | @RestController 18 | @RequestMapping("/api/v1/") 19 | public class LoginController { 20 | @RequestMapping("/login") 21 | public CommonResponse login(@RequestBody LoginVO vo) { 22 | System.out.println("请求参数=> " + vo.toString()); 23 | 24 | //签名校验 25 | //一般放在拦截器/过滤器中统一处理,此处为了方便直接写在控制器中 26 | if(!SignUtils.checkSign(vo,"/login")){ 27 | return new CommonResponse().error("签名校验失败"); 28 | } 29 | 30 | String account = vo.getAccount(); 31 | String password = vo.getPassword(); 32 | //----------begin账号和密码判空操作----------- 33 | if(null == account || account.isEmpty()){ 34 | return new CommonResponse().error("账号不能为空"); 35 | } 36 | if(null == password || password.isEmpty()){ 37 | return new CommonResponse().error("密码不能为空"); 38 | } 39 | //----------end----------- 40 | 41 | //密码aes解密 42 | try { 43 | password = AESUtils.decrypt(password,"xsahdjsad890dsaf"); 44 | } catch (Exception e) { 45 | e.printStackTrace(); 46 | return new CommonResponse().error("密码解密失败"); 47 | } 48 | 49 | //对账号密码进行简单的校验 50 | //账号为:zxlee,密码为123456时,可以登录成功 51 | if(!"zxlee".equals(account)){ 52 | return new CommonResponse().error("用户名不存在"); 53 | } 54 | 55 | if(!"123456".equals(password)){ 56 | return new CommonResponse().error("密码错误"); 57 | } 58 | 59 | return new CommonResponse("登录成功").success(); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXDataHandle/ZXDataConvert/BaseTool/NSObject+ZXGetProperty.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+ZXGetProperty.m 3 | // ZXDataHandleDemo 4 | // 5 | // Created by 李兆祥 on 2019/1/27. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // GitHub:https://github.com/SmileZXLee/ZXDataHandle 8 | 9 | #import "NSObject+ZXGetProperty.h" 10 | #import "ZXDataConvert.h" 11 | #import "NSDictionary+ZXSafetySet.h" 12 | #import 13 | @implementation NSObject (ZXGetProperty) 14 | +(NSMutableArray *)getAllPropertyNames{ 15 | if([[ZXDataConvert shareInstance].allPropertyDic.allKeys containsObject:NSStringFromClass([self class])]){ 16 | return [[ZXDataConvert shareInstance].allPropertyDic zx_dicSafetyReadForKey:NSStringFromClass([self class])]; 17 | } 18 | NSMutableArray *propertyNamesArr = [NSMutableArray array]; 19 | [self getEnumPropertyNamesCallBack:^(NSString *proName,NSString *proType) { 20 | if(proName.length){ 21 | [propertyNamesArr addObject:proName]; 22 | } 23 | }]; 24 | [[ZXDataConvert shareInstance].allPropertyDic zx_dicSaftySetValue:propertyNamesArr forKey:NSStringFromClass([self class])]; 25 | return propertyNamesArr; 26 | } 27 | +(void)getEnumPropertyNamesCallBack:(kEnumEventHandler)_result{ 28 | Class supCls = [self class]; 29 | while (true) { 30 | if(([NSBundle bundleForClass:supCls] == [NSBundle mainBundle])){ 31 | [self getSubEnumPropertyNamesCallBack:_result cls:supCls]; 32 | }else{ 33 | break; 34 | } 35 | supCls = [supCls superclass]; 36 | } 37 | } 38 | 39 | +(void)getSubEnumPropertyNamesCallBack:(kEnumEventHandler)_result cls:(Class)cls{ 40 | u_int count; 41 | objc_property_t *properties = class_copyPropertyList(cls,&count); 42 | for(NSUInteger i = 0;i < count;i++){ 43 | const char *propertyNameChar = property_getName(properties[i]); 44 | const char *propertyTypeChar = property_getAttributes(properties[i]); 45 | NSString *propertyNameStr = [NSString stringWithUTF8String: propertyNameChar]; 46 | NSString *propertyTypeStr = [NSString stringWithUTF8String: propertyTypeChar]; 47 | _result(propertyNameStr,propertyTypeStr); 48 | } 49 | free(properties); 50 | } 51 | @end 52 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXDataHandle/ZXDataConvert/BaseTool/NSString+ZXDataConvert.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+ZXDataConvert.m 3 | // ZXDataHandleDemo 4 | // 5 | // Created by 李兆祥 on 2019/1/27. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // GitHub:https://github.com/SmileZXLee/ZXDataHandle 8 | 9 | #import "NSString+ZXDataConvert.h" 10 | #import "ZXDataHandleLog.h" 11 | @implementation NSString (ZXDataConvert) 12 | //json字符串转字典 13 | -(id)zx_jsonToDic{ 14 | NSData *jsonData = [self dataUsingEncoding:NSUTF8StringEncoding]; 15 | return [self zx_toDocWithData:jsonData]; 16 | } 17 | -(id)zx_toDocWithData:(NSData *)jsonData{ 18 | 19 | NSError *error = nil; 20 | id jsonObject = [NSJSONSerialization JSONObjectWithData:jsonData 21 | options:NSJSONReadingAllowFragments 22 | error:nil]; 23 | if (jsonObject != nil && error == nil){ 24 | return jsonObject; 25 | }else{ 26 | ZXDataHandleLog(@"Json解析出错---%@",self); 27 | return nil; 28 | } 29 | } 30 | 31 | -(NSString *)strToHump{ 32 | if(!self.length) return self; 33 | NSMutableString *muStr = [NSMutableString stringWithString:self]; 34 | while([muStr containsString:@"_"]) { 35 | NSRange range = [muStr rangeOfString:@"_"]; 36 | if(range.location + 1 < [muStr length]) { 37 | char c = [muStr characterAtIndex:range.location + 1]; 38 | [muStr replaceCharactersInRange:NSMakeRange(range.location, range.length+1)withString:[[NSString stringWithFormat:@"%c",c]uppercaseString]]; 39 | } 40 | } 41 | return muStr; 42 | } 43 | -(NSString *)strToUnderLine{ 44 | if(!self.length) return self; 45 | NSMutableString *muStr = [NSMutableString string]; 46 | for (int i = 0; i 12 | static BOOL isDisableHttpProxy = NO; 13 | @implementation NSURLSession (ZXHttpProxy) 14 | +(void)load{ 15 | [super load]; 16 | static dispatch_once_t onceToken; 17 | dispatch_once(&onceToken, ^{ 18 | [NSURLProtocol registerClass:[ZXURLProtocol class]]; 19 | Class class = [NSURLSession class]; 20 | [self swizzingMethodWithClass:class orgSel:NSSelectorFromString(@"sessionWithConfiguration:") swiSel:NSSelectorFromString(@"zx_sessionWithConfiguration:")]; 21 | [self swizzingMethodWithClass:class orgSel:NSSelectorFromString(@"sessionWithConfiguration:delegate:delegateQueue:") swiSel:NSSelectorFromString(@"zx_sessionWithConfiguration:delegate:delegateQueue:")]; 22 | }); 23 | } 24 | +(void)disableHttpProxy{ 25 | isDisableHttpProxy = YES; 26 | } 27 | +(void)enableHttpProxy{ 28 | isDisableHttpProxy = NO; 29 | } 30 | +(NSURLSession *)zx_sessionWithConfiguration:(NSURLSessionConfiguration *)configuration 31 | delegate:(nullable id)delegate 32 | delegateQueue:(nullable NSOperationQueue *)queue{ 33 | if (!configuration){ 34 | configuration = [[NSURLSessionConfiguration alloc] init]; 35 | } 36 | if(isDisableHttpProxy){ 37 | configuration.connectionProxyDictionary = @{}; 38 | } 39 | return [self zx_sessionWithConfiguration:configuration delegate:delegate delegateQueue:queue]; 40 | } 41 | 42 | +(NSURLSession *)zx_sessionWithConfiguration:(NSURLSessionConfiguration *)configuration{ 43 | if (configuration && isDisableHttpProxy){ 44 | configuration.connectionProxyDictionary = @{}; 45 | } 46 | return [self zx_sessionWithConfiguration:configuration]; 47 | } 48 | 49 | +(void)swizzingMethodWithClass:(Class)cls orgSel:(SEL) orgSel swiSel:(SEL) swiSel{ 50 | Method orgMethod = class_getClassMethod(cls, orgSel); 51 | Method swiMethod = class_getClassMethod(cls, swiSel); 52 | method_exchangeImplementations(orgMethod, swiMethod); 53 | } 54 | 55 | @end 56 | 57 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/UIKit/ShadowView/UIView+ZXFrame.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+ZXFrame.m 3 | // ZXHookUtilDemoDylib 4 | // 5 | // Created by 李兆祥 on 2019/3/11. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import "UIView+ZXFrame.h" 10 | 11 | @implementation UIView (ZXFrame) 12 | - (CGFloat)x { 13 | return self.frame.origin.x; 14 | } 15 | 16 | - (void)setX:(CGFloat)x { 17 | self.frame = CGRectMake(x, self.y, self.width, self.height); 18 | } 19 | 20 | - (CGFloat)y { 21 | return self.frame.origin.y; 22 | } 23 | 24 | - (void)setY:(CGFloat)y { 25 | self.frame = CGRectMake(self.x, y, self.width, self.height); 26 | } 27 | 28 | - (CGFloat)width { 29 | return self.frame.size.width; 30 | } 31 | 32 | - (void)setWidth:(CGFloat)width { 33 | self.frame = CGRectMake(self.x, self.y, width, self.height); 34 | } 35 | 36 | - (CGFloat)height { 37 | return self.frame.size.height; 38 | } 39 | 40 | - (void)setHeight:(CGFloat)height { 41 | self.frame = CGRectMake(self.x, self.y, self.width, height); 42 | } 43 | 44 | - (CGFloat)right { 45 | return self.frame.origin.x + self.frame.size.width; 46 | } 47 | 48 | - (void)setRight:(CGFloat)right { 49 | CGRect frame = self.frame; 50 | frame.origin.x = right - frame.size.width; 51 | self.frame = frame; 52 | } 53 | 54 | - (CGFloat)bottom { 55 | return self.frame.origin.y + self.frame.size.height; 56 | } 57 | 58 | - (void)setBottom:(CGFloat)bottom { 59 | CGRect frame = self.frame; 60 | frame.origin.y = bottom - frame.size.height; 61 | self.frame = frame; 62 | } 63 | 64 | - (CGFloat)centerX { 65 | return self.center.x; 66 | } 67 | 68 | - (void)setCenterX:(CGFloat)centerX { 69 | self.center = CGPointMake(centerX, self.center.y); 70 | } 71 | 72 | - (CGFloat)centerY { 73 | return self.center.y; 74 | } 75 | 76 | - (void)setCenterY:(CGFloat)centerY { 77 | self.center = CGPointMake(self.center.x, centerY); 78 | } 79 | 80 | - (CGPoint)origin { 81 | return self.frame.origin; 82 | } 83 | 84 | - (void)setOrigin:(CGPoint)origin { 85 | CGRect frame = self.frame; 86 | frame.origin = origin; 87 | self.frame = frame; 88 | } 89 | 90 | - (CGSize)size { 91 | return self.frame.size; 92 | } 93 | 94 | - (void)setSize:(CGSize)size { 95 | CGRect frame = self.frame; 96 | frame.size = size; 97 | self.frame = frame; 98 | } 99 | @end 100 | -------------------------------------------------------------------------------- /SpringbootProject/src/main/java/cn/zxlee/signatureanalysistest/utils/SignUtils.java: -------------------------------------------------------------------------------- 1 | package cn.zxlee.signatureanalysistest.utils; 2 | 3 | import cn.zxlee.signatureanalysistest.vo.CommonVO; 4 | import com.alibaba.fastjson.JSON; 5 | import org.springframework.util.DigestUtils; 6 | 7 | import java.util.ArrayList; 8 | import java.util.Arrays; 9 | import java.util.Map; 10 | import java.util.Set; 11 | 12 | /** 13 | * @program: signature-analysis-test 14 | * @description: SignUtils 15 | * @author: zxlee 16 | * @create: 2022-01-21 17 | **/ 18 | public class SignUtils { 19 | //用于在内存中缓存合法的sign,实际项目中建议存在redis中或用Spring Cache之类的进行管理 20 | static ArrayList signCahceArr = new ArrayList<>(); 21 | 22 | /** 23 | * @Description: 计算签名 24 | * @Param: [vo, inter] 25 | * @return: java.lang.String 26 | * @Author: zxlee 27 | * @Date: 2022/1/21 28 | */ 29 | public static String getSign(CommonVO vo,String inter){ 30 | String result = ""; 31 | Map map = (Map) JSON.toJSON(vo); 32 | Set set = map.keySet(); 33 | Object[] arr = set.toArray(); 34 | Arrays.sort(arr); 35 | for(Object key : arr){ 36 | if(!"timestamp".equals(key) && !"sign".equals(key)){ 37 | result += key + map.get(key).toString(); 38 | } 39 | } 40 | result = "mysign$#@" + inter + result + map.get("timestamp") + "csjnjksadh"; 41 | return DigestUtils.md5DigestAsHex(result.getBytes()); 42 | } 43 | 44 | /** 45 | * @Description: 验证签名是否合法 46 | * @Param: [vo, inter] 47 | * @return: java.lang.Boolean 48 | * @Author: zxlee 49 | * @Date: 2022/1/21 50 | */ 51 | public static Boolean checkSign(CommonVO vo,String inter){ 52 | String sign = vo.getSign(); 53 | //如果入参中sign不存在,直接返回false 54 | if(null == sign || sign.isEmpty()){ 55 | return false; 56 | } 57 | //如果signCahceArr中已经存在此sign,则直接返回false,可有效避免请求重放 58 | if(signCahceArr.contains(sign)){ 59 | return false; 60 | } 61 | //如果入参中sign不存在,直接返回false 62 | String calcSign = getSign(vo,inter); 63 | Boolean equals = calcSign.equals(sign); 64 | if(equals){ 65 | //如果签名验证通过,将合法的sign存到缓存中,因为添加了timestamp参数,可以正常请求下保证同一客户端每次请求sign必定不同 66 | //若考虑高并发情况,建议根据ip区分一下sign 67 | signCahceArr.add(sign); 68 | } 69 | return equals; 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /TargetApp/TargetApp/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // TargetApp 4 | // 5 | // Created by 李兆祥 on 2022/1/23. 6 | // Copyright © 2022 李兆祥. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "LoginViewController.h" 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | UIWindow *window = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds]; 20 | LoginViewController *vc = [[LoginViewController alloc]init]; 21 | window.rootViewController = vc; 22 | [window makeKeyAndVisible]; 23 | self.window = window; 24 | return YES; 25 | } 26 | 27 | 28 | - (void)applicationWillResignActive:(UIApplication *)application { 29 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 30 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 31 | } 32 | 33 | 34 | - (void)applicationDidEnterBackground:(UIApplication *)application { 35 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 36 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 37 | } 38 | 39 | 40 | - (void)applicationWillEnterForeground:(UIApplication *)application { 41 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 42 | } 43 | 44 | 45 | - (void)applicationDidBecomeActive:(UIApplication *)application { 46 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 47 | } 48 | 49 | 50 | - (void)applicationWillTerminate:(UIApplication *)application { 51 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 52 | } 53 | 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /HookApp/HookApp/TargetApp/TargetApp.app/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 20G165 7 | CFBundleDevelopmentRegion 8 | en 9 | CFBundleExecutable 10 | TargetApp 11 | CFBundleIdentifier 12 | cn.zxlee.TargetApp 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | TargetApp 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSupportedPlatforms 22 | 23 | iPhoneOS 24 | 25 | CFBundleVersion 26 | 1 27 | DTAppStoreToolsBuild 28 | 13A233 29 | DTCompiler 30 | com.apple.compilers.llvm.clang.1_0 31 | DTPlatformBuild 32 | 19A339 33 | DTPlatformName 34 | iphoneos 35 | DTPlatformVersion 36 | 15.0 37 | DTSDKBuild 38 | 19A339 39 | DTSDKName 40 | iphoneos15.0 41 | DTXcode 42 | 1300 43 | DTXcodeBuild 44 | 13A233 45 | LSRequiresIPhoneOS 46 | 47 | MinimumOSVersion 48 | 9.0 49 | NSAppTransportSecurity 50 | 51 | NSAllowsArbitraryLoads 52 | 53 | 54 | UIDeviceFamily 55 | 56 | 1 57 | 2 58 | 59 | UILaunchStoryboardName 60 | LaunchScreen 61 | UIRequiredDeviceCapabilities 62 | 63 | armv7 64 | 65 | UISupportedInterfaceOrientations 66 | 67 | UIInterfaceOrientationPortrait 68 | UIInterfaceOrientationLandscapeLeft 69 | UIInterfaceOrientationLandscapeRight 70 | 71 | UISupportedInterfaceOrientations~ipad 72 | 73 | UIInterfaceOrientationPortrait 74 | UIInterfaceOrientationPortraitUpsideDown 75 | UIInterfaceOrientationLandscapeLeft 76 | UIInterfaceOrientationLandscapeRight 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXBlockLog/CTBlockDescription.m: -------------------------------------------------------------------------------- 1 | // 2 | // CTBlockDescription.m 3 | // CTBlockDescription 4 | // 5 | // Created by Oliver Letterer on 01.09.12. 6 | // Copyright (c) 2012 olettere. All rights reserved. 7 | // 8 | 9 | #import "CTBlockDescription.h" 10 | 11 | @implementation CTBlockDescription 12 | 13 | - (id)initWithBlock:(id)block 14 | { 15 | if (self = [super init]) { 16 | _block = block; 17 | 18 | struct CTBlockLiteral *blockRef = (__bridge struct CTBlockLiteral *)block; 19 | _flags = blockRef->flags; 20 | _size = blockRef->descriptor->size; 21 | 22 | if (_flags & CTBlockDescriptionFlagsHasSignature) { 23 | void *signatureLocation = blockRef->descriptor; 24 | signatureLocation += sizeof(unsigned long int); 25 | signatureLocation += sizeof(unsigned long int); 26 | 27 | if (_flags & CTBlockDescriptionFlagsHasCopyDispose) { 28 | signatureLocation += sizeof(void(*)(void *dst, void *src)); 29 | signatureLocation += sizeof(void (*)(void *src)); 30 | } 31 | 32 | const char *signature = (*(const char **)signatureLocation); 33 | _blockSignature = [NSMethodSignature signatureWithObjCTypes:signature]; 34 | } 35 | } 36 | return self; 37 | } 38 | 39 | - (BOOL)isCompatibleForBlockSwizzlingWithMethodSignature:(NSMethodSignature *)methodSignature 40 | { 41 | if (_blockSignature.numberOfArguments != methodSignature.numberOfArguments + 1) { 42 | return NO; 43 | } 44 | 45 | if (strcmp(_blockSignature.methodReturnType, methodSignature.methodReturnType) != 0) { 46 | return NO; 47 | } 48 | 49 | for (int i = 0; i < methodSignature.numberOfArguments; i++) { 50 | if (i == 1) { 51 | // SEL in method, IMP in block 52 | if (strcmp([methodSignature getArgumentTypeAtIndex:i], ":") != 0) { 53 | return NO; 54 | } 55 | 56 | if (strcmp([_blockSignature getArgumentTypeAtIndex:i + 1], "^?") != 0) { 57 | return NO; 58 | } 59 | } else { 60 | if (strcmp([methodSignature getArgumentTypeAtIndex:i], [_blockSignature getArgumentTypeAtIndex:i + 1]) != 0) { 61 | return NO; 62 | } 63 | } 64 | } 65 | 66 | return YES; 67 | } 68 | 69 | - (NSString *)description 70 | { 71 | return [NSString stringWithFormat:@"%@: %@", [super description], _blockSignature.description]; 72 | } 73 | 74 | @end 75 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/UIKit/ShadowView/ZXShadowView.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZXShadowView.m 3 | // ZXHookUtilDemoDylib 4 | // 5 | // Created by 李兆祥 on 2019/3/11. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import "ZXShadowView.h" 10 | #import "UIView+ZXFrame.h" 11 | @implementation ZXShadowView 12 | static id staticV; 13 | - (instancetype)init{ 14 | self = [super init]; 15 | if (self) { 16 | [self initOpr]; 17 | 18 | } 19 | return self; 20 | } 21 | 22 | - (instancetype)initWithFrame:(CGRect)frame{ 23 | self = [super initWithFrame:frame]; 24 | if (self) { 25 | [self initOpr]; 26 | } 27 | return self; 28 | } 29 | 30 | -(void)awakeFromNib{ 31 | [super awakeFromNib]; 32 | [self initOpr]; 33 | } 34 | 35 | -(void)initOpr{ 36 | self.backgroundColor = [UIColor colorWithWhite:0.0 alpha:0.7]; 37 | self.userInteractionEnabled = YES; 38 | [self addGestureRecognizer:[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(selfTap:)]]; 39 | } 40 | 41 | -(void)selfTap:(UIGestureRecognizer *)gr{ 42 | [self disMiss]; 43 | } 44 | -(void)show{ 45 | staticV = self; 46 | self.alpha = 0.0; 47 | self.frame = [UIScreen mainScreen].bounds; 48 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillChangeFrame:) name:UIKeyboardWillChangeFrameNotification object:nil]; 49 | [[UIApplication sharedApplication].keyWindow ?: [UIApplication sharedApplication].windows.firstObject addSubview:staticV]; 50 | [UIView animateWithDuration:0.25 animations:^{ 51 | self.alpha = 1.0; 52 | } completion:^(BOOL finished) { 53 | 54 | }]; 55 | } 56 | 57 | -(void)disMiss{ 58 | [UIView animateWithDuration:0.25 animations:^{ 59 | self.alpha = 0.0; 60 | } completion:^(BOOL finished) { 61 | [staticV removeFromSuperview]; 62 | [[NSNotificationCenter defaultCenter]removeObserver:self]; 63 | }]; 64 | } 65 | 66 | - (void)keyboardWillChangeFrame:(NSNotification *)note{ 67 | 68 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ 69 | CGFloat duration = [note.userInfo[UIKeyboardAnimationDurationUserInfoKey] doubleValue]; 70 | CGRect keyboardFrame = [note.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue]; 71 | 72 | [UIView animateWithDuration:duration animations:^{ 73 | self.y = -([UIScreen mainScreen].bounds.size.height - keyboardFrame.origin.y) / 2; 74 | if(self.y > 10){ 75 | self.y -= 40; 76 | } 77 | }]; 78 | }); 79 | 80 | } 81 | @end 82 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXRequestBlock/ZXHttpIPGet.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZXHttpIPGet.m 3 | // ZXRequestBlockDemo 4 | // 5 | // Created by 李兆祥 on 2018/8/26. 6 | // Copyright © 2018年 李兆祥. All rights reserved. 7 | // 8 | 9 | #import "ZXHttpIPGet.h" 10 | #import 11 | #include 12 | 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | @implementation ZXHttpIPGet 20 | +(NSString *)getIPArrFromLocalDnsWithUrlStr:(NSString *)urlStr{ 21 | urlStr = [[urlStr stringByReplacingOccurrencesOfString:@"http://" withString:@""]stringByReplacingOccurrencesOfString:@"https://" withString:@""]; 22 | Boolean result,bResolved; 23 | CFHostRef hostRef; 24 | CFArrayRef addresses = NULL; 25 | NSMutableArray * ipsArr = [[NSMutableArray alloc] init]; 26 | CFStringRef hostNameRef = CFStringCreateWithCString(kCFAllocatorDefault, [urlStr cStringUsingEncoding:NSASCIIStringEncoding], kCFStringEncodingASCII); 27 | 28 | hostRef = CFHostCreateWithName(kCFAllocatorDefault, hostNameRef); 29 | result = CFHostStartInfoResolution(hostRef, kCFHostAddresses, NULL); 30 | if (result == TRUE) { 31 | addresses = CFHostGetAddressing(hostRef, &result); 32 | } 33 | bResolved = result == TRUE ? true : false; 34 | 35 | if(bResolved){ 36 | struct sockaddr_in* remoteAddr; 37 | for(int i = 0; i < CFArrayGetCount(addresses); i++){ 38 | CFDataRef saData = (CFDataRef)CFArrayGetValueAtIndex(addresses, i); 39 | remoteAddr = (struct sockaddr_in*)CFDataGetBytePtr(saData); 40 | if(remoteAddr != NULL){ 41 | char ip[16]; 42 | strcpy(ip, inet_ntoa(remoteAddr->sin_addr)); 43 | NSString * ipStr = [NSString stringWithCString:ip encoding:NSUTF8StringEncoding]; 44 | [ipsArr addObject:ipStr]; 45 | } 46 | } 47 | } 48 | if(ipsArr.count){ 49 | return ipsArr[0]; 50 | }else{ 51 | return nil; 52 | } 53 | } 54 | +(NSString *)getIPArrFromDnsPodWithUrlStr:(NSString *)urlStr{ 55 | urlStr = [[urlStr stringByReplacingOccurrencesOfString:@"http://" withString:@""]stringByReplacingOccurrencesOfString:@"https://" withString:@""]; 56 | NSString *dnsUrl = [NSString stringWithFormat:@"http://119.29.29.29/d?ttl=1&dn=%@",urlStr]; 57 | NSMutableURLRequest * dnsRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:dnsUrl] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:10]; 58 | NSData *data = [NSURLConnection sendSynchronousRequest:dnsRequest returningResponse:nil error:nil]; 59 | return [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; 60 | } 61 | @end 62 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/HookAppDylib.m: -------------------------------------------------------------------------------- 1 | // weibo: http://weibo.com/xiaoqing28 2 | // blog: http://www.alonemonkey.com 3 | // 4 | // HookAppDylib.m 5 | // HookAppDylib 6 | // 7 | // Created by 李兆祥 on 2022/1/21. 8 | // Copyright (c) 2022 ___ORGANIZATIONNAME___. All rights reserved. 9 | // 10 | 11 | #import "HookAppDylib.h" 12 | #import 13 | #import 14 | #import 15 | #import 16 | 17 | CHConstructor{ 18 | printf(INSERT_SUCCESS_WELCOME); 19 | 20 | [[NSNotificationCenter defaultCenter] addObserverForName:UIApplicationDidFinishLaunchingNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification * _Nonnull note) { 21 | 22 | #ifndef __OPTIMIZE__ 23 | CYListenServer(6666); 24 | 25 | MDCycriptManager* manager = [MDCycriptManager sharedInstance]; 26 | [manager loadCycript:NO]; 27 | 28 | NSError* error; 29 | NSString* result = [manager evaluateCycript:@"UIApp" error:&error]; 30 | NSLog(@"result: %@", result); 31 | if(error.code != 0){ 32 | NSLog(@"error: %@", error.localizedDescription); 33 | } 34 | #endif 35 | 36 | }]; 37 | } 38 | 39 | 40 | CHDeclareClass(CustomViewController) 41 | 42 | #pragma clang diagnostic push 43 | #pragma clang diagnostic ignored "-Wstrict-prototypes" 44 | 45 | //add new method 46 | CHDeclareMethod1(void, CustomViewController, newMethod, NSString*, output){ 47 | NSLog(@"This is a new method : %@", output); 48 | } 49 | 50 | #pragma clang diagnostic pop 51 | 52 | CHOptimizedClassMethod0(self, void, CustomViewController, classMethod){ 53 | NSLog(@"hook class method"); 54 | CHSuper0(CustomViewController, classMethod); 55 | } 56 | 57 | CHOptimizedMethod0(self, NSString*, CustomViewController, getMyName){ 58 | //get origin value 59 | NSString* originName = CHSuper(0, CustomViewController, getMyName); 60 | 61 | NSLog(@"origin name is:%@",originName); 62 | 63 | //get property 64 | NSString* password = CHIvar(self,_password,__strong NSString*); 65 | 66 | NSLog(@"password is %@",password); 67 | 68 | [self newMethod:@"output"]; 69 | 70 | //set new property 71 | self.newProperty = @"newProperty"; 72 | 73 | NSLog(@"newProperty : %@", self.newProperty); 74 | 75 | //change the value 76 | return @"李兆祥"; 77 | 78 | } 79 | 80 | //add new property 81 | CHPropertyRetainNonatomic(CustomViewController, NSString*, newProperty, setNewProperty); 82 | 83 | CHConstructor{ 84 | CHLoadLateClass(CustomViewController); 85 | CHClassHook0(CustomViewController, getMyName); 86 | CHClassHook0(CustomViewController, classMethod); 87 | 88 | CHHook0(CustomViewController, newProperty); 89 | CHHook1(CustomViewController, setNewProperty); 90 | } 91 | 92 | -------------------------------------------------------------------------------- /HookApp/HookApp/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 20G165 7 | CFBundleDevelopmentRegion 8 | en 9 | CFBundleExecutable 10 | TargetApp 11 | CFBundleIconFiles 12 | 13 | HookApp/icon.png 14 | 15 | CFBundleIdentifier 16 | cn.zxlee.HookApp 17 | CFBundleInfoDictionaryVersion 18 | 6.0 19 | CFBundleName 20 | TargetApp 21 | CFBundlePackageType 22 | APPL 23 | CFBundleShortVersionString 24 | 1.0 25 | CFBundleSupportedPlatforms 26 | 27 | iPhoneOS 28 | 29 | CFBundleVersion 30 | 1 31 | DTAppStoreToolsBuild 32 | 13A233 33 | DTCompiler 34 | com.apple.compilers.llvm.clang.1_0 35 | DTPlatformBuild 36 | 19A339 37 | DTPlatformName 38 | iphoneos 39 | DTPlatformVersion 40 | 15.0 41 | DTSDKBuild 42 | 19A339 43 | DTSDKName 44 | iphoneos15.0 45 | DTXcode 46 | 1300 47 | DTXcodeBuild 48 | 13A233 49 | LSRequiresIPhoneOS 50 | 51 | MinimumOSVersion 52 | 15.0 53 | NSAppTransportSecurity 54 | 55 | NSAllowsArbitraryLoads 56 | 57 | 58 | UIApplicationSceneManifest 59 | 60 | UIApplicationSupportsMultipleScenes 61 | 62 | 63 | UIApplicationSupportsIndirectInputEvents 64 | 65 | UIDeviceFamily 66 | 67 | 1 68 | 2 69 | 70 | UILaunchStoryboardName 71 | LaunchScreen 72 | UIRequiredDeviceCapabilities 73 | 74 | arm64 75 | 76 | UISupportedInterfaceOrientations~ipad 77 | 78 | UIInterfaceOrientationPortrait 79 | UIInterfaceOrientationPortraitUpsideDown 80 | UIInterfaceOrientationLandscapeLeft 81 | UIInterfaceOrientationLandscapeRight 82 | 83 | UISupportedInterfaceOrientations~iphone 84 | 85 | UIInterfaceOrientationPortrait 86 | UIInterfaceOrientationLandscapeLeft 87 | UIInterfaceOrientationLandscapeRight 88 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/MethodLog/BaseClass/ZXHookClassMethod.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZXHoolClassMethod.m 3 | // ZXHookUtilDemoDylib 4 | // 5 | // Created by 李兆祥 on 2019/2/16. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import "ZXHookClassMethod.h" 10 | #import "ZXMethodLog.h" 11 | @interface ZXHookClassMethod() 12 | @property(nonatomic, assign)Method method; 13 | @end 14 | @implementation ZXHookClassMethod 15 | -(instancetype)initWithMethod:(Method)method{ 16 | if(self = [super init]){ 17 | self.method = method; 18 | [self setValue:[self getMethodName] forKey:@"methodName"]; 19 | [self setValue:[self getMethodReturnType] forKey:@"methodReturnType"]; 20 | } 21 | return self; 22 | } 23 | -(void)setMethodType:(ZXMethodType)methodType{ 24 | _methodType = methodType; 25 | [self setValue:[self getMethodDescription] forKey:@"methodDescription"]; 26 | } 27 | -(NSString *)getMethodName{ 28 | SEL selector = method_getName(self.method); 29 | return NSStringFromSelector(selector); 30 | } 31 | -(NSString *)getMethodReturnType{ 32 | const char *returnTypeChar = method_copyReturnType(self.method); 33 | NSString *returnType = [NSString stringWithUTF8String: returnTypeChar]; 34 | return [ZXMethodLog getTypeWithOrgType:returnType]; 35 | } 36 | -(NSString *)getMethodDescription{ 37 | NSArray *arsgArr = [self getMethodArgTypes]; 38 | NSString *prefix = self.methodType == ZXMethodTypeInstance ? @"-" : @"+"; 39 | NSString *methonDescription = [NSString stringWithFormat:@"%@%@",prefix,self.methodReturnType]; 40 | NSArray *sepArr = [self.methodName componentsSeparatedByString:@":"]; 41 | NSString *argsStr = @""; 42 | for (int i = 0; i < arsgArr.count; i++) { 43 | NSString *arg = [NSString stringWithFormat:@"%@ arg%i ",arsgArr[i],i + 1]; 44 | NSString *argPrefix = i 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Category/NSString+ZXHookRegular.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+ZXHookRegular.m 3 | // 4 | // 5 | // Created by 李兆祥 on 2019/2/16. 6 | // 7 | 8 | #import "NSString+ZXHookRegular.h" 9 | 10 | @implementation NSString (ZXHookRegular) 11 | -(NSString *)regularWithPattern:(NSString *)pattern{ 12 | NSError *error; 13 | NSRegularExpression *regex = [NSRegularExpression 14 | regularExpressionWithPattern:pattern 15 | options:0 16 | error:&error]; 17 | if (!error) { 18 | NSTextCheckingResult *match = [regex firstMatchInString:self 19 | options:0 20 | range:NSMakeRange(0, [self length])]; 21 | 22 | return match ? [self substringWithRange:match.range] : nil; 23 | 24 | } else { 25 | return nil; 26 | } 27 | } 28 | -(NSArray *)regularsWithPattern:(NSString *)pattern{ 29 | NSString *regex = pattern; 30 | NSError *error; 31 | NSRegularExpression *regular = [NSRegularExpression regularExpressionWithPattern:regex 32 | options:NSRegularExpressionCaseInsensitive 33 | error:&error]; 34 | NSArray *matches = [regular matchesInString:self 35 | options:0 36 | range:NSMakeRange(0, self.length)]; 37 | NSMutableArray *resultMuArr = [NSMutableArray array]; 38 | for (NSTextCheckingResult *match in matches) { 39 | NSRange range = [match range]; 40 | NSString *mStr = [self substringWithRange:range]; 41 | [resultMuArr addObject:mStr]; 42 | } 43 | return resultMuArr; 44 | } 45 | -(NSString *)matchStrWithPre:(NSString *)pre sub:(NSString *)sub{ 46 | return [[self regularWithPattern:[NSString stringWithFormat:@"%@.*?%@",pre,sub]] removeAllElements:@[pre,sub]]; 47 | } 48 | -(NSArray *)matchsStrWithPre:(NSString *)pre sub:(NSString *)sub{ 49 | NSArray *arr = [self regularsWithPattern:[NSString stringWithFormat:@"%@.*?%@",pre,sub]]; 50 | NSMutableArray *muArr = [NSMutableArray array]; 51 | for (NSString *matStr in arr) { 52 | [muArr addObject:[matStr removeAllElements:@[pre,sub]]]; 53 | } 54 | return muArr; 55 | } 56 | -(NSString *)removeAllElement:(NSString *)element{ 57 | return [self stringByReplacingOccurrencesOfString:element withString:@""]; 58 | } 59 | -(NSString *)removeAllElements:(NSArray *)elements{ 60 | NSString *resultStr = self; 61 | for (NSString *removeStr in elements) { 62 | resultStr = [resultStr removeAllElement:removeStr]; 63 | } 64 | return resultStr; 65 | } 66 | -(NSString *)upperFirstCharacter{ 67 | if(self && self.length > 0) { 68 | return[self stringByReplacingCharactersInRange:NSMakeRange(0,1) withString:[[self substringToIndex:1] capitalizedString]]; 69 | } 70 | return self; 71 | } 72 | @end 73 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Trace/OCMethodTrace.h: -------------------------------------------------------------------------------- 1 | /* 2 | * OCMethodTrace.h 3 | * OCMethodTrace 4 | * 5 | * https://github.com/omxcodec/OCMethodTrace.git 6 | * 7 | * Copyright (C) 2018 Michael Chen 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | #import 23 | 24 | // 方法跟踪条件block 25 | // @param sel 方法名 26 | typedef BOOL (^OMTConditionBlock)(SEL sel); 27 | 28 | // 方法调用前会调用该block 29 | // @param target 跟踪目标对象 30 | // @param cls 调用方法所在的类(可以是target所在的类,也可以是target的父类) 31 | // @param sel 方法名 32 | // @param args 参数列表 33 | // @param deep 调用层次 34 | typedef void (^OMTBeforeBlock)(id target, Class cls, SEL sel, NSArray *args, int deep); 35 | 36 | // 方法调用后会调用该block 37 | // @param target 跟踪目标对象 38 | // @param cls 调用方法所在的类(可以是target所在的类,也可以是target的父类) 39 | // @param sel 方法名 40 | // @param ret 返回值 41 | // @param deep 调用层次 42 | // @param interval 执行方法的ms耗时 43 | typedef void (^OMTAfterBlock)(id target, Class cls, SEL sel, id ret, int deep, NSTimeInterval interval); 44 | 45 | // target位置 46 | typedef NS_ENUM(NSUInteger, OMTTargetPosition) { 47 | OMTTargetPositionBeforeSelf = 0, // before-调用者self 48 | OMTTargetPositionBeforeArgument, // before-参数 49 | OMTTargetPositionAfterSelf, // after-调用者self 50 | OMTTargetPositionAfterReturnValue, // after-返回值 51 | OMTTargetPositionMax, 52 | }; 53 | 54 | // 日志级别 55 | typedef NS_ENUM(NSUInteger, OMTLogLevel) { 56 | OMTLogLevelError = 0, 57 | OMTLogLevelDebug, 58 | OMTLogLevelMax, 59 | }; 60 | 61 | @protocol OCMethodTraceDelegate 62 | 63 | @optional 64 | // 获取target的description回调 65 | - (NSString *)descriptionWithTarget:(id)target class:(Class)cls selector:(SEL)sel targetPosition:(OMTTargetPosition)targetPosition; 66 | // 日志回调 67 | - (void)log:(OMTLogLevel)level format:(NSString *)format, ... NS_FORMAT_FUNCTION(2,3); 68 | 69 | @end 70 | 71 | @interface OCMethodTrace : NSObject 72 | 73 | @property (nonatomic, assign) BOOL disableTrace; // 屏蔽before和after调用,hook完成后默认打开 74 | @property (nonatomic, weak) id delegate; // 回调 75 | @property (nonatomic, assign) OMTLogLevel logLevel; // 日志级别,默认OMTLogLevelDebug 76 | 77 | + (OCMethodTrace *)sharedInstance; 78 | 79 | // 跟踪打印目标(实例或类)方法调用 80 | // @param cls 跟踪打印目标类 81 | // @param condition 判断是否跟踪方法的block 82 | // @param before 被跟踪的方法调用前会调用该block 83 | // @param after 被跟踪的方法调用后会调用该block 84 | - (void)traceMethodWithClass:(Class)cls 85 | condition:(OMTConditionBlock)condition 86 | before:(OMTBeforeBlock)before 87 | after:(OMTAfterBlock)after; 88 | 89 | @end 90 | -------------------------------------------------------------------------------- /Headers/CSToastStyle.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @class UIColor, UIFont; 10 | 11 | @interface CSToastStyle : NSObject 12 | { 13 | _Bool _displayShadow; 14 | UIColor *_backgroundColor; 15 | UIColor *_titleColor; 16 | UIColor *_messageColor; 17 | double _maxWidthPercentage; 18 | double _maxHeightPercentage; 19 | double _horizontalPadding; 20 | double _verticalPadding; 21 | double _cornerRadius; 22 | UIFont *_titleFont; 23 | UIFont *_messageFont; 24 | long long _titleAlignment; 25 | long long _messageAlignment; 26 | long long _titleNumberOfLines; 27 | long long _messageNumberOfLines; 28 | UIColor *_shadowColor; 29 | double _shadowOpacity; 30 | double _shadowRadius; 31 | double _fadeDuration; 32 | struct CGSize _shadowOffset; 33 | struct CGSize _imageSize; 34 | struct CGSize _activitySize; 35 | } 36 | 37 | - (void).cxx_destruct; 38 | @property(nonatomic) double fadeDuration; // @synthesize fadeDuration=_fadeDuration; 39 | @property(nonatomic) struct CGSize activitySize; // @synthesize activitySize=_activitySize; 40 | @property(nonatomic) struct CGSize imageSize; // @synthesize imageSize=_imageSize; 41 | @property(nonatomic) struct CGSize shadowOffset; // @synthesize shadowOffset=_shadowOffset; 42 | @property(nonatomic) double shadowRadius; // @synthesize shadowRadius=_shadowRadius; 43 | @property(nonatomic) double shadowOpacity; // @synthesize shadowOpacity=_shadowOpacity; 44 | @property(retain, nonatomic) UIColor *shadowColor; // @synthesize shadowColor=_shadowColor; 45 | @property(nonatomic) _Bool displayShadow; // @synthesize displayShadow=_displayShadow; 46 | @property(nonatomic) long long messageNumberOfLines; // @synthesize messageNumberOfLines=_messageNumberOfLines; 47 | @property(nonatomic) long long titleNumberOfLines; // @synthesize titleNumberOfLines=_titleNumberOfLines; 48 | @property(nonatomic) long long messageAlignment; // @synthesize messageAlignment=_messageAlignment; 49 | @property(nonatomic) long long titleAlignment; // @synthesize titleAlignment=_titleAlignment; 50 | @property(retain, nonatomic) UIFont *messageFont; // @synthesize messageFont=_messageFont; 51 | @property(retain, nonatomic) UIFont *titleFont; // @synthesize titleFont=_titleFont; 52 | @property(nonatomic) double cornerRadius; // @synthesize cornerRadius=_cornerRadius; 53 | @property(nonatomic) double verticalPadding; // @synthesize verticalPadding=_verticalPadding; 54 | @property(nonatomic) double horizontalPadding; // @synthesize horizontalPadding=_horizontalPadding; 55 | @property(nonatomic) double maxHeightPercentage; // @synthesize maxHeightPercentage=_maxHeightPercentage; 56 | @property(nonatomic) double maxWidthPercentage; // @synthesize maxWidthPercentage=_maxWidthPercentage; 57 | @property(retain, nonatomic) UIColor *messageColor; // @synthesize messageColor=_messageColor; 58 | @property(retain, nonatomic) UIColor *titleColor; // @synthesize titleColor=_titleColor; 59 | @property(retain, nonatomic) UIColor *backgroundColor; // @synthesize backgroundColor=_backgroundColor; 60 | - (id)init; 61 | - (id)initWithDefaultStyle; 62 | 63 | @end 64 | 65 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/fishhook/fishhook.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013, Facebook, Inc. 2 | // All rights reserved. 3 | // Redistribution and use in source and binary forms, with or without 4 | // modification, are permitted provided that the following conditions are met: 5 | // * Redistributions of source code must retain the above copyright notice, 6 | // this list of conditions and the following disclaimer. 7 | // * Redistributions in binary form must reproduce the above copyright notice, 8 | // this list of conditions and the following disclaimer in the documentation 9 | // and/or other materials provided with the distribution. 10 | // * Neither the name Facebook nor the names of its contributors may be used to 11 | // endorse or promote products derived from this software without specific 12 | // prior written permission. 13 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 16 | // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 17 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 | // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 19 | // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 20 | // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 21 | // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 22 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 | 24 | #ifndef fishhook_h 25 | #define fishhook_h 26 | 27 | #include 28 | #include 29 | 30 | #if !defined(FISHHOOK_EXPORT) 31 | #define FISHHOOK_VISIBILITY __attribute__((visibility("hidden"))) 32 | #else 33 | #define FISHHOOK_VISIBILITY __attribute__((visibility("default"))) 34 | #endif 35 | 36 | #ifdef __cplusplus 37 | extern "C" { 38 | #endif //__cplusplus 39 | 40 | /* 41 | * A structure representing a particular intended rebinding from a symbol 42 | * name to its replacement 43 | */ 44 | struct rebinding { 45 | const char *name; 46 | void *replacement; 47 | void **replaced; 48 | }; 49 | 50 | /* 51 | * For each rebinding in rebindings, rebinds references to external, indirect 52 | * symbols with the specified name to instead point at replacement for each 53 | * image in the calling process as well as for all future images that are loaded 54 | * by the process. If rebind_functions is called more than once, the symbols to 55 | * rebind are added to the existing list of rebindings, and if a given symbol 56 | * is rebound more than once, the later rebinding will take precedence. 57 | */ 58 | FISHHOOK_VISIBILITY 59 | int rebind_symbols(struct rebinding rebindings[], size_t rebindings_nel); 60 | 61 | /* 62 | * Rebinds as above, but only in the specified image. The header should point 63 | * to the mach-o header, the slide should be the slide offset. Others as above. 64 | */ 65 | FISHHOOK_VISIBILITY 66 | int rebind_symbols_image(void *header, 67 | intptr_t slide, 68 | struct rebinding rebindings[], 69 | size_t rebindings_nel); 70 | 71 | #ifdef __cplusplus 72 | } 73 | #endif //__cplusplus 74 | 75 | #endif //fishhook_h 76 | 77 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Config/MDConfigManager.h: -------------------------------------------------------------------------------- 1 | // weibo: http://weibo.com/xiaoqing28 2 | // blog: http://www.alonemonkey.com 3 | // 4 | // MDConfigManager.h 5 | // MonkeyDev 6 | // 7 | // Created by AloneMonkey on 2018/4/24. 8 | // Copyright © 2018年 AloneMonkey. All rights reserved. 9 | // 10 | 11 | #import 12 | 13 | #define MDCONFIG_CYCRIPT_KEY @"Cycript" 14 | #define MDCONFIG_LOADATLAUNCH_KEY @"LoadAtLaunch" 15 | 16 | #define MDCONFIG_TRACE_KEY @"MethodTrace" 17 | #define MDCONFIG_LOG_LEVEL_KEY @"LogLevel" 18 | #define MDCONFIG_LOG_WHEN_KEY @"LogWhen" 19 | #define MDCONFIG_LOG_REGEX_STRING_KEY @"LogRegexString" // 仅LogWhen=MDTraceLogWhenRegexString有效 20 | #define MDCONFIG_TRACE_FLAG_KEY @"TraceFlag" 21 | #define MDCONFIG_TRACE_OBJECT_KEY @"TraceObject" 22 | #define MDCONFIG_CLASS_REGEX_STRING_KEY @"ClassRegexString" // 仅TraceObject=MDTraceObjectRegexClass有效 23 | #define MDCONFIG_CORE_CLASS_LIST @"CORE_CLASS_LIST" 24 | #define MDCONFIG_USER_CLASS_LIST @"USER_CLASS_LIST" 25 | #define MDCONFIG_TRACE_MODE_KEY @"TraceMode" 26 | #define MDCONFIG_METHOD_WHITE_LIST_KEY @"MethodWhiteList" 27 | #define MDCONFIG_METHOD_BLACK_LIST_KEY @"MethodBlackList" 28 | 29 | // Trace日志级别 30 | typedef NS_ENUM(NSUInteger, MDTraceLogLevel) { 31 | MDTraceLogLeveError = 0, // 错误 32 | MDTraceLogLeveDebug = 1, // 调试 33 | MDTraceLogLeveMax 34 | }; 35 | 36 | // Trace日志输出时机 37 | typedef NS_ENUM(NSUInteger, MDTraceLogWhen) { 38 | MDTraceLogWhenStartup = 0, // 启动即输出日志 39 | MDTraceLogWhenVolume = 1, // 根据音量键控制输出日志(增加音量:输出日志;降低音量:关闭日志;默认时关闭日志) 40 | MDTraceLogWhenRegexString = 2, // 日志包含指定正则字符串才输出日志 41 | MDTraceLogWhenMax 42 | }; 43 | 44 | // Trace控制位(尽量在该处扩展) 45 | typedef NS_OPTIONS(NSUInteger, MDTraceFlag) { 46 | MDTraceFlagDoesNotUseDescription = 1 << 0, // 跳过调用对象description方法,避免不正规的description实现导致递归 47 | MDTraceFlagDumpClassListInfo = 1 << 1, // 打印类列表信息,便于调试 48 | MDTraceFlagDumpClassMethod = 1 << 2, // 打印某个类的方法(不包括父类方法),便于调试 49 | MDTraceFlagDumpSuperClassMethod = 1 << 3, // 打印某个类的父类方法(包括递归父类的方法),便于调试 50 | MDTraceFlagMask = 0xF, 51 | 52 | MDTraceFlagDefault = 0, 53 | }; 54 | 55 | // Trace对象 56 | typedef NS_ENUM(NSUInteger, MDTraceObject) { 57 | // 屏蔽trace所有类 58 | MDTraceObjectNone = 0, 59 | // trace引擎指定类的方法(仅测试验证使用),仅需要考虑CORE_CLASS_LIST 60 | MDTraceObjectCoreClass = 1, 61 | // trace用户指定类的方法,需要考虑USER_CLASS_LIST + "USER_CLASS_LIST和CORE_CLASS_LIST交集" 62 | MDTraceObjectUserClass = 2, 63 | // trace用户指定类 + 正则匹配类的方法,需要考虑USER_CLASS_LIST + "USER_CLASS_LIST和CORE_CLASS_LIST交集" + 64 | // "匹配ClassRegexString的CLASS_LIST和CORE_CLASS_LIST交集" 65 | MDTraceObjectRegexClass = 3, 66 | 67 | MDTraceObjectMax 68 | }; 69 | 70 | // Trace模式 71 | typedef NS_ENUM(NSUInteger, MDTraceMode) { 72 | MDTraceModeOff = 0, // 屏蔽trace方法 73 | MDTraceModeAll = 1, // trace所有方法 74 | MDTraceModeIncludeWhiteList = 2, // trace包含"白名单方法列表"的方法 75 | MDTraceModeExcludeBlackList = 3, // trace排除"黑名单方法列表"的方法 76 | MDTraceModeMax 77 | }; 78 | 79 | @interface MDConfigManager : NSObject 80 | 81 | + (instancetype)sharedInstance; 82 | 83 | - (NSDictionary*)readConfigByKey:(NSString*) key; 84 | 85 | @end 86 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXRequestBlock/ZXURLProtocol.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZXURLProtocol.m 3 | // ZXRequestBlockDemo 4 | // 5 | // Created by 李兆祥 on 2018/8/26. 6 | // Copyright © 2018年 李兆祥. All rights reserved. 7 | // 8 | 9 | #import "ZXURLProtocol.h" 10 | #define protocolKey @"SessionProtocolKey" 11 | @interface ZXURLProtocol() 12 | @property (nonatomic, strong) NSURLSession * session; 13 | @end 14 | @implementation ZXURLProtocol 15 | +(instancetype)sharedInstance { 16 | static ZXURLProtocol *sharedInstance = nil; 17 | static dispatch_once_t onceToken; 18 | dispatch_once(&onceToken, ^{ 19 | if (!sharedInstance){ 20 | sharedInstance = [[self alloc] init]; 21 | } 22 | }); 23 | return sharedInstance; 24 | } 25 | +(BOOL)canInitWithRequest:(NSURLRequest *)request{ 26 | 27 | if ([NSURLProtocol propertyForKey:protocolKey inRequest:request]) { 28 | return NO; 29 | } 30 | NSString * url = request.URL.absoluteString; 31 | return [self isUrl:url]; 32 | } 33 | +(NSURLRequest *)canonicalRequestForRequest:(NSURLRequest *)request { 34 | return [[ZXURLProtocol sharedInstance] requestBlockForRequst:request]; 35 | } 36 | -(NSURLRequest *)requestBlockForRequst:(NSURLRequest *)request{ 37 | if(self.requestBlock){ 38 | return self.requestBlock(request); 39 | }else{ 40 | return request; 41 | } 42 | } 43 | -(void)startLoading{ 44 | NSMutableURLRequest * request = [self.request mutableCopy]; 45 | [NSURLProtocol setProperty:@(YES) forKey:protocolKey inRequest:request]; 46 | NSURLSessionConfiguration * config = [NSURLSessionConfiguration defaultSessionConfiguration]; 47 | self.session = [NSURLSession sessionWithConfiguration:config delegate:self delegateQueue:[NSOperationQueue mainQueue]]; 48 | NSURLSessionDataTask * task = [self.session dataTaskWithRequest:request]; 49 | [task resume]; 50 | } 51 | 52 | -(void)stopLoading { 53 | [self.session invalidateAndCancel]; 54 | self.session = nil; 55 | } 56 | 57 | #pragma mark - NSURLSessionDataDelegate 58 | -(void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didCompleteWithError:(NSError *)error{ 59 | if (error) { 60 | [self.client URLProtocol:self didFailWithError:error]; 61 | } else { 62 | [self.client URLProtocolDidFinishLoading:self]; 63 | } 64 | } 65 | 66 | -(void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)dataTask didReceiveResponse:(NSURLResponse *)response completionHandler:(void (^)(NSURLSessionResponseDisposition))completionHandler{ 67 | [self.client URLProtocol:self didReceiveResponse:response cacheStoragePolicy:NSURLCacheStorageNotAllowed]; 68 | completionHandler(NSURLSessionResponseAllow); 69 | } 70 | 71 | -(void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)dataTask didReceiveData:(NSData *)data{ 72 | [self.client URLProtocol:self didLoadData:data]; 73 | } 74 | 75 | - (void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)dataTask 76 | willCacheResponse:(NSCachedURLResponse *)proposedResponse 77 | completionHandler:(void (^)(NSCachedURLResponse *cachedResponse))completionHandler{ 78 | completionHandler(proposedResponse); 79 | } 80 | +(BOOL)isUrl:(NSString *)url{ 81 | NSString *regex =@"[a-zA-z]+://[^\\s]*"; 82 | NSPredicate *urlTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",regex]; 83 | return [urlTest evaluateWithObject:url]; 84 | } 85 | @end 86 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/HttpRequest/ZXHttpRequest.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZXHttpRequest.m 3 | // ZXHookUtilDemoDylib 4 | // 5 | // Created by 李兆祥 on 2019/3/10. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import "ZXHttpRequest.h" 10 | #define TimeOutSec 10 11 | #define kMainUrl @"http://www.baidu.com" 12 | @implementation ZXHttpRequest 13 | #pragma mark POST请求 14 | +(void)postInterface:(NSString *)interface postData:(id)postData callBack:(kGetDataEventHandler)_result{ 15 | [self baseInterface:interface postData:postData callBack:_result]; 16 | } 17 | +(void)postUrl:(NSString *)urlStr postData:(id)postData callBack:(kGetDataEventHandler)_result{ 18 | [self baseUrl:urlStr postData:postData callBack:_result]; 19 | } 20 | #pragma mark GET请求 21 | +(void)getInterface:(NSString *)interface callBack:(kGetDataEventHandler)_result{ 22 | [self baseInterface:interface postData:nil callBack:_result]; 23 | } 24 | +(void)getUrl:(NSString *)urlStr callBack:(kGetDataEventHandler)_result{ 25 | [self baseUrl:urlStr postData:nil callBack:_result]; 26 | } 27 | #pragma mark - private 28 | +(void)baseInterface:(NSString *)interface postData:(id)postData callBack:(kGetDataEventHandler)_result{ 29 | [self baseUrl:[NSString stringWithFormat:@"%@/%@",kMainUrl,interface] postData:postData callBack:_result]; 30 | } 31 | +(void)baseUrl:(NSString *)urlStr postData:(id)postData callBack:(kGetDataEventHandler)_result{ 32 | NSURL *url = [NSURL URLWithString:urlStr]; 33 | NSMutableURLRequest *mr = [NSMutableURLRequest requestWithURL:url]; 34 | if(postData){ 35 | mr.HTTPMethod = @"POST"; 36 | if([postData isKindOfClass:[NSDictionary class]]){ 37 | mr.HTTPBody = [[self getJsonStrWithDic:postData] dataUsingEncoding:NSUTF8StringEncoding]; 38 | }else{ 39 | mr.HTTPBody = [postData dataUsingEncoding:NSUTF8StringEncoding]; 40 | } 41 | [mr setValue:@"application/json" forHTTPHeaderField:@"Content-Type"]; 42 | }else{ 43 | mr.HTTPMethod = @"GET"; 44 | } 45 | mr.timeoutInterval = TimeOutSec; 46 | [NSURLConnection sendAsynchronousRequest:mr queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse * _Nullable response, NSData * _Nullable data, NSError * _Nullable connectionError) { 47 | 48 | if (connectionError) { 49 | _result(NO,connectionError); 50 | }else{ 51 | NSString *dataStr = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; 52 | NSData *reData = [dataStr dataUsingEncoding:NSUTF8StringEncoding]; 53 | _result(YES,[NSJSONSerialization JSONObjectWithData:reData options:NSJSONReadingMutableLeaves error:nil]); 54 | } 55 | }]; 56 | } 57 | #pragma mark 字典转json 58 | +(NSString *)getJsonStrWithDic:(NSDictionary *)dic{ 59 | NSError *error; 60 | NSData *jsonData = [NSJSONSerialization dataWithJSONObject:dic options:NSJSONWritingPrettyPrinted error:&error]; 61 | NSString *jsonString; 62 | if (!jsonData) { 63 | NSLog(@"%@",error); 64 | }else{ 65 | jsonString = [[NSString alloc]initWithData:jsonData encoding:NSUTF8StringEncoding]; 66 | } 67 | NSMutableString *mutStr = [NSMutableString stringWithString:jsonString]; 68 | NSRange range = {0,jsonString.length}; 69 | [mutStr replaceOccurrencesOfString:@" " withString:@"" options:NSLiteralSearch range:range]; 70 | NSRange range2 = {0,mutStr.length}; 71 | [mutStr replaceOccurrencesOfString:@"\n" withString:@"" options:NSLiteralSearch range:range2]; 72 | return mutStr; 73 | } 74 | @end 75 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXBlockLog/ZXBlockLogTool.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZXBlockLogTool.m 3 | // ZXBlockLogDemo 4 | // 5 | // Created by 李兆祥 on 2019/5/20. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import "ZXBlockLogTool.h" 10 | #import 11 | @implementation ZXBlockLogTool 12 | + (NSString *)getDecWithType:(const char *)type{ 13 | NSDictionary *typeMapperDic = [self getTypeMapperDic]; 14 | NSString *typeStr = [NSString stringWithUTF8String:type]; 15 | 16 | if([typeMapperDic.allKeys containsObject:typeStr]){ 17 | return typeMapperDic[typeStr]; 18 | } 19 | NSRange typeRange = [typeStr rangeOfString:@"\".*?\"" options:NSRegularExpressionSearch]; 20 | if(typeRange.location == NSNotFound){ 21 | if([typeStr hasPrefix:@"T@"]){ 22 | return @"id"; 23 | }else{ 24 | return [NSString stringWithFormat:@"[变量类型识别失败,原类型为]%@",typeStr]; 25 | } 26 | 27 | } 28 | NSString *resTypeStr = [typeStr substringWithRange:typeRange]; 29 | resTypeStr = [[resTypeStr stringByReplacingOccurrencesOfString:@"\"" withString:@""]stringByAppendingString:@" *"]; 30 | return resTypeStr ; 31 | } 32 | 33 | + (NSDictionary *)getTypeMapperDic{ 34 | static NSDictionary *typeMapperDic = nil; 35 | static dispatch_once_t onceToken; 36 | dispatch_once(&onceToken, ^{ 37 | typeMapperDic = @{[NSString stringWithUTF8String:@encode(char)] : @"char", 38 | [NSString stringWithUTF8String:@encode(int)] : @"int", 39 | [NSString stringWithUTF8String:@encode(short)] : @"short", 40 | [NSString stringWithUTF8String:@encode(long)] : @"long", 41 | [NSString stringWithUTF8String:@encode(long long)] : @"long long", 42 | [NSString stringWithUTF8String:@encode(unsigned char)] : @"unsigned char", 43 | [NSString stringWithUTF8String:@encode(unsigned int)] : @"unsigned int", 44 | [NSString stringWithUTF8String:@encode(unsigned short)] : @"unsigned short", 45 | [NSString stringWithUTF8String:@encode(unsigned long)] : @"unsigned long", 46 | [NSString stringWithUTF8String:@encode(unsigned long long)] : @"unsigned long long", 47 | [NSString stringWithUTF8String:@encode(float)] : @"float", 48 | [NSString stringWithUTF8String:@encode(double)] : @"double", 49 | [NSString stringWithUTF8String:@encode(BOOL)] : @"BOOL", 50 | [NSString stringWithUTF8String:@encode(void)] : @"void", 51 | [NSString stringWithUTF8String:@encode(char *)] : @"char *", 52 | [NSString stringWithUTF8String:@encode(id)] : @"id", 53 | [NSString stringWithUTF8String:@encode(Class)] : @"Class", 54 | [NSString stringWithUTF8String:@encode(SEL)] : @"SEL", 55 | [NSString stringWithUTF8String:@encode(CGRect)] : @"CGRect", 56 | [NSString stringWithUTF8String:@encode(CGPoint)] : @"CGPoint", 57 | [NSString stringWithUTF8String:@encode(CGSize)] : @"CGSize", 58 | [NSString stringWithUTF8String:@encode(CGVector)] : @"CGVector", 59 | [NSString stringWithUTF8String:@encode(CGAffineTransform)] : @"CGAffineTransform", 60 | [NSString stringWithUTF8String:@encode(UIOffset)] : @"UIOffset", 61 | [NSString stringWithUTF8String:@encode(UIEdgeInsets)] : @"UIEdgeInsets", 62 | @"@?":@"block" 63 | }; 64 | }); 65 | return typeMapperDic; 66 | } 67 | @end 68 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Trace/a1a2-selectortramps-arm64.s: -------------------------------------------------------------------------------- 1 | /* 2 | * a1a2-selectortramps-arm64.s 3 | * OCMethodTrace 4 | * 5 | * https://github.com/omxcodec/OCMethodTrace.git 6 | * 7 | * Copyright (C) 2018 Michael Chen 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | #if __arm64__ 23 | 24 | #include 25 | 26 | .text 27 | 28 | .private_extern __a1a2_selectorTrampHead 29 | .private_extern __a1a2_firstSelectorTramp 30 | .private_extern __a1a2_selectorTrampEnd 31 | 32 | msgSend: 33 | .quad 0 34 | 35 | .align PAGE_MAX_SHIFT 36 | __a1a2_selectorTrampHead: 37 | L_a1a2_selectorTrampHead: 38 | // 1. selector 39 | ldr x1, [x17] // selector -> _cmd 40 | // 2. msgSend 41 | adr x17, L_a1a2_selectorTrampHead 42 | sub x17, x17, #PAGE_MAX_SIZE 43 | ldr x16, [x17] 44 | br x16 // tail call msgSend 45 | 46 | // pad up to TrampolineSelectorPagePair header size 47 | nop 48 | nop 49 | nop 50 | 51 | .macro TrampolineEntry 52 | // load address of trampoline data (one page before this instruction) 53 | adr x17, -PAGE_MAX_SIZE 54 | b L_a1a2_selectorTrampHead 55 | .endmacro 56 | 57 | .macro TrampolineEntryX16 58 | TrampolineEntry 59 | TrampolineEntry 60 | TrampolineEntry 61 | TrampolineEntry 62 | 63 | TrampolineEntry 64 | TrampolineEntry 65 | TrampolineEntry 66 | TrampolineEntry 67 | 68 | TrampolineEntry 69 | TrampolineEntry 70 | TrampolineEntry 71 | TrampolineEntry 72 | 73 | TrampolineEntry 74 | TrampolineEntry 75 | TrampolineEntry 76 | TrampolineEntry 77 | .endmacro 78 | 79 | .macro TrampolineEntryX256 80 | TrampolineEntryX16 81 | TrampolineEntryX16 82 | TrampolineEntryX16 83 | TrampolineEntryX16 84 | 85 | TrampolineEntryX16 86 | TrampolineEntryX16 87 | TrampolineEntryX16 88 | TrampolineEntryX16 89 | 90 | TrampolineEntryX16 91 | TrampolineEntryX16 92 | TrampolineEntryX16 93 | TrampolineEntryX16 94 | 95 | TrampolineEntryX16 96 | TrampolineEntryX16 97 | TrampolineEntryX16 98 | TrampolineEntryX16 99 | .endmacro 100 | 101 | .align 3 102 | .private_extern __a1a2_firstSelectorTramp 103 | __a1a2_firstSelectorTramp: 104 | // 2048-4 trampolines to fill 16K page 105 | TrampolineEntryX256 106 | TrampolineEntryX256 107 | TrampolineEntryX256 108 | TrampolineEntryX256 109 | 110 | TrampolineEntryX256 111 | TrampolineEntryX256 112 | TrampolineEntryX256 113 | 114 | TrampolineEntryX16 115 | TrampolineEntryX16 116 | TrampolineEntryX16 117 | TrampolineEntryX16 118 | 119 | TrampolineEntryX16 120 | TrampolineEntryX16 121 | TrampolineEntryX16 122 | TrampolineEntryX16 123 | 124 | TrampolineEntryX16 125 | TrampolineEntryX16 126 | TrampolineEntryX16 127 | TrampolineEntryX16 128 | 129 | TrampolineEntryX16 130 | TrampolineEntryX16 131 | TrampolineEntryX16 132 | 133 | TrampolineEntry 134 | TrampolineEntry 135 | TrampolineEntry 136 | TrampolineEntry 137 | 138 | TrampolineEntry 139 | TrampolineEntry 140 | TrampolineEntry 141 | TrampolineEntry 142 | 143 | TrampolineEntry 144 | TrampolineEntry 145 | TrampolineEntry 146 | TrampolineEntry 147 | 148 | // TrampolineEntry 149 | // TrampolineEntry 150 | // TrampolineEntry 151 | // TrampolineEntry 152 | 153 | .private_extern __a1a2_selectorTrampEnd 154 | __a1a2_selectorTrampEnd: 155 | 156 | #endif 157 | -------------------------------------------------------------------------------- /HookApp/HookAppDylib/Logos/ZXHookUtil/Foundation/ZXDataHandle/ZXDataConvert/NSObject+ZXToJson.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+ZXToJson.m 3 | // ZXDataHandleDemo 4 | // 5 | // Created by 李兆祥 on 2019/1/28. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // GitHub:https://github.com/SmileZXLee/ZXDataHandle 8 | 9 | #import "NSObject+ZXToJson.h" 10 | #import "NSDictionary+ZXDataConvert.h" 11 | #import "NSArray+ZXDataConvert.h" 12 | #import "NSData+ZXDataConvert.h" 13 | #import "ZXDataType.h" 14 | #import "NSObject+ZXToDic.h" 15 | #import "NSDictionary+ZXSafetySet.h" 16 | #import "NSString+ZXRegular.h" 17 | @implementation NSObject (ZXToJson) 18 | -(NSString *)zx_toJsonStr{ 19 | NSString *resJsonStr = nil; 20 | if([self isKindOfClass:[NSData class]]){ 21 | return [((NSData *)self) zx_dataToJsonStr]; 22 | } 23 | DataType dataType = [ZXDataType zx_dataType:self]; 24 | if(dataType == DataTypeDic){ 25 | resJsonStr = [((NSDictionary *)self) zx_dicToJsonStr]; 26 | }else if(dataType == DataTypeArr){ 27 | NSMutableArray *dicsArr = [NSMutableArray array]; 28 | for (id subObj in (NSArray *)self) { 29 | DataType subDataType = [ZXDataType zx_dataType:subObj]; 30 | if(!(subDataType == DataTypeDic)){ 31 | id subDicObj = [subObj zx_toDic]; 32 | [dicsArr addObject:subDicObj]; 33 | }else{ 34 | [dicsArr addObject:subObj]; 35 | } 36 | } 37 | resJsonStr = [dicsArr zx_arrToJsonStr]; 38 | }else if(dataType == DataTypeStr){ 39 | resJsonStr = (NSString *)self; 40 | }else{ 41 | id resDic = [self zx_toDic]; 42 | resJsonStr = [resDic zx_dicToJsonStr]; 43 | } 44 | return resJsonStr; 45 | } 46 | 47 | -(NSString*)zx_kvStr{ 48 | id res = [self zx_toDic]; 49 | 50 | if([res isKindOfClass:[NSArray class]]){ 51 | NSString *sumStr = @""; 52 | for (NSDictionary *subDic in res) { 53 | sumStr = [sumStr stringByAppendingString:[NSString stringWithFormat:@"%@&",[self perKvStrWithDic:subDic]]]; 54 | } 55 | if(sumStr.length){ 56 | sumStr = [sumStr substringToIndex:sumStr.length - 1]; 57 | } 58 | return sumStr; 59 | } 60 | return [self perKvStrWithDic:(NSDictionary *)res]; 61 | } 62 | -(NSString *)perKvStrWithDic:(NSDictionary *)resDic{ 63 | NSArray *sortedKeys = [[resDic allKeys] sortedArrayUsingSelector: @selector(compare:)]; 64 | NSString *sumStr = @""; 65 | for (NSString *key in sortedKeys) { 66 | NSObject *value = [resDic zx_dicSafetyReadForKey:key]; 67 | if(value){ 68 | NSString *valueStr = [NSString stringWithFormat:@"%@",value]; 69 | valueStr = [valueStr removeAllElements:@[@"\r",@"\n",@"\t",@" "]]; 70 | sumStr = [sumStr stringByAppendingString:[NSString stringWithFormat:@"%@=%@&",key,valueStr]]; 71 | } 72 | } 73 | sumStr = sumStr.length ? [sumStr substringToIndex:sumStr.length - 1] : sumStr; 74 | return sumStr; 75 | } 76 | -(NSData *)zx_toJsonData{ 77 | NSData *jsonData; 78 | if([self isKindOfClass:[NSData class]]){ 79 | return (NSData *)self; 80 | } 81 | DataType dataType = [ZXDataType zx_dataType:self]; 82 | if(dataType == DataTypeDic){ 83 | jsonData = [((NSDictionary *)self) zx_dicToJSONData]; 84 | }else if(dataType == DataTypeArr){ 85 | id fObj = ((NSArray *)self).firstObject; 86 | if(fObj && [fObj isKindOfClass:[NSDictionary class]]){ 87 | jsonData = [((NSArray *)self) zx_arrToJSONData]; 88 | }else{ 89 | jsonData = [[self zx_toJsonStr]dataUsingEncoding:NSUTF8StringEncoding]; 90 | } 91 | }else if(dataType == DataTypeStr){ 92 | jsonData = [((NSString *)self) dataUsingEncoding:NSUTF8StringEncoding]; 93 | }else{ 94 | jsonData = [[self zx_toJsonStr]dataUsingEncoding:NSUTF8StringEncoding]; 95 | } 96 | return jsonData; 97 | } 98 | @end 99 | --------------------------------------------------------------------------------