13 Star 134 Fork 57

Aron / YTTInjectedContentKit

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README

YTTInjectedContentKit

iOS壳版本场景下的批量修改类名、属性名、插入混淆代码、修改项目名称的shell脚本

具体的实现和使用方法请参考我的博客文章:
iOS使用shell脚本注入混淆内容
iOS使用Shell脚本批量修改类名称
iOS使用shell脚本批量修改属性

已经实现功能

  • 批量修改类名称 RenameClasses.sh
  • 批量修改类属性名 RenameProperty.sh
  • 添加混淆的代码 injectedContentShell.sh
  • 恢复到修改之前状态 discardallchanges.sh
  • 修改项目名称 RenameProject.sh

RenameProject.sh 位于./DevPods/InjectedContentKit/ZytInjectContentExampleProj/Shell目录下,ZytInjectContentExampleProj是对应的测试工程
其它的脚本位于./DevPods/InjectedContentKit/Example/injectContentShell目录下,Example是对应的测试工程/

TODOS

  • RenameDir.sh 修改文件夹脚本
  • RenameFunction.sh 批量修改方法名脚本

使用方法

  • 执行./main.sh批量修改类名和方法名
  • 执行./discardallchanges.sh恢复到原来的状态
  • 执行injectedContentShell.sh批量添加混淆内容 这两个方法要配套使用,否则会出岔子,导致临时文件不能正确删除,切记

文件及其作用

类处理相关文件

  • GenRenameClasses.sh 从指定的目录读取类文件生成重命名类的配置文件RenameClasses.cfg
  • RenameClasses.cfg 生成的重命名类的配置文件
  • RenameClasses.sh 读取RenameClasses.cfg配置文件,修改配置的类名、修改引用、修改在pbxproj文件中的索引

属性处理相关文件

  • RenameProperty.sh 读取RenameProperties.cfg配置文件,批量修改指定目录下的类对应的属性名
  • RenameProperties.cfg 该文件自动生成的,保存需要修改的属性名
  • DefaultBlackListPropertiesConfig.cfg 配置在该文件中的属性不会被修改,修改会出现问题的属性在这个文件中添加配置,默认添加了一些是系统类的属性,如果因为某些属性的修改出现问题,往这个文件中添加配置即可

注入内容处理相关文件

  • injectedContentConfig.cfg 注入内容配置文件,每一行作为注入的内容,需要自行添加更多的配置到该文件中
  • injectedContentShell.sh 注入内容脚本

维护问题

因为换了公司,目前没有做这块了,有兴趣的同学可以帮忙维护下,邀请链接,如果失效了可以评论At我

Empty file

About

iOS壳版本场景下的批量修改类名、属性名、插入混淆代码、修改项目名称的shell脚本 expand collapse
Shell and 4 more languages
Cancel

Releases

No release

Contributors

All

Activities

Load More
can not load any more
Shell
1
https://gitee.com/dhar/YTTInjectedContentKit.git
git@gitee.com:dhar/YTTInjectedContentKit.git
dhar
YTTInjectedContentKit
YTTInjectedContentKit
master

Search