Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
autointerface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QA
autointerface
Commits
e0b28f11
Commit
e0b28f11
authored
Jun 03, 2020
by
桂秋月
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
b7c4edc9
Pipeline
#940
failed with stages
Changes
13
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
68 additions
and
24 deletions
+68
-24
Pipfile
Pipfile
+2
-0
KeyData
blueprints/KeyData
+7
-4
requestResult.cpython-37.pyc
blueprints/__pycache__/requestResult.cpython-37.pyc
+0
-0
cookie.txt
blueprints/cookie.txt
+0
-0
requestResult.py
blueprints/requestResult.py
+2
-2
deals.cpython-37.pyc
blueprints/tools/__pycache__/deals.cpython-37.pyc
+0
-0
debugtalk.cpython-37.pyc
blueprints/tools/__pycache__/debugtalk.cpython-37.pyc
+0
-0
cookie.txt
blueprints/tools/cookie.txt
+0
-0
deals.py
blueprints/tools/deals.py
+30
-2
debugtalk.py
blueprints/tools/debugtalk.py
+20
-9
790.json
testCase/ka_koala_repay/790.json
+1
-1
874.json
testCase/usercenter/874.json
+2
-2
875.json
testCase/usercenter/875.json
+4
-4
No files found.
Pipfile
View file @
e0b28f11
...
@@ -29,6 +29,8 @@ uwsgi = "*"
...
@@ -29,6 +29,8 @@ uwsgi = "*"
python-dev
=
"*"
python-dev
=
"*"
python-devtools
=
"*"
python-devtools
=
"*"
redis
=
"*"
redis
=
"*"
crypto
=
"*"
pycryptodome
=
"*"
[requires]
[requires]
python_version
=
"3.7"
python_version
=
"3.7"
blueprints/KeyData
View file @
e0b28f11
...
@@ -11,7 +11,7 @@ finalenv = 1
...
@@ -11,7 +11,7 @@ finalenv = 1
usered = qa
usered = qa
defaluttime = 2
defaluttime = 2
timeout = 20
timeout = 20
phone_no = 1
3532956108
phone_no = 1
8800091024
environment = qa3
environment = qa3
term = 6
term = 6
amount = 10000
amount = 10000
...
@@ -32,10 +32,13 @@ applyno = AN000000144618983447142400
...
@@ -32,10 +32,13 @@ applyno = AN000000144618983447142400
randomstr = eKgdOZNDqP9LGjv8IrYfS04wk6C1
randomstr = eKgdOZNDqP9LGjv8IrYfS04wk6C1
[globalvar]
[globalvar]
aeskey = sxD8KO79EDK0N0AJ
md5key = qEAxMJBv
acs_url = http://acs.liangkebang.com/encryptAndBase64Encode
password = 123456aaa
password = 123456aaa
biztype = 0
biztype = 0
token = eb298e58-b438-4437-ab29-70973e7210a2
token = eb298e58-b438-4437-ab29-70973e7210a2
passportapitoken =
c34955cc-2384-4345-9b1e-4dc1038ff0d5
passportapitoken =
56f2d6db-a516-4b6b-90f2-6fb527be3942
opapitoken = 5375b6c5-527e-4c3a-8c66-b9ef96a7412d
opapitoken = 5375b6c5-527e-4c3a-8c66-b9ef96a7412d
cardnoprovider = ICBC
cardnoprovider = ICBC
apitoken = ed02234f-27e5-4f50-9cda-3457ab98fce0
apitoken = ed02234f-27e5-4f50-9cda-3457ab98fce0
...
@@ -51,7 +54,7 @@ requestid = 63119890137088
...
@@ -51,7 +54,7 @@ requestid = 63119890137088
vcode = 238345
vcode = 238345
applyno = AN000000143183669801000960
applyno = AN000000143183669801000960
voicetoken = eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1ODgxNTE1OTgsInVzZXJuYW1lIjoidHgueHlxYiJ9.W4fKn-tdbOORELBfUd6KOjrygjzWWFY0zf6dmcqsjiI
voicetoken = eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1ODgxNTE1OTgsInVzZXJuYW1lIjoidHgueHlxYiJ9.W4fKn-tdbOORELBfUd6KOjrygjzWWFY0zf6dmcqsjiI
logindata = phone=1
3532956108
logindata = phone=1
8800091024
[testsuit]
[testsuit]
cases_numbertemp = [{'passportapi':[816,817,323, 382, 383, 384, 385,361, 402, 403, 404, 405,401,399,407,367,574,575,577,576,368,371,372,374,375,376,378,363,364,369,370,409,373,410,412,411,413,387, 388,389,390, 391, 392,389, 390, 394, 395, 396, 397]}]
cases_numbertemp = [{'passportapi':[816,817,323, 382, 383, 384, 385,361, 402, 403, 404, 405,401,399,407,367,574,575,577,576,368,371,372,374,375,376,378,363,364,369,370,409,373,410,412,411,413,387, 388,389,390, 391, 392,389, 390, 394, 395, 396, 397]}]
...
@@ -89,5 +92,5 @@ case_number_case_tixian = [{'ka_koala_loan':[801,818,798,799,800,802,820]}]
...
@@ -89,5 +92,5 @@ case_number_case_tixian = [{'ka_koala_loan':[801,818,798,799,800,802,820]}]
case_number_case_fangkuan = [{'ka_koala_loan':[835]},{'zijin':[824,822]}]
case_number_case_fangkuan = [{'ka_koala_loan':[835]},{'zijin':[824,822]}]
[sqldata]
[sqldata]
sqldata = [
'xyqb', 4843, 'oTQGos9gkdczK4qdXQDl6ZAfyYv8', '18211020323'
]
sqldata = [
0
]
blueprints/__pycache__/requestResult.cpython-37.pyc
View file @
e0b28f11
No preview for this file type
blueprints/cookie.txt
View file @
e0b28f11
No preview for this file type
blueprints/requestResult.py
View file @
e0b28f11
...
@@ -702,7 +702,7 @@ if __name__ == '__main__':
...
@@ -702,7 +702,7 @@ if __name__ == '__main__':
cases_number
=
[
787
]
cases_number
=
[
787
]
# cases_number=[753]
# cases_number=[753]
cases_number
=
[
874
]
cases_number
=
[
790
]
#cases_number = [369,370,409,373]
#cases_number = [369,370,409,373]
...
@@ -716,7 +716,7 @@ if __name__ == '__main__':
...
@@ -716,7 +716,7 @@ if __name__ == '__main__':
casefile
=
[{
'ka_koala_repay'
:
t
.
split
(
','
)}]
casefile
=
[{
'ka_koala_repay'
:
t
.
split
(
','
)}]
casefile
=
[{
'usercenter'
:
t
.
split
(
','
)}]
#
casefile =[{'usercenter': t.split(',')}]
#print(casefile)
#print(casefile)
...
...
blueprints/tools/__pycache__/deals.cpython-37.pyc
View file @
e0b28f11
No preview for this file type
blueprints/tools/__pycache__/debugtalk.cpython-37.pyc
View file @
e0b28f11
No preview for this file type
blueprints/tools/cookie.txt
View file @
e0b28f11
No preview for this file type
blueprints/tools/deals.py
View file @
e0b28f11
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
@project:autoInterface
@project:autoInterface
"""
"""
#from Crypto.Cipher import AES
from
datetime
import
datetime
from
datetime
import
datetime
import
time
,
os
,
pickle
,
jsonpath
,
re
,
sys
import
time
,
os
,
pickle
,
jsonpath
,
re
,
sys
from
blueprints.tools.dealDatabase
import
dealParamSql
from
blueprints.tools.dealDatabase
import
dealParamSql
...
@@ -13,6 +14,9 @@ from blueprints.tools.dealDatabase import delDatabase
...
@@ -13,6 +14,9 @@ from blueprints.tools.dealDatabase import delDatabase
from
blueprints.tools
import
debugtalk
from
blueprints.tools
import
debugtalk
from
blueprints.settings
import
*
from
blueprints.settings
import
*
import
requests
,
json
,
base64
,
hashlib
,
redis
import
requests
,
json
,
base64
,
hashlib
,
redis
from
urllib.parse
import
urlencode
from
hashlib
import
md5
def
renameFile
(
houzui
):
def
renameFile
(
houzui
):
rename
=
datetime
.
now
()
rename
=
datetime
.
now
()
t
=
int
(
time
.
mktime
(
time
.
strptime
(
str
(
rename
),
"
%
Y-
%
m-
%
d
%
H:
%
M:
%
S.
%
f"
)))
t
=
int
(
time
.
mktime
(
time
.
strptime
(
str
(
rename
),
"
%
Y-
%
m-
%
d
%
H:
%
M:
%
S.
%
f"
)))
...
@@ -136,7 +140,7 @@ def dealSign(casejson):
...
@@ -136,7 +140,7 @@ def dealSign(casejson):
temp
=
temp
+
'security_code=cd6yFfEgI0t67JaOYtLxTqXvumfJbsZi'
temp
=
temp
+
'security_code=cd6yFfEgI0t67JaOYtLxTqXvumfJbsZi'
else
:
else
:
temp
=
temp
+
security_code
temp
=
temp
+
security_code
print
(
'temp====='
,
temp
)
#
print('temp=====', temp)
casejson
[
'body'
][
'sign'
]
=
hashlib
.
md5
(
temp
.
encode
())
.
hexdigest
()
casejson
[
'body'
][
'sign'
]
=
hashlib
.
md5
(
temp
.
encode
())
.
hexdigest
()
#print(casejson)
#print(casejson)
return
casejson
return
casejson
...
@@ -170,8 +174,32 @@ def conn_redis():
...
@@ -170,8 +174,32 @@ def conn_redis():
#print(t.keys('a*')[0])
#print(t.keys('a*')[0])
print
([
i
for
i
in
t
.
keys
(
'job*'
)])
print
([
i
for
i
in
t
.
keys
(
'job*'
)])
def
jiami
(
casejson
,
acs_url
,
md5key
,
aeskey
):
#temp={}
body
=
casejson
.
get
(
'body'
)
if
isinstance
(
body
,
dict
)
and
body
.
get
(
"bizData"
):
bizdata
=
json
.
dumps
(
body
.
get
(
'bizData'
),
ensure_ascii
=
False
)
.
replace
(
' '
,
''
)
else
:
raise
Exception
(
'body is not json'
)
totle
=
bizdata
+
md5key
#print(totle.encode())
sign
=
md5
(
totle
.
encode
())
.
hexdigest
()
#print("sign==",sign,totle)
content
=
{
"bizData"
:
bizdata
,
"sign"
:
sign
}
temp
=
{
"content"
:
json
.
dumps
(
content
,
ensure_ascii
=
False
)
.
replace
(
' '
,
''
),
"key"
:
aeskey
}
header
=
{
"Content-Type"
:
"application/x-www-form-urlencoded"
}
resp
=
requests
.
post
(
acs_url
,
headers
=
header
,
data
=
urlencode
(
temp
))
return
resp
.
text
[
0
:
172
]
def
jiemi
(
resp
,
aeskey
):
resp
=
base64
.
b64decode
(
resp
)
#print(resp)
cipher
=
AES
.
new
(
aeskey
.
encode
(
'utf-8'
),
AES
.
MODE_ECB
)
t
=
cipher
.
decrypt
(
resp
)
print
(
t
.
decode
(
'raw_unicode_escape'
))
def
aaa
():
def
aaa
():
...
...
blueprints/tools/debugtalk.py
View file @
e0b28f11
...
@@ -18,7 +18,7 @@ from blueprints.tools import deals
...
@@ -18,7 +18,7 @@ from blueprints.tools import deals
import
urllib3
import
urllib3
urllib3
.
disable_warnings
()
urllib3
.
disable_warnings
()
def
fakeinfo
(
k
,
config
=
qa3Config
,
flag
=
1
,
rlen
=
8
,
hasphone
=
0
):
def
fakeinfo
(
k
,
config
=
qa3Config
,
flag
=
1
,
rlen
=
8
):
rw
=
rwKeyData
.
rwKeyData
()
rw
=
rwKeyData
.
rwKeyData
()
f
=
faker
.
Faker
(
locale
=
'zh_CN'
)
f
=
faker
.
Faker
(
locale
=
'zh_CN'
)
if
k
==
'username'
:
if
k
==
'username'
:
...
@@ -42,14 +42,25 @@ def fakeinfo(k,config=qa3Config,flag=1,rlen=8,hasphone=0):
...
@@ -42,14 +42,25 @@ def fakeinfo(k,config=qa3Config,flag=1,rlen=8,hasphone=0):
existPhone
=
dealDatabase
.
delDatabase
(
eval
(
config
),
sql
)
existPhone
=
dealDatabase
.
delDatabase
(
eval
(
config
),
sql
)
#print("*****",phone_no)
#print("*****",phone_no)
if
hasphone
:
# if hasphone:
if
existPhone
[
0
]
>
0
:
# if existPhone[0]>0:
rw
.
writeKeyData
(
'baseinfo'
,
'phone_no'
,
phone_no
)
# rw.writeKeyData('baseinfo', 'phone_no', phone_no)
return
phone_no
# return phone_no
else
:
# else:
if
0
==
existPhone
[
0
]:
if
0
==
existPhone
[
0
]:
rw
.
writeKeyData
(
'baseinfo'
,
'phone_no'
,
phone_no
)
rw
.
writeKeyData
(
'baseinfo'
,
'phone_no'
,
phone_no
)
return
phone_no
return
phone_no
if
k
==
'hasphone'
:
sql
=
'select phone_no from xyqb_user.user order by rand() limit 1'
try
:
existPhone
=
dealDatabase
.
delDatabase
(
config
,
sql
)
except
:
existPhone
=
dealDatabase
.
delDatabase
(
eval
(
config
),
sql
)
rw
.
writeKeyData
(
'baseinfo'
,
'phone_no'
,
existPhone
[
0
])
return
existPhone
if
k
==
'idno'
:
if
k
==
'idno'
:
...
...
testCase/ka_koala_repay/790.json
View file @
e0b28f11
...
@@ -30,4 +30,4 @@
...
@@ -30,4 +30,4 @@
"header"
:
{
"header"
:
{
"Content-Type"
:
"application/x-www-form-urlencoded"
"Content-Type"
:
"application/x-www-form-urlencoded"
}
}
}
}
\ No newline at end of file
testCase/usercenter/874.json
View file @
e0b28f11
...
@@ -20,10 +20,10 @@
...
@@ -20,10 +20,10 @@
},
},
"result"
:
{
"result"
:
{
"code"
:
"0"
,
"code"
:
"0"
,
"register"
:
"
fals
e"
"register"
:
"
tru
e"
},
},
"followupWork"
:
{
"followupWork"
:
{
"aftersql"
:
"saveuserId(
\\
'user_id
\\
')"
,
"aftersql"
:
"saveuserId(
\\
'user_id
\\
')"
,
"beforasql"
:
"select id from xyqb_user.user where phone_no='%s'"
"beforasql"
:
"select id from xyqb_user.user where phone_no='%s'"
}
}
}
}
\ No newline at end of file
testCase/usercenter/875.json
View file @
e0b28f11
{
{
"method"
:
"post"
,
"method"
:
"post"
,
"commit"
:
"h5login-zhongtai-
register
(post)"
,
"commit"
:
"h5login-zhongtai-
login
(post)"
,
"url"
:
"/user/login/fastV1"
,
"url"
:
"/user/login/fastV1"
,
"casename"
:
"token"
,
"casename"
:
"token"
,
"body"
:
{
"body"
:
{
...
@@ -16,14 +16,14 @@
...
@@ -16,14 +16,14 @@
},
},
"type"
:
"passportapi"
,
"type"
:
"passportapi"
,
"setup"
:
{
"setup"
:
{
"a"
:
"fakeinfo('
nophone','config=qa3Config','hasphone=1
')"
"a"
:
"fakeinfo('
hasphone','config=qa3Config
')"
},
},
"result"
:
{
"result"
:
{
"code"
:
"0"
,
"code"
:
"0"
,
"register"
:
"
tru
e"
"register"
:
"
fals
e"
},
},
"followupWork"
:
{
"followupWork"
:
{
"aftersql"
:
"saveuserId(
\\
'user_id
\\
')"
,
"aftersql"
:
"saveuserId(
\\
'user_id
\\
')"
,
"beforasql"
:
"select id from xyqb_user.user where phone_no='%s'"
"beforasql"
:
"select id from xyqb_user.user where phone_no='%s'"
}
}
}
}
\ 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