All Projects → CUITCHE → code-obfuscation

CUITCHE / code-obfuscation

Licence: MIT license
一款iOS代码混淆工具(A code obfuscation tool for iOS.)

Programming Languages

C++
36643 projects - #6 most used programming language
objective c
16641 projects - #2 most used programming language
swift
15916 projects

Projects that are alternatives of or similar to code-obfuscation

Forsaken
One of the best Python3.9 obfuscators.
Stars: ✭ 94 (+193.75%)
Mutual labels:  obfuscation, obfuscate, obfuscator
Javascript Obfuscator
A powerful obfuscator for JavaScript and Node.js
Stars: ✭ 8,204 (+25537.5%)
Mutual labels:  obfuscation, obfuscate, obfuscator
gnirts
Obfuscate string literals in JavaScript code.
Stars: ✭ 65 (+103.13%)
Mutual labels:  obfuscation, obfuscate, obfuscator
AutoIt-Obfuscator
AutoIt Obfuscator lets you protect AutoIt script source code against analysis, reverse engineering & decompilation using advanced obfuscation techniques and polymorphic encryption.
Stars: ✭ 31 (-3.12%)
Mutual labels:  obfuscation, obfuscate, obfuscator
obfuscator
Obfuscate PHP source files with basic XOR encryption in userland code at runtime.
Stars: ✭ 20 (-37.5%)
Mutual labels:  obfuscation, obfuscate, obfuscator
Z00bfuscator
Z00bfuscator is the simple, open-source, cross-platform obfuscator for .NET Assemblies built on .NET Core
Stars: ✭ 35 (+9.38%)
Mutual labels:  obfuscation, obfuscator
Kylin Llvm Obfuscator
based on llvm 5.0.1 release with ollvm
Stars: ✭ 37 (+15.63%)
Mutual labels:  obfuscation, obfuscator
Vetric
WIP Java/Kotlin obfuscator
Stars: ✭ 39 (+21.88%)
Mutual labels:  obfuscation, obfuscator
Enigma
Gradle Plugin - Obfuscator String Encryption (Android/Java)
Stars: ✭ 43 (+34.38%)
Mutual labels:  obfuscation, obfuscator
Obfuscar
Open source obfuscation tool for .NET assemblies
Stars: ✭ 1,040 (+3150%)
Mutual labels:  obfuscation, obfuscator
Skater .net Obfuscator
Skater .NET Obfuscator is an obfuscation tool for .NET code protection. It implements all known software protection techniques and obfuscation algorithms.
Stars: ✭ 64 (+100%)
Mutual labels:  obfuscation, obfuscator
Stringobfuscator
Simple header-only compile-time library for string obfuscation (C++14)
Stars: ✭ 164 (+412.5%)
Mutual labels:  obfuscation, obfuscator
Yguard
The open-source Java obfuscation tool working with Ant and Gradle by yWorks - the diagramming experts
Stars: ✭ 130 (+306.25%)
Mutual labels:  obfuscation, obfuscator
Obfuscator Class
👨‍💻 Simple and effective Obfuscator PHP class (this is not a stupid base64 encoding script, but a real and effective obfuscation script)
Stars: ✭ 202 (+531.25%)
Mutual labels:  obfuscation, obfuscator
ColonialObfuscator
Java Obfuscator in Beta
Stars: ✭ 23 (-28.12%)
Mutual labels:  obfuscation, obfuscator
Yakpro Po
YAK Pro - Php Obfuscator
Stars: ✭ 678 (+2018.75%)
Mutual labels:  obfuscation, obfuscator
Mjcodeobfuscation
一个用于代码混淆和字符串加密的Mac小Demo
Stars: ✭ 445 (+1290.63%)
Mutual labels:  obfuscation, obfuscator
Mosey
A free and open source java bytecode obfuscator, experimental
Stars: ✭ 43 (+34.38%)
Mutual labels:  obfuscation, obfuscator
UniObfuscator
Java obfuscator that hides code in comment tags and Unicode garbage by making use of Java's Unicode escapes.
Stars: ✭ 40 (+25%)
Mutual labels:  obfuscation, obfuscator
sus
A now actually pretty good amogus themed javascript obfuscator lol
Stars: ✭ 23 (-28.12%)
Mutual labels:  obfuscation, obfuscator

code-obfuscation

Build Status

A code obfuscation tool for iOS.

Because I turned to Swift, the code-obfuscation won't be updated any more. And I am coding Swift Obfuscator that based on Swift Syntax and Structured Editing Library.

Pre-setting

  • Copy the directory Obfuscation-Objective-C File.xctemplate to /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/File Templates/Source, like below order:

    sudo cp -r Obfuscation-Objective-C\ File.xctemplate/ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/File\ Templates/Source

    Now, you can create obfuscation files in your projects. You might try to create them in your project, and then you will get 3 files.

  • Copy the file CO-Features.h to your project if you need the blow macro Features.

How to Use

Execute the order ./CodeObfuscation-release or ./CodeObfuscation-debug at your root path of your project.

