Objective C之Hook所有+load方法简单示例

上传者: Forever_wj | 上传时间: 2022-04-06 15:06:14 | 文件大小: 190KB | 文件类型: ZIP
详细地实现了Hook所有+load方法的流程:动态库LoadRuler的添加、获取MachO和所有类的关键代码,以及Category的处理等

文件下载

资源详情

[{"title":"( 68 个子文件 190KB ) Objective C之Hook所有+load方法简单示例","children":[{"title":"LoadCostSample","children":[{"title":"LoadRuler","children":[{"title":"LoadRuler","children":[{"title":"LoadRuler.h <span style='color:#111;'> 555B </span>","children":null,"spread":false},{"title":"Info.plist <span style='color:#111;'> 774B </span>","children":null,"spread":false},{"title":"LoadRuler.mm <span style='color:#111;'> 5.05KB </span>","children":null,"spread":false}],"spread":true},{"title":".DS_Store <span style='color:#111;'> 6.00KB </span>","children":null,"spread":false},{"title":"LoadRuler.xcodeproj","children":[{"title":"project.xcworkspace","children":[{"title":"contents.xcworkspacedata <span style='color:#111;'> 154B </span>","children":null,"spread":false},{"title":"xcuserdata","children":[{"title":"everettjf.xcuserdatad","children":[{"title":"UserInterfaceState.xcuserstate <span style='color:#111;'> 10.14KB </span>","children":null,"spread":false}],"spread":true},{"title":"liuzhidan.xcuserdatad","children":[{"title":"UserInterfaceState.xcuserstate <span style='color:#111;'> 13.14KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"xcshareddata","children":[{"title":"IDEWorkspaceChecks.plist <span style='color:#111;'> 238B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"project.pbxproj <span style='color:#111;'> 11.69KB </span>","children":null,"spread":false},{"title":"xcuserdata","children":[{"title":"everettjf.xcuserdatad","children":[{"title":"xcschemes","children":[{"title":"xcschememanagement.plist <span style='color:#111;'> 332B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"liuzhidan.xcuserdatad","children":[{"title":"xcschemes","children":[{"title":"xcschememanagement.plist <span style='color:#111;'> 344B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"SecondDylib","children":[{"title":"SecondDylib.xcodeproj","children":[{"title":"project.xcworkspace","children":[{"title":"contents.xcworkspacedata <span style='color:#111;'> 156B </span>","children":null,"spread":false},{"title":"xcuserdata","children":[{"title":"everettjf.xcuserdatad","children":[{"title":"UserInterfaceState.xcuserstate <span style='color:#111;'> 11.22KB </span>","children":null,"spread":false}],"spread":true},{"title":"liuzhidan.xcuserdatad","children":[{"title":"UserInterfaceState.xcuserstate <span style='color:#111;'> 16.12KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"xcshareddata","children":[{"title":"IDEWorkspaceChecks.plist <span style='color:#111;'> 238B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"project.pbxproj <span style='color:#111;'> 12.57KB </span>","children":null,"spread":false},{"title":"xcuserdata","children":[{"title":"everettjf.xcuserdatad","children":[{"title":"xcschemes","children":[{"title":"xcschememanagement.plist <span style='color:#111;'> 334B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"liuzhidan.xcuserdatad","children":[{"title":"xcschemes","children":[{"title":"xcschememanagement.plist <span style='color:#111;'> 346B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"SecondDylib","children":[{"title":"SecondLoaderInSecondDylib.m <span style='color:#111;'> 310B </span>","children":null,"spread":false},{"title":"SecondLoaderInSecondDylib.h <span style='color:#111;'> 229B </span>","children":null,"spread":false},{"title":"FirstLoaderInSecondDylib.h <span style='color:#111;'> 227B </span>","children":null,"spread":false},{"title":"SecondDylib.h <span style='color:#111;'> 497B </span>","children":null,"spread":false},{"title":"Info.plist <span style='color:#111;'> 774B </span>","children":null,"spread":false},{"title":"FirstLoaderInSecondDylib.m <span style='color:#111;'> 306B </span>","children":null,"spread":false}],"spread":true},{"title":".DS_Store <span style='color:#111;'> 6.00KB </span>","children":null,"spread":false}],"spread":true},{"title":"FirstDylib","children":[{"title":"FirstDylib.xcodeproj","children":[{"title":"project.xcworkspace","children":[{"title":"contents.xcworkspacedata <span style='color:#111;'> 155B </span>","children":null,"spread":false},{"title":"xcuserdata","children":[{"title":"everettjf.xcuserdatad","children":[{"title":"UserInterfaceState.xcuserstate <span style='color:#111;'> 12.37KB </span>","children":null,"spread":false}],"spread":true},{"title":"liuzhidan.xcuserdatad","children":[{"title":"UserInterfaceState.xcuserstate <span style='color:#111;'> 17.23KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"xcshareddata","children":[{"title":"IDEWorkspaceChecks.plist <span style='color:#111;'> 238B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"project.pbxproj <span style='color:#111;'> 13.22KB </span>","children":null,"spread":false},{"title":"xcuserdata","children":[{"title":"everettjf.xcuserdatad","children":[{"title":"xcschemes","children":[{"title":"xcschememanagement.plist <span style='color:#111;'> 333B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"liuzhidan.xcuserdatad","children":[{"title":"xcschemes","children":[{"title":"xcschememanagement.plist <span style='color:#111;'> 345B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":".DS_Store <span style='color:#111;'> 6.00KB </span>","children":null,"spread":false},{"title":"FirstDylib","children":[{"title":"SecondLoaderInFirstDylib.h <span style='color:#111;'> 226B </span>","children":null,"spread":false},{"title":"FirstDylib.h <span style='color:#111;'> 489B </span>","children":null,"spread":false},{"title":"SecondLoaderInFirstDylib.m <span style='color:#111;'> 305B </span>","children":null,"spread":false},{"title":"FirstLoaderInFirstDylib.mm <span style='color:#111;'> 299B </span>","children":null,"spread":false},{"title":"Info.plist <span style='color:#111;'> 774B </span>","children":null,"spread":false},{"title":"FirstLoaderInFirstDylib.h <span style='color:#111;'> 224B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"LoadCostSample","children":[{"title":"LoadCostSample.xcodeproj","children":[{"title":"project.xcworkspace","children":[{"title":"contents.xcworkspacedata <span style='color:#111;'> 159B </span>","children":null,"spread":false},{"title":"xcuserdata","children":[{"title":"everettjf.xcuserdatad","children":[{"title":"UserInterfaceState.xcuserstate <span style='color:#111;'> 55.46KB </span>","children":null,"spread":false}],"spread":true},{"title":"liuzhidan.xcuserdatad","children":[{"title":"UserInterfaceState.xcuserstate <span style='color:#111;'> 20.52KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"xcshareddata","children":[{"title":"IDEWorkspaceChecks.plist <span style='color:#111;'> 238B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"project.pbxproj <span style='color:#111;'> 23.22KB </span>","children":null,"spread":false},{"title":"xcuserdata","children":[{"title":"everettjf.xcuserdatad","children":[{"title":"xcschemes","children":[{"title":"xcschememanagement.plist <span style='color:#111;'> 337B </span>","children":null,"spread":false}],"spread":true},{"title":"xcdebugger","children":[{"title":"Breakpoints_v2.xcbkptlist <span style='color:#111;'> 1.07KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"liuzhidan.xcuserdatad","children":[{"title":"xcschemes","children":[{"title":"xcschememanagement.plist <span style='color:#111;'> 349B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":".DS_Store <span style='color:#111;'> 6.00KB </span>","children":null,"spread":false},{"title":"LoadCostSample","children":[{"title":"Assets.xcassets","children":[{"title":"AppIcon.appiconset","children":[{"title":"Contents.json <span style='color:#111;'> 1.55KB </span>","children":null,"spread":false}],"spread":true},{"title":"Contents.json <span style='color:#111;'> 62B </span>","children":null,"spread":false}],"spread":true},{"title":"main.m <span style='color:#111;'> 425B </span>","children":null,"spread":false},{"title":"AppDelegate.h <span style='color:#111;'> 272B </span>","children":null,"spread":false},{"title":"AppDelegate.m <span style='color:#111;'> 1.99KB </span>","children":null,"spread":false},{"title":"Base.lproj","children":[{"title":"LaunchScreen.storyboard <span style='color:#111;'> 1.64KB </span>","children":null,"spread":false},{"title":"Main.storyboard <span style='color:#111;'> 1.58KB </span>","children":null,"spread":false}],"spread":true},{"title":"loads","children":[{"title":"SecondLoader.m <span style='color:#111;'> 270B </span>","children":null,"spread":false},{"title":"SecondCategoryLoad.m <span style='color:#111;'> 324B </span>","children":null,"spread":false},{"title":"FirstCategoryLoader.h <span style='color:#111;'> 252B </span>","children":null,"spread":false},{"title":"SecondLoader.h <span style='color:#111;'> 217B </span>","children":null,"spread":false},{"title":"ThirdLoader.m <span style='color:#111;'> 266B </span>","children":null,"spread":false},{"title":"SecondCategoryLoad.h <span style='color:#111;'> 252B </span>","children":null,"spread":false},{"title":"FirstLoader.h <span style='color:#111;'> 215B </span>","children":null,"spread":false},{"title":"FirstLoader.m <span style='color:#111;'> 310B </span>","children":null,"spread":false},{"title":"ThirdLoader.h <span style='color:#111;'> 215B </span>","children":null,"spread":false},{"title":"FirstCategoryLoader.m <span style='color:#111;'> 322B </span>","children":null,"spread":false}],"spread":true},{"title":"ViewController.h <span style='color:#111;'> 210B </span>","children":null,"spread":false},{"title":"Info.plist <span style='color:#111;'> 1.43KB </span>","children":null,"spread":false},{"title":"ViewController.m <span style='color:#111;'> 491B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明