Commit d49fc98b by sikang

bug fix

parent 2a651cf8
......@@ -89,16 +89,15 @@ class JavaGarble:
for i in range(0, random.randint(0, 5)):
log_code += "Log.%s(\"%s\",\"%s\");\n" % (
''.join(random.sample("idew", random.randint(1, 1))),
self.__name,
''.join(random.sample("ABCDEFGHIJKLMNOPQRSTUVWXYZ", random.randint(3, 10))),
''.join(random.sample("ABCDEFGHIJKLMNOPQRSTUVWXYZ", random.randint(5, 15)))
)
fun_content = fun_content.replace(
"${func_content}", log_code + return_value)
fun_content = fun_content.replace("${func_content}", log_code + return_value)
self.__functions.append(fun_content)
if len(self.__functions) < random.randint(3, 10):
self.__generate_function(model_path)
self.__generate_function(model_path)
#插入代码
def __garble_java_file(self,file):
......@@ -111,7 +110,8 @@ class JavaGarble:
#生成全局变量
self.__generate_variable()
#生成方法
self.__generate_variable()
self.__generate_function("tools/garble/model/activity_model.java")
ignore = False
with open(file,"w+",encoding="utf-8") as fout:
for line in lines:
......
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