Commit 3472ea0d by sikang

update

parent b7c7e977
......@@ -21,8 +21,8 @@
"lib_base/proguard-rules.pro"
],
"//":"",
"":"",
"//string_encryption": "字符串加密方式,为false时,只做插入不做加密,未集成Philology填false",
"string_encryption" : "true",
"//":"",
"":"",
......
......@@ -3,6 +3,7 @@ from tools.garble.activity_garble import ActivityGarble
from tools.garble.api_garble import ApiGarble
from tools.garble.manifest_grable import ManifestGarble
from tools.garble.package_garble import PackageGarble
from tools.garble.string_garble import StringGarble
from func import Function
......@@ -22,6 +23,7 @@ print("1、activity类名混淆")
print("2、api混淆(针对 Retrofit 注解)")
print("3、manifest混淆 在包路径中随机插入Activity并注册")
print("4、包路径混淆")
print("5、字符串插入/加密")
print(" ")
command = int(input("请输入指令编号:"))
......@@ -42,3 +44,6 @@ elif command == 4:
#所有library src/main/java 下的包名混淆
PackageGarble().pkg_garble(config)
elif compile == 5:
StringGarble().str_grable(config)
......@@ -61,6 +61,7 @@ class StringGarble:
def str_grable(self,config):
for main_dir in config['lib_main']:
for root, dirs, files in os.walk("%s/lib_base/src/main/res"% config['root']):
directory = os.path.join(os.getcwd(), root)
for file in files:
......@@ -68,6 +69,7 @@ class StringGarble:
# get the path of the java file
path = os.path.join(directory, file)
print("process %s"% path)
if config['string_encryption'] in "true":
self.__string_garble(path)
self.__insert_strings(path)
print("done")
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment