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
77297dc2
Commit
77297dc2
authored
May 13, 2019
by
sikang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add gw script
parent
4a4fcb77
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
0 deletions
+48
-0
script/res/update_gateway.py
+42
-0
script/script_help.sh
+6
-0
No files found.
script/res/update_gateway.py
0 → 100755
View file @
77297dc2
import
requests
import
json
import
string
import
random
import
glob
,
os
import
sys
path
=
"../../../gradle.properties"
gw_url
=
os
.
popen
(
'. ../../../gradle.properties
\n
echo "${gateway_url}"'
)
.
read
()
.
replace
(
'
\n
'
,
''
)
print
(
gw_url
)
gateway
=
requests
.
get
(
gw_url
)
.
json
()
print
(
gateway
)
with
open
(
path
,
"r"
)
as
f
:
lines
=
f
.
readlines
()
with
open
(
path
,
"w"
)
as
f_w
:
for
line
in
lines
:
if
"base_url="
in
line
:
line
=
"base_url=
\"
%
s
\"\n
"
%
(
gateway
[
'rest'
][
0
])
elif
"harvest_ip="
in
line
:
harvester
=
gateway
[
'harvester'
][
0
]
.
split
(
":"
)
line
=
"harvest_ip=
\"
%
s
\"\n
"
%
(
harvester
[
0
]
+
harvester
[
1
])
elif
"harvest_port="
in
line
:
line
=
"harvest_port=
%
s
\n
"
%
(
gateway
[
'harvester'
][
0
]
.
split
(
":"
)[
2
])
elif
"gateway_ip="
in
line
:
line
=
"gateway_ip=
\"
%
s
\"\n
"
%
(
gateway
[
'gateway'
][
1
])
elif
"repayment_h5="
in
line
:
line
=
"repayment_h5=
\"
%
s
\"\n
"
%
(
gateway
[
'repay'
][
0
])
elif
"admin_host="
in
line
:
line
=
"admin_host=
\"
%
s
\"\n
"
%
(
gateway
[
'admin'
][
0
])
elif
"agreement_url="
in
line
:
line
=
"agreement_url=
\"
%
s
\"\n
"
%
(
gateway
[
'privacy'
][
0
])
f_w
.
write
(
line
)
script/script_help.sh
View file @
77297dc2
...
@@ -21,6 +21,7 @@ echo "18、加固"
...
@@ -21,6 +21,7 @@ echo "18、加固"
echo
"19、混淆api"
echo
"19、混淆api"
echo
"20、更新GP状态"
echo
"20、更新GP状态"
echo
"21、获取签名秘钥散列"
echo
"21、获取签名秘钥散列"
echo
"22、更新gateway"
echo
-n
"请输入指令编号:"
echo
-n
"请输入指令编号:"
read
commod
read
commod
...
@@ -165,6 +166,11 @@ then
...
@@ -165,6 +166,11 @@ then
.
gradle.properties
.
gradle.properties
keytool
-exportcert
-alias
${
signing_keyAlias
}
-keystore
"app/
${
signing_certificate
}
"
-storepass
"
${
signing_keyAlias
}
"
| openssl sha1
-binary
| openssl base64
keytool
-exportcert
-alias
${
signing_keyAlias
}
-keystore
"app/
${
signing_certificate
}
"
-storepass
"
${
signing_keyAlias
}
"
| openssl sha1
-binary
| openssl base64
elif
((
$commod
==
'22'
))
then
cd
res
chmod a+x update_gateway.py
python update_gateway.py
elif
((
$commod
==
'10000'
))
elif
((
$commod
==
'10000'
))
then
then
...
...
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