import json
from tools.garble.activity_garble import ActivityGarble
from tools.garble.api_garble import ApiGarble
from func import Function


#读取config.json配置
config_json = {}
with open("config.json", "r", encoding="utf-8") as fin:
    config_json = json.loads(fin.read())

#加入properties配置
properties = Function().load_properties(config_json['properties'])
config = config_json.copy()
config.update(properties)


print("  使用帮助 ")
print("1、activity类名混淆")
print("2、api混淆（针对 Retrofit 注解）")

command = int(input("请输入指令编号："))

if command == 1:
    #配置参数 config.json - activities
    ActivityGarble().activity_garble(config)

elif command == 2:
    ApiGarble().api_garble(config)