Commit feb834a3 by sikang

update

parent edd608c6
......@@ -47,7 +47,7 @@ class ActivityGarble:
#替换文件内容
def __process_file_content(self, path, file_name):
# print("processing content: %s..."%path)
with open(path, "rt", encoding="ISO-8859-1") as fin:
with open(path, "rt") as fin:
file_content = fin.read()
# replace the file content based on mangle settings
for (src, dst) in self.activity_mapping.items():
......@@ -59,7 +59,7 @@ class ActivityGarble:
if ext == '.java':
comment = "// machine renamed: %s\n" % file_name
file_content = "%s%s" % (comment, file_content)
with open(path, "wt", encoding="ISO-8859-1") as fout:
with open(path, "wt") as fout:
fout.write(file_content)
return
......@@ -86,7 +86,8 @@ class ActivityGarble:
for root, dirs, files in os.walk(path):
directory = os.path.join(os.getcwd(), root)
for file in files:
self.__process_file_content(os.path.join(directory, file),file)
if file.endswith(".java"):
elf.__process_file_content(os.path.join(directory, file),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