[Tool] iOS code obfuscation tool-iOS source code obfuscation

Latest update record

V2.0.3 (December 11, 2022) update content:

1. Add the logic of importing the mapping list;

2. Optimize and fix other confusing logic;

3. Update address - github

The main function

ZFJObsLib is a professional iOS source code obfuscation tool. The specific functions include method obfuscation, attribute obfuscation, class name obfuscation, keyword obfuscation, adding garbage code, automatically creating garbage classes, deleting comments, modifying resource file Hash values, encrypting strings, and renovating resources Name, artificial obfuscation, obfuscated file name, obfuscated file directory, obfuscated thesaurus, obfuscated log, mapping list, sensitive word filtering, image compression, crawler service, modified project name, refurbished project UUID, automatic backup obfuscated project, custom ignore Attributes, custom ignore functions, custom ignore class names, interface color magic changes, etc.!!
tree_fun_4.png

Code obfuscation

In terms of code obfuscation, it mainly obfuscates the differentiated original code from four aspects: attribute obfuscation, function obfuscation, class name obfuscation, and keyword obfuscation. Users can also choose the degree of obfuscation!

Resource Refurbishment

For the image resource files in the project, the software can not only modify its HASH value, and automatically update the resource file name, but also add a confusing prefix to the resource file!

garbage code

For projects with less source code and relatively simple logic, the software can add garbage code to existing classes and automatically reference them, and can also create garbage classes and automatically instantiate and call them!

encrypted string

Encrypt and protect the plaintext strings in the project to prevent key business codes from being obtained by tools such as IDA!

delete comment

The software can automatically delete all types of comment codes in the project with one click to prevent code logic from leaking!

obfuscation project framework

The software differentiates the project framework by modifying the project name, confusing the project directory, and renovating the UUID with one click!

Sensitive word filtering

For the card review or rejection caused by sensitive words that may be quoted in the source code, the software can search for sensitive words and replace them automatically!

Interface magic change

If you don’t want to modify the UI and put the source code on the shelf directly, you can change the UI view through the magic change of the interface color!

the code

# -*- coding: utf-8 -*-
# @Author: zfjsyqk
# @Date:   2022-07-03 00:37:53
# @Last Modified by:   zfjsyqk
# @Last Modified time: 2023-01-11 22:04:38
# ---------- FLutter混淆的主入口 ----------
import os
import subprocess
from ObsSecurity import *
from ObsFlutterReview import *
from ObsFlutterVariable import *
from ObsFlutterClassName import *
from ObsFlutterMethod import *
from ObsFlutterResourceName import *
from ObsFlutterDeleteNotes import *
from ObsFlutterResourceHash import *
from ObsFlutterUUID import *
from ObsFlutterLog import *

# 单利
_personinfo = ZFJPersoninfo()

# 开始混淆了
def flutter_obscure_main(project_path, obscure_list):
	if is_can_obscure() == False: return

	init_flutter_obscure_data()

	_personinfo.flutterProjectPath = project_path

	prefix_word = ''

	start_review_project(project_path)

	if 'KObsFlutterVariableKey' in obscure_list:
		start_obscure_variable_constant_with_project(project_path, prefix_word)
	else:
		pass

	if 'KObsFlutterClassNameKey' in obscure_list:
		start_obscure_class_with_project_path(project_path, prefix_word)
	else:
		pass

	if 'KObsFlutterMethodNameKey' in obscure_list:
		start_obscure_method_with_project_path(project_path, prefix_word)
	else:
		pass

	if 'KObsFlutterResourceHashKey' in obscure_list:
		start_update_recource_hash(project_path)
	else:
		pass

	if 'KObsFlutterResourceNameKey' in obscure_list:
		start_obscure_resource_name_with_project_path(project_path, prefix_word)
	else:
		pass

	if 'KObsFlutterDeleteNotesKey' in obscure_list:
		start_delete_all_notes(project_path)
	else:
		pass

	if 'KObsFlutterUUIDKey' in obscure_list:
		start_update_flutter_uuid(project_path)
	else:
		pass

	end_flutter_obscure(project_path)

def end_flutter_obscure(project_path):
	global _personinfo

	_personinfo.flutterProjectPath = None

	export_flutter_map_list(project_path)

	_personinfo.root_path = None

	obs_flutter_title('Flutter obfuscation has ended.')

	if _personinfo != None and _personinfo.flutterRootView != None:
		_personinfo.flutterRootView.endFlutterObscure()
	else:
		pass

def flutter_root_view_maplist(map_list_str):
	global _personinfo
	if _personinfo == None: return
	if _personinfo.flutterRootView == None: return
	_personinfo.flutterRootView.addMapListEdit(map_list_str)

Give a little star if you like it ⭐️⭐️⭐️
https://github.com/zfjsyqk/ZFJObsLib

Guess you like

Origin blog.csdn.net/u014220518/article/details/128871035