Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tkio-test-case
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liuxiaoxing
tkio-test-case
Commits
4c6eb513
Commit
4c6eb513
authored
May 31, 2022
by
liuxiaoxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asa归因逻辑
parent
3ce488da
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
59 additions
and
66 deletions
+59
-66
click.py
android_click/click.py
+10
-7
android_script.py
android_event/android_script.py
+1
-1
android_fenlianjie.py
android_event_case/android_fenlianjie.py
+5
-5
click.py
ios_click/click.py
+40
-40
attributioncaseios.py
microservices/attributioncaseios.py
+0
-0
receiveios.py
microservices/receiveios.py
+1
-11
redirectios.py
microservices/redirectios.py
+2
-2
No files found.
android_click/click.py
View file @
4c6eb513
...
...
@@ -27,7 +27,9 @@ ry_adplan_name = 'c测试1'
ry_adcreative_name
=
'c测试1'
# bytedance_int 今日头条,kuaishou_int 快手,tencentams_int (新)广点通,rryingxiao_int 人人营销
pid
=
'rryingxiao_int'
URL
=
'http://52.80.137.106:8083/tkio/Nfuuiea?noredirect=true'
URL
=
'http://52.80.137.106:8083/tkio/j2i6rea?noredirect=true'
# URL = 'http://uri6.com/tkio/VF7bqma?noredirect=true'
# 测试头条衍生事件回调时加上
# callback= http%3A%2F%2Fad.toutiao.com%2Ftrack%2Factivate%2F%3Fcallback%3DCKP4rs-Zn4QDEKiQ6teZn4QDGN6L8Y-h9Wcg3ovxj6H1ZyiE0PjgroSEAzAOOM_X-8IDQik0YWY1NzdlOC1lZmViLTRmZDEtYmZkZC00MzE1Zjc1MmJhMGF1NTQ5M0iA0pOtA1AAiAEAkAECmAEA%26os%3D0%26muid%3D
# URL = 'http://uri6.com/adapt/encryp/love.match.set-bytedance?noredirect=true&pid=rryingxiao_int&callback=D8311DBF28D751F327B83F7CEE5B8850B88CC74C8C3FF628EB3A48CAE2212EE260EE347E1771382C5F1B2C0FC9E8921CB5245576D7E5C1EF680315AAA98DCFB189F66FBA49CC7BCB8E4B4726D6D363B816BB2133CADC80B1C12D9FE464A05ED974A70A646BAB1D4D78E2A75361676D5A0D3D4E52B7E7C6B72E9388C17FE9384BE1A47503AABEFB9423727DBAC7B7275AAD237E0E2774D2A8C3D0FDC895CE10C0CCE38F8FEDBC24AF2E23B2B5E742B50C07744361334E148979087917DFFFC445A74B9F939412DEF8D060474E1D353ED7E2EB636B32CADF29842BB90E2131BD3ED05D1A0438EA0EA8577613780B3D64377D85E758A2B20507A034A2C8A96077C7E200C410188C78F76B9B5E7F3E5E4AC3'
...
...
@@ -45,7 +47,8 @@ def computeMD5upper(message):
m
=
hashlib
.
md5
()
m
.
update
(
message
.
encode
(
encoding
=
'utf-8'
))
return
m
.
hexdigest
()
.
upper
()
appkey
=
'1be524b1a26b2f3e0ec8708e12369336'
appkey
=
'6012db28b7fbdfcb1e3a847756137f9b'
lst
=
[]
nowTime
=
datetime
.
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
)
s
=
0
...
...
@@ -95,8 +98,8 @@ for index in range(1):
# "idfa": '583D2BB0-B19C-4A9A-A600-2A1EB2FB7E30',
# 'gxid': '78B5382F687FAD16E75F5DDDC7745013',
# 'caid': '00_A0FF634AEDF1403205A4A6A1118CDA61_A66338F33BEBB40F5CD65F198AF2F40C',
# 'oaid':
'697134960e9ff8df46f21b4f97db595a1'
,
# 'oaid_MD5':
'9f89c84a559f573636a47ff8daed0d33'
,
# 'oaid':
i
,
# 'oaid_MD5':
computeMD5upper(i)
,
'ip'
:
ip
,
# 'pid': pid,
# 'vid': '7653236654354534rffdvdv!@#¥%@测试测试'
...
...
@@ -154,8 +157,8 @@ for index in range(1):
print
(
'imei:'
,
i
)
print
(
'imeimd5:'
,
computeMD5upper
(
i
))
print
(
"ip:"
,
ip
)
print
(
"accountid:"
,
accountid
)
#
print("ip:", ip)
#
print("accountid:", accountid)
print
(
p
.
text
)
print
(
p
.
url
)
# print("oaid:",o)
...
...
@@ -181,7 +184,7 @@ for index in range(1):
except
Exception
:
print
(
'install_wrong:'
,
w
)
#
w = w + 1
w
=
w
+
1
#
#
# time.sleep(5)
...
...
android_event/android_script.py
View file @
4c6eb513
...
...
@@ -8,7 +8,7 @@ headers = {'Content-Type': 'application/json', 'X-RY-Access-Token': 'test_access
# 测试环境
URL_batch
=
'http://10.3.20.42:8080/receive/batch'
# URL = 'http://10.2.20.42:8080/receive/tkio/'
URL
=
'http://52.8
1.116.128:18081
/receive/tkio/'
URL
=
'http://52.8
0.137.106:8080
/receive/tkio/'
# URL = 'http://log.trackingio.com/receive/tkio/'
# URL = 'http://jisulog.sortda.com/receive/tkio/'
...
...
android_event_case/android_fenlianjie.py
View file @
4c6eb513
...
...
@@ -8,7 +8,7 @@ import hashlib
#安卓常规渠道激活
appkey
=
'
1be524b1a26b2f3e0ec8708e12369336
'
appkey
=
'
ce4d9e34a23b8b63e2ddcf4042a38353
'
# 线上预约app
# 7f64fbd64513bc74aa6b5bf753ae0953
# 16dc0cb882d3dbec4f7f66251a84d6dd
...
...
@@ -38,8 +38,8 @@ for index in range(1):
# p = '987654321234567'
# s = '2321321312h8ro321'
#
i = ''.join(str(random.choice(range(10))) for _ in range(12))
i
=
'990993451126'
i
=
''
.
join
(
str
(
random
.
choice
(
range
(
10
)))
for
_
in
range
(
12
))
#
i = '990993451126'
# i = '00000000-0000-0000-0000-000000000000'
# 随机生成ipXXXX XXCB489741-0029-4A35-8E38-D142F836B623
ip
=
socket
.
inet_ntoa
(
struct
.
pack
(
'>I'
,
random
.
randint
(
1
,
0xffffffff
)))
...
...
@@ -48,9 +48,9 @@ for index in range(1):
# 60.13.148.23 新疆维吾尔自治区吐鲁番市
# 61.139.239.255 广西壮族自治区北海市
# 119.60.0.0 宁夏回族自治区银川市
#
allEvent().installUpload(i, ip, appkey)
allEvent
()
.
installUpload
(
i
,
ip
,
appkey
)
# time.sleep(1)
#
allEvent().startupEvent(i, ip, appkey)
allEvent
()
.
startupEvent
(
i
,
ip
,
appkey
)
# # time.sleep(1)
allEvent
()
.
loginEvent
(
i
,
ip
,
appkey
)
# time.sleep(1)
...
...
ios_click/click.py
View file @
4c6eb513
...
...
@@ -5,11 +5,12 @@ import socket
import
struct
import
time
import
string
import
hashlib
#向短链发送点击数据
#渠道短链
#
向短链发送点击数据
#
渠道短链
# URL = 'http://52.80.137.106:8083/tkio/JF7JFja?noredirect=true'
URL
=
'http://uri6.com/tkio/
NJVNjaa?noredirect
=true'
URL
=
'http://uri6.com/tkio/
FFvqUja?noredirect=true&impression
=true'
appkey
=
'017bf97c10d7bc79df1b4ed37e77b283'
# URL = 'http://172.31.19.255:8083/tkio/VNNjQra'
event
=
'invoke'
...
...
@@ -27,19 +28,26 @@ ry_adplan_name = 'ry_adplan_name'
ry_adcreative_name
=
'ry_adcreative_name'
s
=
0
w
=
0
# md5加密
def
computeMD5upper
(
message
):
m
=
hashlib
.
md5
()
m
.
update
(
message
.
encode
(
encoding
=
'utf-8'
))
return
m
.
hexdigest
()
.
upper
()
s
=
0
w
=
0
for
_
in
range
(
1
):
#随机生成12为数组
#
随机生成12为数组
a
=
""
.
join
(
random
.
sample
(
string
.
ascii_letters
+
string
.
digits
,
8
))
b
=
""
.
join
(
random
.
sample
(
string
.
ascii_letters
+
string
.
digits
,
4
))
c
=
""
.
join
(
random
.
sample
(
string
.
ascii_letters
+
string
.
digits
,
4
))
d
=
""
.
join
(
random
.
sample
(
string
.
ascii_letters
+
string
.
digits
,
4
))
e
=
""
.
join
(
random
.
sample
(
string
.
ascii_letters
+
string
.
digits
,
12
))
a
=
""
.
join
(
random
.
sample
(
string
.
ascii_letters
+
string
.
digits
,
8
))
b
=
""
.
join
(
random
.
sample
(
string
.
ascii_letters
+
string
.
digits
,
4
))
c
=
""
.
join
(
random
.
sample
(
string
.
ascii_letters
+
string
.
digits
,
4
))
d
=
""
.
join
(
random
.
sample
(
string
.
ascii_letters
+
string
.
digits
,
4
))
e
=
""
.
join
(
random
.
sample
(
string
.
ascii_letters
+
string
.
digits
,
12
))
i
=
(
a
+
"-"
+
b
+
"-"
+
c
+
"-"
+
d
+
"-"
+
e
)
.
upper
()
i
=
(
a
+
"-"
+
b
+
"-"
+
c
+
"-"
+
d
+
"-"
+
e
)
.
upper
()
# i = '00000000-0000-0000-0000-000000000000'
# i = '8a517deb7c54ac34e4a3e21f84ab6aae84d7696e'
# i = 'IFV_05B50501-E0FC-4B83-BE74-F18ACEDEF37Bwew'
...
...
@@ -48,8 +56,7 @@ for _ in range(1):
p1
=
''
.
join
(
str
(
random
.
choice
(
range
(
10
)))
for
_
in
range
(
12
))
se
=
''
.
join
(
str
(
random
.
choice
(
range
(
10
)))
for
_
in
range
(
12
))
#随机生成ip
# 随机生成ip
ip
=
socket
.
inet_ntoa
(
struct
.
pack
(
'>I'
,
random
.
randint
(
1
,
0xffffffff
)))
# ip = '222.5.94.150'
# mac = '0f607264fc6318a92b9e13c65db7cd3c'
...
...
@@ -59,11 +66,11 @@ for _ in range(1):
# 点击时间
'click_time'
:
str
(
round
(
time
.
time
()
*
1000
)),
'idfa'
:
i
,
# 'idfa_MD5': '4f17acf12727bfb060422996db969365'
,
'idfa_MD5'
:
computeMD5upper
(
i
)
,
# 'idfv': 'IFV_64F5A794-A942-4209-81B0-D28FD01E9287',
# 'oaid_MD5': 'FCAF473729CE701E95A9422F5FBCD607',
# 'muid':i,
# 'oaid':'654324352124312232',
# 'oaid_MD5': 'FCAF473729CE701E95A9422F5FBCD607',
'ip'
:
ip
,
'ua'
:
'Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 SP-engine/2.30.0 baiduboxapp/12.13.0.10 (Baidu; P2 13.6.1)'
,
# ios
...
...
@@ -76,30 +83,31 @@ for _ in range(1):
# "ry_adgroup_id": ry_adgroup_id,
# "ry_adplan_id": ry_adplan_id,
# "ry_adcreative_id": ry_adcreative_id,
#
'mac': mac
#
'mac': mac
}
#timeout可以超时四秒
p
=
requests
.
get
(
url
=
URL
,
params
=
parms
,
timeout
=
4
,
verify
=
False
)
print
(
'success:'
,
s
)
print
(
'idfa:'
,
i
)
print
(
'ip:'
,
ip
)
# timeout可以超时四秒
p
=
requests
.
get
(
url
=
URL
,
params
=
parms
,
timeout
=
4
,
verify
=
False
)
print
(
'success:'
,
s
)
print
(
'idfa:'
,
i
)
print
(
'idfa_MD5:'
,
computeMD5upper
(
i
))
print
(
'ip:'
,
ip
)
# print(p.content)
# print(p.url)
s
=
s
+
1
s
=
s
+
1
except
Exception
as
err
:
print
(
err
)
print
(
'wrong:'
,
w
)
print
(
'wrong:'
,
w
)
print
(
'idfa:'
,
i
)
print
(
'ip'
,
ip
)
w
=
w
+
1
time
.
sleep
(
10
)
try
:
allEvent
()
.
installUpload
(
i
,
ip
,
appkey
)
# allEvent().formevent(i, ip, appkey)
except
Exception
:
print
(
'install_wrong:'
,
w
)
w
=
w
+
1
# time.sleep(10)
# try:
# allEvent().installUpload(i, ip, appkey)
# # allEvent().formevent(i, ip, appkey)
#
# except Exception:
# print('install_wrong:', w)
# w = w + 1
# time.sleep(3)
# try:
# allEvent().adshow(i, ip, appkey,adid)
...
...
@@ -166,11 +174,3 @@ for _ in range(1):
# except Exception:
# print('订单_wrong:', w)
# print("结束时间" + datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S'))
microservices/attributioncaseios.py
View file @
4c6eb513
This diff is collapsed.
Click to expand it.
microservices/receiveios.py
View file @
4c6eb513
...
...
@@ -39,7 +39,7 @@ data = [
"application_info"
:
{
# 线上-
# 测试-
"appkey"
:
"
904305d99f74ce0349b11238f3eeff69
"
,
"appkey"
:
"
2a33891fd3ea53f8edb0fca391a2432e
"
,
"bundleid"
:
"3423232"
,
"app_version"
:
"1.9.0"
,
"channel_name"
:
"default"
...
...
@@ -146,17 +146,7 @@ data = [
"iad_error_info"
:
"xxx"
},
"adservices_info"
:
{
"token"
:
"sbBoZZnCpY3Ps32Xv8K5PhyZtPKxB8i/rmjJfWATPQAuqawcQLalTgJ4Zaa4LzZohZK/bWxWg3TmynLv3XKAO+oTbn7FGmSdYAAAAVADAAAA/QAAAIAjeU4Eb6GRAsnafeLL8Ucpfzz5ErqPpxV4n5SoZ6n3q9U8tYixHXKsOcSFnEjBVYNX60xFABXS62TzYQieVzkjt4vjC6GYedWDX+IuYx7K4p6iUvUg5FAhX6kSeVF627i2Xj6Ie5K7Xi3LSM8uNWvADZQESKvdkWF9CQoNY37dEgAAABJfluG0V1jsF3OcqXJPotzTE1YAAACfAe5iGXrTDo893L1XIXjACtCXvdjaAAAAhgAGP0aWIK/sat96xlkNAzEZ8WJd/AGhKQCKZ7dTc+NvyRyic1WsAryc6dkpfhzKUot2l9wrft8I/+dRLggPPFGTTmgdXzaabldMH4iVdaIRDtVQPsxTQw1naa1ainIrehF/VXVsUgngZ0ONhi01Bqw75hq2yuyWRGb1CXkm0dlCtR8L8DVXAAAAAAAAAAAAAAAAAAABBEYXAAA="
,
"attribution"
:
'true'
,
"orgId"
:
40669820
,
"campaignId"
:
542370539
,
"conversionType"
:
"Download"
,
"clickDate"
:
"2020-04-08T17:17Z"
,
"adGroupId"
:
542317095
,
"countryOrRegion"
:
"US"
,
"keywordId"
:
87675432
,
"adId"
:
542317136
,
"adservices_retry_times"
:
3
,
"adservices_error_info"
:
"xxx"
}
...
...
microservices/redirectios.py
View file @
4c6eb513
...
...
@@ -102,9 +102,9 @@ def send_request(cs):
def
send_request3
(
cs
):
global
parms
# 测试
# url1 = 'http://tmtest.trackingio.com/receive/turl/VVvEz2
a' + cs
url1
=
'http://tmtest.trackingio.com/receive/turl/I3eYve
a'
+
cs
# 线上
url1
=
'http://tkio-redirect.solar-engine.com/receive/turl/f6F7zia'
+
cs
#
url1 = 'http://tkio-redirect.solar-engine.com/receive/turl/f6F7zia' + cs
parms
[
'ts'
]
=
int
(
round
(
time
.
time
()
*
1000
))
response
=
requests
.
get
(
url
=
url1
,
params
=
parms
,
timeout
=
10
,
verify
=
False
)
print
(
response
.
url
)
...
...
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