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
3bc70832
Commit
3bc70832
authored
Oct 24, 2019
by
sikang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fiz
parent
fc4436a6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
python/tools/garble/package_garble.py
+12
-6
No files found.
python/tools/garble/package_garble.py
View file @
3bc70832
...
...
@@ -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'
])
...
...
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