Also set the shell script at you Xcode project to exectue it. Also see Features.

You could copy the program obfuse-code for iOS platform.

Obfuscation Syntax

  • Add macro CO_CONFUSION_CLASS after keyword @interface and before classname. It tags the class is added to obfuscation task. e.g.

    @interface CO_CONFUSION_CLASS COTemplateFile : NSObject
    @end
  • Also modify the category by CO_CONFUSION_CATEGORY. And the macro CO_CONFUSION_CATEGORY must be before category-name at bracket e.g.

    @interface NSString (CO_CONFUSION_CATEGORY abcde)
    @end
  • Add macro CO_CONFUSION_PROPERTY before a property-name declared. It tags the property is added to obfuscation task. e.g.

    @interface CO_CONFUSION_CLASS COTemplateFile : NSObject
    
    @property (nonatomic, strong) NSString * CO_CONFUSION_PROPERTY prop1;
    @property CGFloat CO_CONFUSION_PROPERTY prop2;
    
    @end
  • Add macro CO_CONFUSION_METHOD before a method head of declare or implementation. It tags the method is added to obfuscation task. e.g.

    // .h
    @interface CO_CONFUSION_CLASS COTemplateFile : NSObject
    
    CO_CONFUSION_METHOD
    - (void)makeFoo:(NSString *)foo1 arg2:(NSInteger)arg2;
    
    CO_CONFUSION_METHOD
    - (instancetype)initWithArg1:(CGFloat)arg, ...;
    
    @end
    
    // .m or .mm
    @implementation COTemplateFile
    
    CO_CONFUSION_METHOD
    - (void)_private:(NSString *)arg1 method:(float)arg2 scanned:(BOOL)scanned
    {
        ;
    }
    
    @end
  • Add macro CO_CONFUSION_PROTOCOL before a method head of declare or implementation. It tags the method is added to obfuscation task. e.g.

    @protocol CO_CONFUSION_PROTOCOL COProtocol <NSObject>
    
    @property (nonatomic, strong) id CO_CONFUSION_PROPERTY aVar;
    
    CO_CONFUSION_METHOD
    - (BOOL)doSome:(NSString *)task withYou:(id)you another:(id)someWho;
    
    @end

    Property and method are same to CO_CONFUSION_PROPERTY and CO_CONFUSION_METHOD.

Features

  • Support commands. (You can alse obtain these from command: -h or -help)

    -id string

    ​ The directory of info.plist. Default is current executed path. (default ".")

    -offset int

    ​ The offset of obfuscation. Default is 0.

    -db string

    ​ The directory of obfuscation database. Default is current executed path. (default ".")

    -root string

    ​ The directory of project file or what you want to start. Default is current executed path. (default ".")

    -super

    ​ Check the user-class' names which have been entranced obfuscation whether their super classes exist or not. If exists, will info a warning. For strict option, will check all of classes of iOS Kits.

    -strict

    ​ See -super.

    -st

    ​ Strengthen the obfuscation. Default is true. (default true)

    -version

    ​ Get the program supported iOS SDK version.

    -q string

    ​ Query the method whether exist or not.

  • Output origin-name: obfuscation map into database. Its structure like:

    database-structure

    Use the SQL to search real name:

    SELECT real
    FROM JSONModel_coh
    WHERE fake = 'AAAAA_$_S97Gcom_placeholder_com_s_p'
    	AND type = 'method'
    -- Output: toJSONStringWithKeys
  • Use the macro CO_NAME to obtain the class name on runtime if the class name has been obfused. The 'CO_NAME' always return correct name even If the class name has not been obfused.

  • Use the macro CO_PROPERTY_SET or CO_PROPERTY_SET_TYPE to help your write setter of property which is added to obfuscation task. e.g.

    // Assume there is a NSString property named fullpath at Foo class.
    CO_PROPERTY_SET(fullpath, Fullpath, Foo)
    {
      // Use macro _ or CO_VAR_NAME get the synthesis variable.
      if (![_(fullpath) isEqualToString:fullpath]) {
    	_(fullpath) = fulpath;
    	// TODO other things... 
      }
    }
    
    // If you want not to use class name
    CO_PROPERTY_SET_TYPE(fullpath, Fullpath, NSString*)
    {
      // Some codes...
    }
  • Use CO_PROPERTY_GET to synthesis getter method.

  • Use CO_VAR_NAME to obtain synthsis variable. It looks like a little long, you can use _ to do if available.

Notice

  • CO_CONFUSION_CLASS and CO_CONFUSION_CATEGORY is a prerequisite for CO_CONFUSION_PROPERTY and CO_CONFUSION_METHOD.
  • COULD NOT use the code-obfuscation if your code contains runtime code. Unless you can control it.
  • [IMPORTANT] The obfuscator works with macro. So if a target label was obfuscated with the same name of another API and your code used it. That would cause a compile error under release model. For example, class Foo has a property named length and been obfuscated, if you invoke it and then use NSString's length property in a code block with Foo.length. The property length word of NSString will be replaced with Foo's obfuscation in release model.

License

The MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].