Coder Social home page Coder Social logo

confuseiosbyjava's Introduction

ConfuseIOSByJava

用JAVA实现的IOS工程代码混淆

0、混淆的基本逻辑
1、获取需要混淆的类的名称,生成对应的混淆后的名称(只识别 h 文件,顺带处理同名的 h, m, xib 三种文件)
2、获取需要混淆的方法名称,生成对应的混淆后的方法名称(只识别带有特定标识的方法名,需要手动标记)
3、根据语法遍历工程里的所有文件进行混淆改动,仅会被改动到的文件后缀 xib, h, m, pch, pbxproj
1、本代码能正常混淆的前置条件,需要调整的自行改动

1.1 混淆类名来自所有 h 文件(会替换同名的 h , m , xib 三种文件)(可以指定不混淆目录)比如:

Test.h  Test.m  Test.xib
...

1.2 给需要混淆的方法名前一行加特定标识,这里只识别 m 文件(标识可以自定定义调整)比如:

// CONFUSED_METHOD_TAG
-(void)reloadJPushInfo {
...

1.3 自行安装 IDEA 或运行此代码,比如:

这里没有比如,自己搞定吧
2、代码中的变量定义
PROJECT_PATH                  工程的本地路径
CONFUSED_METHOD_TAG           混淆的方法的标识
IGNORE_CLASS_PATH_ARRAY       此目录下的文件名不做混淆
IGNORE_METHOD_PATH_ARRAY      此目录下的代码里的方法名不做混淆调整
3、代码中的部分固定字符串含义
NCLN                          混淆后的新类名前缀,如:NCLN1234
nmtm                          混淆后的新方法名前缀,如:nmtm1234

confuseiosbyjava's People

Contributors

uccmawei avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.