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
b2c5d501
Commit
b2c5d501
authored
Oct 29, 2019
by
sikang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update script
parent
8743fd96
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
11 deletions
+44
-11
python/config.json
+12
-3
python/tools/garble/java_garble.py
+28
-0
src/main/java/tech/starwin/impl/HttpObserver.java
+4
-8
No files found.
python/config.json
View file @
b2c5d501
...
...
@@ -9,15 +9,15 @@
"cash_plugin_toolbox/src/main"
],
"//api_mapping"
:
"api混淆文件的路径. 'root' 下的相对路径"
,
"api_mapping"
:
"script/api_mapping"
,
"//proguard"
:
"所有用到的proguard-rules.pro 路径"
,
"proguard"
:[
"app/proguard-rules.pro"
,
"lib_base/proguard-rules.pro"
],
"//api_mapping"
:
"api混淆文件的路径. 'root' 下的相对路径"
,
"api_mapping"
:
"script/api_mapping"
,
"//string_encryption"
:
"字符串加密方式,为false时,只做插入不做加密,未集成Philology填false"
,
"string_encryption"
:
"true"
,
...
...
@@ -48,6 +48,15 @@
"YWUser.java"
],
"//ignore_files"
:
"在插入乱码时,要忽略的文件"
,
"ignore_files"
:[
"UploadCollectionBean.java"
],
"//conditional_java"
:
"满足混淆条件的行,匹配方式"
,
"conditional_java"
:
[
],
"//jiagu_output"
:
"360加固输出路径"
,
"jiagu_output"
:
"/Users/connor/Documents/apks"
,
...
...
python/tools/garble/java_garble.py
0 → 100644
View file @
b2c5d501
# -*-coding:utf-8-*-
import
random
class
JavaGarble
:
__used_names
=
[]
def
__gen_rand_str
(
self
):
result
=
""
while
len
(
result
)
==
0
or
result
in
self
.
__used_names
:
random_str
=
''
.
join
(
random
.
sample
(
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
,
random
.
randint
(
1
,
2
)))
result
=
"
%
s
%
d"
%
(
random_str
,
random
.
randint
(
1
,
100
))
self
.
__used_names
.
append
(
result
)
return
result
def
__garble_java_file
(
self
,
file
):
with
open
(
file
,
"r"
,
encoding
=
"utf-8"
)
as
fin
:
lines
=
fin
.
readlines
()
with
open
(
file
,
"w+"
,
encoding
=
"utf-8"
)
as
fout
:
for
line
in
lines
:
#interface 不混淆
if
"interface"
in
line
and
"{
\n
"
in
line
:
fout
.
write
(
line
)
continue
#class下插入全局变量
if
" class "
in
line
and
"{
\n
"
in
line
:
src/main/java/tech/starwin/impl/HttpObserver.java
View file @
b2c5d501
package
tech
.
starwin
.
impl
;
import
android.text.TextUtils
;
import
com.common.bean.BasicAck
;
import
com.common.bean.ResponseErrorBody
;
import
com.common.bean.UpdateBean
;
import
com.google.gson.Gson
;
import
org.greenrobot.eventbus.EventBus
;
...
...
@@ -9,13 +10,8 @@ import org.greenrobot.eventbus.EventBus;
import
io.reactivex.Observer
;
import
io.reactivex.disposables.Disposable
;
import
retrofit2.HttpException
;
import
tech.starwin.R
;
import
tech.starwin.LibConfig
;
import
com.common.bean.BasicAck
;
import
com.common.bean.ResponseErrorBody
;
import
com.common.bean.UpdateBean
;
import
tech.starwin.R
;
import
tech.starwin.network.Error
;
import
tech.starwin.utils.LogUtils
;
import
tech.starwin.utils.LoginManager
;
...
...
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