Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lib_base
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sikang
lib_base
Commits
58ae553d
Commit
58ae553d
authored
Nov 01, 2019
by
sikang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
45293961
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
6 deletions
+15
-6
python/config.json
+10
-1
python/tools/garble/activity_garble.py
+5
-5
No files found.
python/config.json
View file @
58ae553d
...
@@ -24,6 +24,8 @@
...
@@ -24,6 +24,8 @@
"//activities"
:
"需要混淆的类名,匹配方式 endswith() ,如 加入Activity.java 则所有Activity结尾的类加入混淆"
,
"//activities"
:
"需要混淆的类名,匹配方式 endswith() ,如 加入Activity.java 则所有Activity结尾的类加入混淆"
,
"activities"
:
[
"activities"
:
[
"Activity.java"
,
"Activity.java"
,
"View.java"
,
"Layout.java"
,
"Bean.java"
,
"Bean.java"
,
"Fragment.java"
,
"Fragment.java"
,
"Receiver.java"
,
"Receiver.java"
,
...
@@ -45,7 +47,14 @@
...
@@ -45,7 +47,14 @@
"RecordFilesResponse.java"
,
"RecordFilesResponse.java"
,
"TotalAmount.java"
,
"TotalAmount.java"
,
"UserBankInfo.java"
,
"UserBankInfo.java"
,
"YWUser.java"
"YWUser.java"
,
"CountDownButton.java"
,
"LoadingDialog.java"
,
"MarqueeView.java"
,
"FloatView.java"
,
"SpanButton.java"
,
"TitleSpan.java"
,
"TopBar.java"
],
],
"//ignore_files"
:
"在插入乱码时,要忽略的文件"
,
"//ignore_files"
:
"在插入乱码时,要忽略的文件"
,
...
...
python/tools/garble/activity_garble.py
View file @
58ae553d
...
@@ -60,7 +60,7 @@ class ActivityGarble:
...
@@ -60,7 +60,7 @@ class ActivityGarble:
for
root
,
dirs
,
files
in
os
.
walk
(
path
):
for
root
,
dirs
,
files
in
os
.
walk
(
path
):
directory
=
os
.
path
.
join
(
os
.
getcwd
(),
root
)
directory
=
os
.
path
.
join
(
os
.
getcwd
(),
root
)
for
file
in
files
:
for
file
in
files
:
if
file
.
endswith
(
".java"
):
if
file
.
endswith
(
".java"
)
or
file
.
endswith
(
".kt"
)
or
file
.
endswith
(
".xml"
)
:
self
.
__process_file_content
(
os
.
path
.
join
(
directory
,
file
),
file
)
self
.
__process_file_content
(
os
.
path
.
join
(
directory
,
file
),
file
)
...
@@ -78,9 +78,9 @@ class ActivityGarble:
...
@@ -78,9 +78,9 @@ class ActivityGarble:
self
.
__process_files
(
"
%
s/
%
s"
%
(
config
[
'root'
],
main_dir
))
self
.
__process_files
(
"
%
s/
%
s"
%
(
config
[
'root'
],
main_dir
))
#混淆AndroidManifest.xml
#混淆AndroidManifest.xml
print
(
"start garble 混淆AndroidManifest.xml ..."
)
#
print("start garble 混淆AndroidManifest.xml ...")
for
main_dir
in
config
[
'lib_main'
]:
#
for main_dir in config['lib_main']:
manifest_path
=
os
.
path
.
join
(
"
%
s/
%
s"
%
(
config
[
'root'
],
main_dir
),
"AndroidManifest.xml"
)
#
manifest_path = os.path.join("%s/%s"% (config['root'],main_dir), "AndroidManifest.xml")
self
.
__process_file_content
(
manifest_path
,
"AndroidManifest.xml"
)
#
self.__process_file_content(manifest_path,"AndroidManifest.xml")
print
(
"done"
)
print
(
"done"
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment