Commit 3bc70832 by sikang

bug fiz

parent fc4436a6
......@@ -98,12 +98,15 @@ class PackageGarble:
os.rename(key, mapping[key])
def __process_files(self, path):
for root, dirs, files in os.walk(path):
directory = os.path.join(os.getcwd(), root)
for file in files:
if file.endswith(".java") or file.endswith(".kt") or file.endswith(".xml"):
self.__process_file_content(
os.path.join(directory, file), file)
if os.path.isfile(path):
self.__process_file_content(path, path.file_name())
else:
for root, dirs, files in os.walk(path):
directory = os.path.join(os.getcwd(), root)
for file in files:
if file.endswith(".java") or file.endswith(".kt") or file.endswith(".xml"):
self.__process_file_content(
os.path.join(directory, file), file)
# 四大组件混淆
def pkg_garble(self, config):
......@@ -129,6 +132,9 @@ class PackageGarble:
self.pkg_mapping[key] = key
#全局替换
self.__process_files("%s/app/proguard-rules.pro" % config['root'])
self.__process_files("%s/lib_base/proguard-rules.pro" % config['root'])
self.__process_files("%s/app/src/main" % config['root'])
self.__process_files("%s/lib_base/src/main" % config['root'])
......
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