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
3472ea0d
Commit
3472ea0d
authored
Oct 25, 2019
by
sikang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
b7c7e977
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
13 deletions
+20
-13
python/config.json
+2
-2
python/help.py
+5
-0
python/tools/garble/string_garble.py
+13
-11
No files found.
python/config.json
View file @
3472ea0d
...
@@ -21,8 +21,8 @@
...
@@ -21,8 +21,8 @@
"lib_base/proguard-rules.pro"
"lib_base/proguard-rules.pro"
],
],
"//
"
:
"
"
,
"//
string_encryption"
:
"字符串加密方式,为false时,只做插入不做加密,未集成Philology填false
"
,
"
"
:
"
"
,
"
string_encryption"
:
"true
"
,
"//"
:
""
,
"//"
:
""
,
""
:
""
,
""
:
""
,
...
...
python/help.py
View file @
3472ea0d
...
@@ -3,6 +3,7 @@ from tools.garble.activity_garble import ActivityGarble
...
@@ -3,6 +3,7 @@ from tools.garble.activity_garble import ActivityGarble
from
tools.garble.api_garble
import
ApiGarble
from
tools.garble.api_garble
import
ApiGarble
from
tools.garble.manifest_grable
import
ManifestGarble
from
tools.garble.manifest_grable
import
ManifestGarble
from
tools.garble.package_garble
import
PackageGarble
from
tools.garble.package_garble
import
PackageGarble
from
tools.garble.string_garble
import
StringGarble
from
func
import
Function
from
func
import
Function
...
@@ -22,6 +23,7 @@ print("1、activity类名混淆")
...
@@ -22,6 +23,7 @@ print("1、activity类名混淆")
print
(
"2、api混淆(针对 Retrofit 注解)"
)
print
(
"2、api混淆(针对 Retrofit 注解)"
)
print
(
"3、manifest混淆 在包路径中随机插入Activity并注册"
)
print
(
"3、manifest混淆 在包路径中随机插入Activity并注册"
)
print
(
"4、包路径混淆"
)
print
(
"4、包路径混淆"
)
print
(
"5、字符串插入/加密"
)
print
(
" "
)
print
(
" "
)
command
=
int
(
input
(
"请输入指令编号:"
))
command
=
int
(
input
(
"请输入指令编号:"
))
...
@@ -42,3 +44,6 @@ elif command == 4:
...
@@ -42,3 +44,6 @@ elif command == 4:
#所有library src/main/java 下的包名混淆
#所有library src/main/java 下的包名混淆
PackageGarble
()
.
pkg_garble
(
config
)
PackageGarble
()
.
pkg_garble
(
config
)
elif
compile
==
5
:
StringGarble
()
.
str_grable
(
config
)
python/tools/garble/string_garble.py
View file @
3472ea0d
...
@@ -61,13 +61,15 @@ class StringGarble:
...
@@ -61,13 +61,15 @@ class StringGarble:
def
str_grable
(
self
,
config
):
def
str_grable
(
self
,
config
):
for
root
,
dirs
,
files
in
os
.
walk
(
"
%
s/lib_base/src/main/res"
%
config
[
'root'
]):
for
main_dir
in
config
[
'lib_main'
]:
directory
=
os
.
path
.
join
(
os
.
getcwd
(),
root
)
for
root
,
dirs
,
files
in
os
.
walk
(
"
%
s/lib_base/src/main/res"
%
config
[
'root'
]):
for
file
in
files
:
directory
=
os
.
path
.
join
(
os
.
getcwd
(),
root
)
if
file
.
endswith
(
"strings.xml"
):
for
file
in
files
:
# get the path of the java file
if
file
.
endswith
(
"strings.xml"
):
path
=
os
.
path
.
join
(
directory
,
file
)
# get the path of the java file
print
(
"process
%
s"
%
path
)
path
=
os
.
path
.
join
(
directory
,
file
)
self
.
__string_garble
(
path
)
print
(
"process
%
s"
%
path
)
self
.
__insert_strings
(
path
)
if
config
[
'string_encryption'
]
in
"true"
:
print
(
"done"
)
self
.
__string_garble
(
path
)
\ No newline at end of file
self
.
__insert_strings
(
path
)
print
(
"done"
)
\ No newline at end of file
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