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
15ed9f4b
Commit
15ed9f4b
authored
Dec 07, 2022
by
liuxiaoxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据处理与归因逻辑优化
parent
6fcb6197
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
376 additions
and
176 deletions
+376
-176
click.py
android_click/click.py
+34
-33
android_script.py
android_event/android_script.py
+4
-4
android_fenlianjie.py
android_event_case/android_fenlianjie.py
+8
-8
click.py
fenbao_android_click/click.py
+15
-15
android_fenlianjie.py
fenbao_android_event_case/android_fenlianjie.py
+6
-6
click.py
ios_click/click.py
+8
-8
ios_script.py
ios_event/ios_script.py
+2
-2
ios_fenlianjie.py
ios_event_case/ios_fenlianjie.py
+2
-2
attributioncase.py
microservices/attributioncase.py
+0
-0
attributioncaseios.py
microservices/attributioncaseios.py
+127
-2
receiveandroid.py
microservices/receiveandroid.py
+5
-6
receiveios.py
microservices/receiveios.py
+2
-2
redirectandroid.py
microservices/redirectandroid.py
+0
-0
redirectios.py
microservices/redirectios.py
+30
-30
attributioncaseandroid.py
tkio/attributioncaseandroid.py
+0
-0
attributioncaseios.py
tkio/attributioncaseios.py
+87
-19
clickandroid.py
tkio/clickandroid.py
+3
-2
clickios.py
tkio/clickios.py
+1
-1
tkioreceive.py
tkio/tkioreceive.py
+3
-3
tkioreceiveandroid.py
tkio/tkioreceiveandroid.py
+3
-3
x_launch.py
xiaochengxu/x_launch.py
+23
-19
xiaochenxu_script.py
xiaochengxu/xiaochenxu_script.py
+13
-11
No files found.
android_click/click.py
View file @
15ed9f4b
...
...
@@ -25,14 +25,14 @@ def code_nums2(n=6):
# from jiami.md5 import get_str_sha1_secret_str
# 向短链发送点击数据
# 广告创意ID
#
ry_adcreative_id = code_nums2(6)
ry_adcreative_id
=
'453282367872
'
ry_adcreative_id
=
code_nums2
(
6
)
# ry_adcreative_id = '384609
'
# 广告组ID
#
ry_adgroup_id = code_nums2(6)
ry_adgroup_id
=
'203346609
'
ry_adgroup_id
=
code_nums2
(
6
)
# ry_adgroup_id = '019750
'
# 广告计划ID
#
ry_adplan_id = code_nums2(6)
ry_adplan_id
=
'7138970403
'
ry_adplan_id
=
code_nums2
(
6
)
# ry_adplan_id = '258640
'
# 广告组名称
ry_adgroup_name
=
'c测试1'
# 广告计划名称
...
...
@@ -41,8 +41,8 @@ ry_adplan_name = 'c测试1'
ry_adcreative_name
=
'c测试1'
# bytedance_int 今日头条,kuaishou_int 快手,tencentams_int (新)广点通,rryingxiao_int 人人营销
pid
=
'rryingxiao_int'
# URL = 'http://uri6.com/tkio/uq2uQn
a?noredirect=true'
URL
=
'http://52.80.137.106:8083/tkio/AZRvA3
a?noredirect=true'
URL
=
'http://uri6.com/tkio/NjeQJj
a?noredirect=true'
# URL = 'http://52.80.137.106:8083/tkio/aI7j6v
a?noredirect=true'
# 测试头条衍生事件回调时加上
# callback= http%3A%2F%2Fad.toutiao.com%2Ftrack%2Factivate%2F%3Fcallback%3DCKP4rs-Zn4QDEKiQ6teZn4QDGN6L8Y-h9Wcg3ovxj6H1ZyiE0PjgroSEAzAOOM_X-8IDQik0YWY1NzdlOC1lZmViLTRmZDEtYmZkZC00MzE1Zjc1MmJhMGF1NTQ5M0iA0pOtA1AAiAEAkAECmAEA%26os%3D0%26muid%3D
...
...
@@ -63,16 +63,16 @@ def computeMD5upper(message):
return
m
.
hexdigest
()
.
upper
()
appkey
=
'
88d7d29c4c7a49d2b5ec8d9723f70eb1
'
appkey
=
'
5076ba423652a3254761d7493d9c80ad
'
lst
=
[]
nowTime
=
datetime
.
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
)
s
=
0
w
=
0
for
index
in
range
(
1
0
):
for
index
in
range
(
1
):
# print("开始时间"+datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S'))
# 随机生成12为数组
i
=
''
.
join
(
str
(
random
.
choice
(
range
(
10
)))
for
_
in
range
(
12
))
# i = '
%*%5323423332233
'
# i = '
A1E36666F0EB4C25
'
o
=
''
.
join
(
str
(
random
.
choice
(
range
(
10
)))
for
_
in
range
(
12
))
m
=
''
.
join
(
str
(
random
.
choice
(
range
(
10
)))
for
_
in
range
(
12
))
se
=
''
.
join
(
str
(
random
.
choice
(
range
(
10
)))
for
_
in
range
(
12
))
...
...
@@ -80,7 +80,7 @@ for index in range(10):
# adid = '5011813780042235'
p1
=
''
.
join
(
str
(
random
.
choice
(
range
(
10
)))
for
_
in
range
(
12
))
accountid
=
''
.
join
(
str
(
random
.
choice
(
range
(
10
)))
for
_
in
range
(
12
))
# accountid = '3
7655892
'
# accountid = '3
83218638957
'
# p1 = '测试一下'
# "idfa": 'B5588C9C-4534-43FB-935D-F17C91622C83',
# "idfa": '00000000-0000-0000-0000-000000000000',
...
...
@@ -134,8 +134,8 @@ for index in range(10):
"ry_adgroup_id"
:
ry_adgroup_id
,
"ry_adplan_id"
:
ry_adplan_id
,
"ry_adcreative_id"
:
ry_adcreative_id
,
# # # 账户id
"accountid"
:
accountid
# # #
#
账户id
"accountid"
:
accountid
,
# 'imei2': 'null',
# 'meid': i
# 'bd_vid': i
...
...
@@ -188,6 +188,7 @@ for index in range(10):
print
(
'success:'
,
s
)
print
(
p
.
status_code
)
print
(
p
.
content
)
print
(
"计划id:"
+
ry_adplan_id
)
# print('androidid:',a)
# print(nowTime)
s
=
s
+
1
...
...
@@ -200,18 +201,18 @@ for index in range(10):
# print('androidid', a)
w
=
w
+
1
#
time.sleep(6)
#
try:
#
allEvent().installUpload(i, ip, appkey)
#
# allEvent().formevent(i, ip, appkey)
#
#
except Exception:
#
print('install_wrong:', w)
#
w = w + 1
time
.
sleep
(
6
)
try
:
allEvent
()
.
installUpload
(
i
,
ip
,
appkey
)
# allEvent().formevent(i, ip, appkey)
except
Exception
:
print
(
'install_wrong:'
,
w
)
w
=
w
+
1
# # # # #
# # # # #
# time.sleep(
10
)
# time.sleep(
6
)
# try:
# allEvent().invoke_test(i, ip, appkey)
# except Exception:
...
...
@@ -268,7 +269,7 @@ for index in range(10):
# try:
# allEvent().appduration(i, ip, appkey,se)
# # allEvent().formevent(i, ip, appkey)
# print("session:"+se)
#
#
print("session:"+se)
# except Exception:
# print('install_wrong:', w)
# w = w + 1
...
...
@@ -287,16 +288,16 @@ for index in range(10):
# print('install_wrong:', w)
# w = w + 1
#
#
num = index + 1
# #
event = 'event_' + str(num)
num
=
index
+
1
event
=
'event_'
+
str
(
num
)
# event = 'event_28'
# time.sleep(3
)
#
try:
#
allEvent().ziding_event(i, ip, appkey, event)
#
print(event)
#
except Exception as err:
#
print(err)
#
print('自定义_wrong:', w)
time
.
sleep
(
2
)
try
:
allEvent
()
.
ziding_event
(
i
,
ip
,
appkey
,
event
)
print
(
event
)
except
Exception
as
err
:
print
(
err
)
print
(
'自定义_wrong:'
,
w
)
# time.sleep(6)
# try:
...
...
android_event/android_script.py
View file @
15ed9f4b
...
...
@@ -10,8 +10,8 @@ headers = {'Content-Type': 'application/json', 'X-RY-Access-Token': 'test_access
# 测试环境
URL_batch
=
'http://10.3.20.42:8080/receive/batch'
# URL = 'http://52.80.137.106:8080/receive/tkio/'
#
URL = 'http://log.trackingio.com/receive/tkio/'
URL
=
'http://jisulog.sortda.com/receive/tkio/'
URL
=
'http://log.trackingio.com/receive/tkio/'
#
URL = 'http://jisulog.sortda.com/receive/tkio/'
# URL = 'http://172.31.21.207:8080/receive/tkio/'
# URL = 'http://120.53.212.71/receive/tkio/'
# 腾迅云tkio http协议的生产地址:
...
...
@@ -80,8 +80,8 @@ class allEvent:
# "_campaignid": 'default',
"_deviceid"
:
i
,
"_imei"
:
i
,
"_meid"
:
'UNKNOWN'
,
"mobdna_info"
:
"{
\"
mobdna_oid
\"
:
\"
95820f88217ec8cbdf621919bb81c0a5
\"
,
\"
mobdna_appkey
\"
:
\"
16dc0cb882d3dbec4f7f66251a84d6dd
\"
,
\"
mobdna_rdid
\"
:
\"
96AD0BC02C70D0BA5C446C12580E3800
\"
,
\"
mobdna_requestid
\"
:
\"
463cfd5564d24d30a607a18a1e8ae2d8
\"
}"
,
# "_meid":i
,
#
"mobdna_info": "{\"mobdna_oid\":\"95820f88217ec8cbdf621919bb81c0a5\",\"mobdna_appkey\":\"16dc0cb882d3dbec4f7f66251a84d6dd\",\"mobdna_rdid\":\"96AD0BC02C70D0BA5C446C12580E3800\",\"mobdna_requestid\":\"463cfd5564d24d30a607a18a1e8ae2d8\"}",
'_oaid'
:
i
,
# "_rdid": '09DA91D0664C33DA7BEE7294CCCCCA07',
# 'ua': 'Mozilla/5.0 (Linux; U; Android 7.0; zh-CN; Nexus 5X Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/40.0.2214.89 UCBrowser/11.4.5.937 Mobile Safari/537.36',
...
...
android_event_case/android_fenlianjie.py
View file @
15ed9f4b
...
...
@@ -10,7 +10,7 @@ import hashlib
#安卓常规渠道激活
appkey
=
'
83c18356b6ab202f007565b821e43e10
'
appkey
=
'
16dc0cb882d3dbec4f7f66251a84d6dd
'
# 线上预约app
# 7f64fbd64513bc74aa6b5bf753ae0953
# 16dc0cb882d3dbec4f7f66251a84d6dd
...
...
@@ -30,7 +30,7 @@ appkey = '83c18356b6ab202f007565b821e43e10'
# allEvent().payEvent(i, ip, appkey)
# print("开始时间"+datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S'))
for
index
in
range
(
1
):
for
index
in
range
(
40
):
# 随机生成12为数组
s
=
''
.
join
(
str
(
random
.
choice
(
range
(
10
)))
for
_
in
range
(
18
))
p
=
''
.
join
(
str
(
random
.
choice
(
range
(
10
)))
for
_
in
range
(
12
))
...
...
@@ -41,7 +41,7 @@ for index in range(1):
# p = '987654321234567'
# s = '2321321312h8ro321'
i
=
''
.
join
(
str
(
random
.
choice
(
range
(
10
)))
for
_
in
range
(
12
))
# i = '
778980150907
'
# i = '
315141921832
'
# i = '00000000-0000-0000-0000-000000000000'
# 随机生成ipXXXX XXCB489741-0029-4A35-8E38-D142F836B623
ip
=
socket
.
inet_ntoa
(
struct
.
pack
(
'>I'
,
random
.
randint
(
1
,
0xffffffff
)))
...
...
@@ -63,10 +63,10 @@ for index in range(1):
# time.sleep(1)
# allEvent().payorder(i, ip, appkey)
# time.sleep(1)
#
num = index + 1
#
event = 'event_' + str(num)
#
#
event = 'event_5'
#
allEvent().ziding_event(i, ip, appkey, event)
num
=
index
+
1
event
=
'event_'
+
str
(
num
)
# event = 'event_5'
allEvent
()
.
ziding_event
(
i
,
ip
,
appkey
,
event
)
# print(s)
# s = int(s) + 1
# time.sleep(3)
...
...
@@ -81,7 +81,7 @@ for index in range(1):
# allEvent().batchUpload(i,ip,appkey)
# allEvent().H5download(i,ip,appkey)
# # time.sleep(1)
allEvent
()
.
H5pv
(
i
,
ip
,
appkey
)
#
allEvent().H5pv(i,ip,appkey)
# # time.sleep(1)
# #
# allEvent().H5su(i,ip,appkey)
...
...
fenbao_android_click/click.py
View file @
15ed9f4b
...
...
@@ -9,11 +9,11 @@ import time
#!!!!分包需要删掉https的s
# URL = 'http://uri6.com/tkio/3uu6rya?noredirect=true'
URL
=
'http://52.80.137.106:8083/tkio/
RvYNJn
a?noredirect=true'
URL
=
'http://52.80.137.106:8083/tkio/
NjiYvu
a?noredirect=true'
appkey
=
'
5b0e99269160e67ef8e560716221e142
'
appkey
=
'
345b0e19ef25ab3e7cc46770c2f16a3b
'
# event = 'invoke'
cmpaignid
=
'11
1
'
cmpaignid
=
'11
2233
'
# 广告创意ID
ry_adcreative_id
=
'9876543'
# 广告组ID
...
...
@@ -29,7 +29,7 @@ ry_adcreative_name = '广告创意'
s
=
0
w
=
0
for
index
in
range
(
1
):
for
index
in
range
(
40
):
#随机生成12为数组
i
=
''
.
join
(
str
(
random
.
choice
(
range
(
10
)))
for
_
in
range
(
12
))
...
...
@@ -103,19 +103,19 @@ for index in range(1):
# allEvent().loginEvent(i, ip, appkey)
# except Exception:
# print('登录_wrong:', w)
time
.
sleep
(
5
)
try
:
allEvent
()
.
payEvent
(
i
,
ip
,
appkey
)
except
Exception
:
print
(
'付费_wrong:'
,
w
)
# num = index + 1
# event = 'event_' + str(num)
# event = 'event_28'
# time.sleep(3)
# time.sleep(5)
# try:
# allEvent().
ziding_event(i, ip, appkey,event
)
# allEvent().
payEvent(i, ip, appkey
)
# except Exception:
# print('自定义_wrong:', w)
# print('付费_wrong:', w)
num
=
index
+
1
event
=
'event_'
+
str
(
num
)
# event = 'event_28'
time
.
sleep
(
2
)
try
:
allEvent
()
.
ziding_event
(
i
,
ip
,
appkey
,
event
)
except
Exception
:
print
(
'自定义_wrong:'
,
w
)
...
...
fenbao_android_event_case/android_fenlianjie.py
View file @
15ed9f4b
...
...
@@ -5,23 +5,23 @@ import random
import
time
import
time
#安卓分包激活
appkey
=
'
f461b1ab7aca6fdf3fa719bf4b6af863
'
appkey
=
'
345b0e19ef25ab3e7cc46770c2f16a3b
'
#57ed2dd31596bb4682471e82c0c73c1a
# 4b25b8a4dc584e63e9a7b81c3adedf2f
# event = 'event_10'
cmpaignid
=
'11
11
'
cmpaignid
=
'11
22
'
for
index
in
range
(
1
):
# 随机生成12为数组
i
=
''
.
join
(
str
(
random
.
choice
(
range
(
10
)))
for
_
in
range
(
12
))
# i = 'q27dux0c9d5mv9413cp903d07a8q1ipf
'
#
i = ''.join(str(random.choice(range(10))) for _ in range(12))
i
=
'189894848469
'
# 随机生成ip
ip
=
socket
.
inet_ntoa
(
struct
.
pack
(
'>I'
,
random
.
randint
(
1
,
0xffffffff
)))
# ip = '143.205.125.236'
allEvent
()
.
installUpload
(
i
,
ip
,
appkey
,
cmpaignid
)
#
allEvent().installUpload(i, ip, appkey, cmpaignid)
# time.sleep(3)
#
allEvent().loginEvent(i, ip, appkey)
allEvent
()
.
loginEvent
(
i
,
ip
,
appkey
)
# allEvent().orderEvent(i, ip, appkey)
# time.sleep(1)
# num = index + 1
...
...
ios_click/click.py
View file @
15ed9f4b
...
...
@@ -100,14 +100,14 @@ for _ in range(1):
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)
...
...
ios_event/ios_script.py
View file @
15ed9f4b
...
...
@@ -8,8 +8,8 @@ import random
headers
=
{
'Content-Type'
:
'application/json'
}
# URL = 'http://10.2.20.42:8080/receive/tkio/'
URL
=
'http://52.80.137.106:8080/receive/tkio/'
#
URL = 'http://log.trackingio.com/receive/tkio/'
#
URL = 'http://52.80.137.106:8080/receive/tkio/'
URL
=
'http://log.trackingio.com/receive/tkio/'
# URL = 'http://jisulog.sortda.com/receive/tkio/'
#时间戳
...
...
ios_event_case/ios_fenlianjie.py
View file @
15ed9f4b
...
...
@@ -6,7 +6,7 @@ import string
import
time
#iOS常规渠道激活
appkey
=
'
0ecc232109dc25bfedff8aba06271539
'
appkey
=
'
60763edf19602c0fa27b967c282fe805
'
event
=
'event_1'
for
index
in
range
(
5
):
...
...
@@ -40,7 +40,7 @@ for index in range(5):
# # event = 'event_' + str(num)
# event = 'event_1'
# allEvent().ziding_event(i, ip, appkey, event)
print
(
event
)
#
print(event)
# allEvent().adshow(i,ip,appkey,adid)
# allEvent().adclick(i,ip,appkey,adid)
# allEvent().pageduration(i,ip,appkey,se,p)
...
...
microservices/attributioncase.py
View file @
15ed9f4b
This diff is collapsed.
Click to expand it.
microservices/attributioncaseios.py
View file @
15ed9f4b
...
...
@@ -24,6 +24,20 @@ def computeMD5upper(message):
return
m
.
hexdigest
()
.
upper
()
n
=
10
def
code_nums
(
n
=
6
):
ret
=
''
for
i
in
range
(
n
):
num
=
random
.
randint
(
0
,
9
)
letter
=
chr
(
random
.
randint
(
97
,
122
))
s
=
str
(
random
.
choice
([
num
,
letter
]))
ret
+=
s
return
ret
def
idfacode
():
ret
=
''
a
=
""
.
join
(
random
.
sample
(
string
.
ascii_letters
+
string
.
digits
,
8
))
...
...
@@ -1922,6 +1936,9 @@ def test_impatb9():
# 1.传一个激活,google自归因查询为true,2.last touch来自google渠道
# 归因为google,并通知google
# google归因
...
...
@@ -1973,8 +1990,8 @@ def test_atbgoogle2():
# asa激活
def
test_atbgoogle3
():
i
=
idfacode
()
# i = '3C3FA051-DB2A-4F4F-9154-BC15EF565750
'
#
i = idfacode()
i
=
'9C3FA051-DB2A-4F4F-9154-BC15EF565773
'
v
=
idfvcode
()
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
i
receiveios
.
data
[
0
][
'timestamp_info'
][
'current_event_time'
]
=
'1659148260199'
...
...
@@ -2023,6 +2040,8 @@ def test_atbgoogle4():
print
(
i
)
#激活中idfa为空
def
test_atbgoogle5
():
i2
=
idfacode
()
...
...
@@ -2049,4 +2068,110 @@ def test_atbgoogle5():
# -------------------数据处理与归因逻辑优化----------------------
def
test_at_newipv4
():
i
=
idfacode
()
v
=
idfvcode
()
redirectios
.
parms
[
'ipv4'
]
=
ip
redirectios
.
parms
[
'idfa'
]
=
code_nums
(
37
)
redirectios
.
parms
[
'idfa_md5'
]
=
code_nums
(
33
)
redirectios
.
parms
[
'idfv'
]
=
code_nums
(
37
)
redirectios
.
parms
[
'idfv_md5'
]
=
code_nums
(
33
)
redirectios
.
parms
[
'is_s2s'
]
=
'1'
redirectios
.
parms
[
'touchpoint_type'
]
=
'click'
redirectios
.
parms
[
'attribution_type'
]
=
'ua'
redirectios
.
send_request3
(
''
)
time
.
sleep
(
3
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
i
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
''
receiveios
.
data
[
0
][
'device_info'
][
'idfv'
]
=
v
receiveios
.
data
[
0
][
'device_info'
][
'idfv_md5'
]
=
computeMD5
(
v
)
receiveios
.
data
[
0
][
'device_info'
][
'device_id'
]
=
i
receiveios
.
data
[
0
][
'device_info'
][
'device_id_md5'
]
=
''
receiveios
.
data
[
0
][
'device_info'
][
'device_id_type'
]
=
'idfa'
receiveios
.
data
[
0
][
'device_info'
][
'device_id_md5_type'
]
=
''
receiveios
.
data
[
0
][
'device_info'
][
'ipv4'
]
=
ip
receiveios
.
send_request
()
print
(
i
)
def
test_at_newidfa
():
i
=
idfacode
()
v
=
idfvcode
()
redirectios
.
parms
[
'ipv4'
]
=
code_nums
(
129
)
redirectios
.
parms
[
'idfa'
]
=
i
redirectios
.
parms
[
'idfa_md5'
]
=
code_nums
(
33
)
redirectios
.
parms
[
'idfv'
]
=
code_nums
(
37
)
redirectios
.
parms
[
'idfv_md5'
]
=
code_nums
(
33
)
redirectios
.
parms
[
'is_s2s'
]
=
'1'
redirectios
.
parms
[
'touchpoint_type'
]
=
'click'
redirectios
.
parms
[
'attribution_type'
]
=
'ua'
redirectios
.
send_request3
(
''
)
time
.
sleep
(
3
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
i
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
''
receiveios
.
data
[
0
][
'device_info'
][
'idfv'
]
=
v
receiveios
.
data
[
0
][
'device_info'
][
'idfv_md5'
]
=
computeMD5
(
v
)
receiveios
.
data
[
0
][
'device_info'
][
'device_id'
]
=
i
receiveios
.
data
[
0
][
'device_info'
][
'device_id_md5'
]
=
''
receiveios
.
data
[
0
][
'device_info'
][
'device_id_type'
]
=
'idfa'
receiveios
.
data
[
0
][
'device_info'
][
'device_id_md5_type'
]
=
''
receiveios
.
data
[
0
][
'device_info'
][
'ipv4'
]
=
ip
receiveios
.
send_request
()
time
.
sleep
(
6
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
i
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
''
receiveios
.
data
[
0
][
'device_info'
][
'idfv'
]
=
v
receiveios
.
data
[
0
][
'device_info'
][
'idfv_md5'
]
=
computeMD5
(
v
)
receiveios
.
data
[
0
][
'device_info'
][
'device_id'
]
=
i
receiveios
.
data
[
0
][
'device_info'
][
'device_id_md5'
]
=
''
receiveios
.
data
[
0
][
'device_info'
][
'device_id_type'
]
=
'idfa'
receiveios
.
data
[
0
][
'device_info'
][
'device_id_md5_type'
]
=
''
receiveios
.
data
[
0
][
'device_info'
][
'ipv4'
]
=
ip
receiveios
.
data
[
0
][
"event_info"
][
'event_name'
]
=
'register'
receiveios
.
data
[
0
][
"event_info"
][
'event_type'
]
=
'preset'
receiveios
.
send_request
()
print
(
i
)
def
test_at_newidfa_md5
():
i
=
idfacode
()
i2
=
code_nums
(
32
)
v
=
idfvcode
()
redirectios
.
parms
[
'ipv4'
]
=
code_nums
(
129
)
redirectios
.
parms
[
'idfa'
]
=
code_nums
(
37
)
redirectios
.
parms
[
'idfa_md5'
]
=
i2
redirectios
.
parms
[
'idfv'
]
=
code_nums
(
37
)
redirectios
.
parms
[
'idfv_md5'
]
=
code_nums
(
33
)
redirectios
.
parms
[
'is_s2s'
]
=
'1'
redirectios
.
parms
[
'touchpoint_type'
]
=
'click'
redirectios
.
parms
[
'attribution_type'
]
=
'ua'
redirectios
.
send_request3
(
''
)
time
.
sleep
(
3
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
i
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
i2
receiveios
.
data
[
0
][
'device_info'
][
'idfv'
]
=
v
receiveios
.
data
[
0
][
'device_info'
][
'idfv_md5'
]
=
computeMD5
(
v
)
receiveios
.
data
[
0
][
'device_info'
][
'device_id'
]
=
i
receiveios
.
data
[
0
][
'device_info'
][
'device_id_md5'
]
=
i2
receiveios
.
data
[
0
][
'device_info'
][
'device_id_type'
]
=
'idfa'
receiveios
.
data
[
0
][
'device_info'
][
'device_id_md5_type'
]
=
'idfa_md5'
receiveios
.
data
[
0
][
'device_info'
][
'ipv4'
]
=
ip
receiveios
.
send_request
()
print
(
i
)
# -------------------------所以设备都非法-------------------------
def
test_at_newclick1
():
i
=
idfacode
()
v
=
idfvcode
()
redirectios
.
parms
[
'ipv4'
]
=
code_nums
(
129
)
redirectios
.
parms
[
'idfa'
]
=
code_nums
(
37
)
redirectios
.
parms
[
'idfa_md5'
]
=
code_nums
(
33
)
redirectios
.
parms
[
'idfv'
]
=
code_nums
(
37
)
redirectios
.
parms
[
'idfv_md5'
]
=
code_nums
(
33
)
redirectios
.
parms
[
'is_s2s'
]
=
'1'
redirectios
.
parms
[
'touchpoint_type'
]
=
'click'
redirectios
.
parms
[
'attribution_type'
]
=
'ua'
redirectios
.
send_request3
(
''
)
microservices/receiveandroid.py
View file @
15ed9f4b
...
...
@@ -46,7 +46,7 @@ global data
data
=
[
{
"application_info"
:
{
"appkey"
:
"
666
"
,
"appkey"
:
"
111
"
,
"bundleid"
:
"3423232"
,
"app_version"
:
"1"
,
"channel_name"
:
"HUAWEI"
...
...
@@ -137,9 +137,9 @@ def send_request():
# 对接se地址
# url = 'http://tmtest-se.trackingio.com/receive/tkiov2/sdk'
# 测试
url
=
"http://tmtest.trackingio.com/receive/tkiov2/sdk"
#
url = "http://tmtest.trackingio.com/receive/tkiov2/sdk"
# 线上
#
url = "http://tkio-receive.solar-engine.com/receive/tkiov2/sdk"
url
=
"http://tkio-receive.solar-engine.com/receive/tkiov2/sdk"
data
[
0
][
'timestamp_info'
][
'install_time'
]
=
int
(
round
(
time
.
time
()
*
1000
))
print
(
data
)
response
=
requests
.
request
(
"POST"
,
url
,
headers
=
headers
,
data
=
json
.
dumps
(
data
))
...
...
@@ -193,9 +193,9 @@ def send_requestgoogle():
# 对接se地址
# url = 'http://tmtest-se.trackingio.com/receive/tkiov2/sdk'
# 测试
url
=
"http://tmtest.trackingio.com/receive/tkiov2/sdk"
#
url = "http://tmtest.trackingio.com/receive/tkiov2/sdk"
# 线上
#
url = "http://tkio-receive.solar-engine.com/receive/tkiov2/sdk"
url
=
"http://tkio-receive.solar-engine.com/receive/tkiov2/sdk"
print
(
data
)
response
=
requests
.
request
(
"POST"
,
url
,
headers
=
headers
,
data
=
json
.
dumps
(
data
))
...
...
@@ -1259,7 +1259,6 @@ def test_event_name1():
# event_type为custom
def
test_event_name2
():
# lst = []
newList
=
[
'222'
,
'wwqeWEW'
,
'We2_32e'
]
for
event
in
newList
:
data
[
0
][
"event_info"
][
'event_name'
]
=
event
...
...
microservices/receiveios.py
View file @
15ed9f4b
...
...
@@ -193,9 +193,9 @@ def send_requestgoogle():
# 对接se地址
# url = 'http://tmtest-se.trackingio.com/receive/tkiov2/sdk'
# 测试
#
url = "http://tmtest.trackingio.com/receive/tkiov2/sdk"
url
=
"http://tmtest.trackingio.com/receive/tkiov2/sdk"
# 线上
url
=
"http://tkio-receive.solar-engine.com/receive/tkiov2/sdk"
#
url = "http://tkio-receive.solar-engine.com/receive/tkiov2/sdk"
data
[
0
][
'timestamp_info'
][
'install_time'
]
=
int
(
round
(
time
.
time
()
*
1000
))
# data[0]['timestamp_info']['current_event_time'] = int(round(time.time() * 1000))
...
...
microservices/redirectandroid.py
View file @
15ed9f4b
This diff is collapsed.
Click to expand it.
microservices/redirectios.py
View file @
15ed9f4b
...
...
@@ -104,9 +104,9 @@ def send_request(cs):
def
send_request3
(
cs
):
global
parms
# 测试
# url1 = 'http://tmtest.trackingio.com/receive/turl/uaa6N3
a' + cs
url1
=
'http://tmtest.trackingio.com/receive/turl/vMjIBz
a'
+
cs
# 线上
url1
=
'http://tkio-redirect.solar-engine.com/receive/turl/6Z3Yrya'
+
cs
#
url1 = 'http://tkio-redirect.solar-engine.com/receive/turl/6Z3Yrya' + cs
parms
[
'ts'
]
=
int
(
round
(
time
.
time
()
*
1000
))
response
=
requests
.
get
(
url
=
url1
,
params
=
parms
,
timeout
=
10
,
verify
=
False
)
print
(
response
.
url
)
...
...
@@ -149,10 +149,10 @@ def test_idfa3():
# idfa非32字符
def
test_idfa4
():
parms
[
'idfa'
]
=
zf35
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
124
#
def test_idfa4():
#
parms['idfa'] = zf35
#
re = send_request('')
#
assert re["status"] == 124
# idfa_md5为空
...
...
@@ -177,10 +177,10 @@ def test_idfa_md53():
# idfa_md5非32字符
def
test_idfa_md54
():
parms
[
'idfa_md5'
]
=
zf35
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
187
#
def test_idfa_md54():
#
parms['idfa_md5'] = zf35
#
re = send_request('')
#
assert re["status"] == 187
# idfv和idfv_md5同上
...
...
@@ -206,10 +206,10 @@ def test_idfv3():
# idfv非32字符
def
test_idfv4
():
parms
[
'idfv'
]
=
zf35
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
125
#
def test_idfv4():
#
parms['idfv'] = zf35
#
re = send_request('')
#
assert re["status"] == 125
...
...
@@ -235,10 +235,10 @@ def test_idfv_md53():
# idfv_md5非32字符
def
test_idfv_md54
():
parms
[
'idfv_md5'
]
=
zf35
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
188
#
def test_idfv_md54():
#
parms['idfv_md5'] = zf35
#
re = send_request('')
#
assert re["status"] == 188
...
...
@@ -246,21 +246,21 @@ def test_idfv_md54():
def
test_oaid
():
parms
[
'oaid'
]
=
'3DEA635F-B24F-434B-833F-4ED028FEAEE'
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
115
assert
re
[
"status"
]
==
219
# 短链是ios,传oaid_md5
def
test_oaid_md5
():
parms
[
'oaid_md5'
]
=
'8e488a40a17aed2f6752f51382a4eafc'
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
115
assert
re
[
"status"
]
==
219
# 短链是ios,传imei1
def
test_imei1
():
parms
[
'imei1'
]
=
'8342732742383'
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
115
assert
re
[
"status"
]
==
219
...
...
@@ -268,35 +268,35 @@ def test_imei1():
def
test_imei1_md5
():
parms
[
'imei1_md5'
]
=
'8e488a40a17aed2f6752f51382a4eafc'
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
115
assert
re
[
"status"
]
==
219
# 短链是ios,传imei2
def
test_imei2
():
parms
[
'imei2'
]
=
'8342732742383'
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
115
assert
re
[
"status"
]
==
219
# 短链是ios,传imei2_md5
def
test_imei2_md5
():
parms
[
'imei2_md5'
]
=
'8e488a40a17aed2f6752f51382a4eafc'
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
115
assert
re
[
"status"
]
==
219
# 短链是ios,传gaid
def
test_gaid
():
parms
[
'gaid'
]
=
'B21C5EC5-9921-42FD-AAC5-07A0EB6CF1A0'
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
115
assert
re
[
"status"
]
==
219
# 短链是ios,传gaid_md5
def
test_gaid_md5
():
parms
[
'gaid_md5'
]
=
'8e488a40a17aed2f6752f51382a4eafc'
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
115
assert
re
[
"status"
]
==
219
...
...
@@ -304,7 +304,7 @@ def test_gaid_md5():
def
test_mac
():
parms
[
'mac'
]
=
'B21C5EC5-9921-42FD-AAC5-07A0EB6CF1A0'
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
115
assert
re
[
"status"
]
==
219
...
...
@@ -312,14 +312,14 @@ def test_mac():
def
test_mac_md5
():
parms
[
'mac_md5'
]
=
'8e488a40a17aed2f6752f51382a4eafc'
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
115
assert
re
[
"status"
]
==
219
# 短链是ios,传android_id
def
test_android_id
():
parms
[
'android_id'
]
=
'1a34fc556a43c453'
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
115
assert
re
[
"status"
]
==
219
...
...
@@ -327,7 +327,7 @@ def test_android_id():
def
test_android_id_md5
():
parms
[
'android_id'
]
=
'8e488a40a17aed2f6752f51382a4eafc'
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
115
assert
re
[
"status"
]
==
219
...
...
tkio/attributioncaseandroid.py
View file @
15ed9f4b
This diff is collapsed.
Click to expand it.
tkio/attributioncaseios.py
View file @
15ed9f4b
...
...
@@ -42,17 +42,31 @@ def computeMD5upper(message):
return
m
.
hexdigest
()
.
upper
()
# md5加密转
xiao
写
# md5加密转
小
写
def
computeMD5lower
(
message
):
m
=
hashlib
.
md5
()
m
.
update
(
message
.
encode
(
encoding
=
'utf-8'
))
return
m
.
hexdigest
()
# SHA加密
def
computesha
(
message
):
sha
=
hashlib
.
sha1
(
message
.
encode
(
'utf-8'
))
encrypts
=
sha
.
hexdigest
()
print
(
encrypts
)
return
encrypts
# 生成小写字母加数字组合
n
=
10
def
test_sha1
():
computesha
(
"111"
)
def
code_nums1
(
n
=
6
):
ret
=
''
for
i
in
range
(
n
):
...
...
@@ -194,9 +208,9 @@ def test_at6():
clickios
.
parms
[
'ip'
]
=
ip
clickios
.
parms
[
'caid1'
]
=
caid
clickios
.
parms
[
'caid2'
]
=
caid2
#
clickios.send_requestandroid('')
clickios
.
send_requestandroid
(
'&preorder=true'
)
time
.
sleep
(
5
)
clickios
.
send_requestandroid
(
''
)
#
clickios.send_requestandroid('&preorder=true')
time
.
sleep
(
6
)
tkioreceive
.
data
[
'context'
][
'_deviceid'
]
=
i2
tkioreceive
.
data
[
'context'
][
'_idfa'
]
=
i2
tkioreceive
.
data
[
'context'
][
'_ip'
]
=
ip
...
...
@@ -218,8 +232,8 @@ def test_at7():
clickios
.
parms
[
'ip'
]
=
ip
clickios
.
parms
[
'caid1'
]
=
caid
clickios
.
parms
[
'caid2'
]
=
caid2
#
clickios.send_requestandroid('')
clickios
.
send_requestandroid
(
'&preorder=true'
)
clickios
.
send_requestandroid
(
''
)
#
clickios.send_requestandroid('&preorder=true')
time
.
sleep
(
5
)
tkioreceive
.
data
[
'context'
][
'_deviceid'
]
=
i2
...
...
@@ -243,8 +257,8 @@ def test_at8():
clickios
.
parms
[
'ip'
]
=
ip
clickios
.
parms
[
'caid1'
]
=
caid
clickios
.
parms
[
'caid2'
]
=
caid2
#
clickios.send_requestandroid('')
clickios
.
send_requestandroid
(
'&preorder=true'
)
clickios
.
send_requestandroid
(
''
)
#
clickios.send_requestandroid('&preorder=true')
time
.
sleep
(
5
)
tkioreceive
.
data
[
'context'
][
'_deviceid'
]
=
i2
...
...
@@ -268,8 +282,8 @@ def test_at9():
clickios
.
parms
[
'ip'
]
=
ip
clickios
.
parms
[
'caid1'
]
=
caid
clickios
.
parms
[
'caid2'
]
=
caid2
#
clickios.send_requestandroid('')
clickios
.
send_requestandroid
(
'&preorder=true'
)
clickios
.
send_requestandroid
(
''
)
#
clickios.send_requestandroid('&preorder=true')
time
.
sleep
(
6
)
tkioreceive
.
data
[
'context'
][
'_deviceid'
]
=
i2
...
...
@@ -347,7 +361,7 @@ def test_at12():
clickios
.
parms
[
'caid1'
]
=
caid
clickios
.
parms
[
'caid2'
]
=
caid2
clickios
.
send_requestandroid
(
''
)
time
.
sleep
(
5
)
time
.
sleep
(
6
)
tkioreceive
.
data
[
'context'
][
'_deviceid'
]
=
i2
tkioreceive
.
data
[
'context'
][
'_idfa'
]
=
i2
tkioreceive
.
data
[
'context'
][
'_ip'
]
=
ip
...
...
@@ -370,8 +384,8 @@ def test_at13():
clickios
.
parms
[
'ip'
]
=
ip
clickios
.
parms
[
'caid1'
]
=
computeMD5upper
(
caid
)
clickios
.
parms
[
'caid2'
]
=
caid2
#
clickios.send_requestandroid('')
clickios
.
send_requestandroid
(
'&preorder=true'
)
clickios
.
send_requestandroid
(
''
)
#
clickios.send_requestandroid('&preorder=true')
time
.
sleep
(
6
)
tkioreceive
.
data
[
'context'
][
'_deviceid'
]
=
i2
...
...
@@ -448,8 +462,8 @@ def test_at16():
clickios
.
parms
[
'ip'
]
=
ip
clickios
.
parms
[
'caid1'
]
=
''
clickios
.
parms
[
'caid2'
]
=
caid
#
clickios.send_requestandroid('')
clickios
.
send_requestandroid
(
'&preorder=true'
)
clickios
.
send_requestandroid
(
''
)
#
clickios.send_requestandroid('&preorder=true')
time
.
sleep
(
6
)
tkioreceive
.
data
[
'context'
][
'_deviceid'
]
=
i2
...
...
@@ -511,7 +525,7 @@ def test_at18():
clickios
.
parms
[
'caid1'
]
=
''
clickios
.
parms
[
'caid2'
]
=
caid
clickios
.
send_requestandroid
(
''
)
time
.
sleep
(
5
)
time
.
sleep
(
6
)
tkioreceive
.
data
[
'context'
][
'_deviceid'
]
=
i2
tkioreceive
.
data
[
'context'
][
'_idfa'
]
=
i2
tkioreceive
.
data
[
'context'
][
'_ip'
]
=
ip
...
...
@@ -541,7 +555,7 @@ def test_at19():
clickios
.
parms
[
'caid1'
]
=
''
clickios
.
parms
[
'caid2'
]
=
caid
clickios
.
send_requestandroid
(
''
)
time
.
sleep
(
5
)
time
.
sleep
(
6
)
tkioreceive
.
data
[
'context'
][
'_deviceid'
]
=
i2
tkioreceive
.
data
[
'context'
][
'_idfa'
]
=
i2
tkioreceive
.
data
[
'context'
][
'_ip'
]
=
ip
...
...
@@ -929,4 +943,59 @@ def test_firstclick():
print
(
i
)
print
(
i2
)
print
(
ip1
)
print
(
ip2
)
\ No newline at end of file
print
(
ip2
)
# jointype-归因方式补充
# sha idfa 暂时无法归因
def
test_sha
():
i
=
idfacode
()
i2
=
idfacode
()
caid
=
code_nums1
(
32
)
ip
=
socket
.
inet_ntoa
(
struct
.
pack
(
'>I'
,
random
.
randint
(
1
,
0xffffffff
)))
clickios
.
parms
[
'idfa_MD5'
]
=
computesha
(
i
)
clickios
.
parms
[
'idfa'
]
=
''
clickios
.
parms
[
'ip'
]
=
ip
clickios
.
parms
[
'caid1'
]
=
caid
clickios
.
send_requestandroid
(
''
)
# clickios.send_requestandroid('&preorder=true')
time
.
sleep
(
6
)
tkioreceive
.
data
[
'context'
][
'_deviceid'
]
=
i
tkioreceive
.
data
[
'context'
][
'_idfa'
]
=
i
tkioreceive
.
data
[
'context'
][
'_ip'
]
=
ip
tkioreceive
.
data
[
'context'
][
'_caid'
]
=
caid
tkioreceive
.
send_request
()
print
(
i
)
print
(
ip
)
# no_line_idfa
def
test_no_line_idfa
():
i
=
'ZRNDIT5KU5OHWXAUVZL5AQWOTIRB2CY2'
i2
=
'ZRNDIT5K-U5OH-WXAU-VZL5-AQWOTIRB2CY2'
caid
=
code_nums1
(
36
)
ip1
=
socket
.
inet_ntoa
(
struct
.
pack
(
'>I'
,
random
.
randint
(
1
,
0xffffffff
)))
clickios
.
parms
[
'idfa'
]
=
i
clickios
.
parms
[
'ip'
]
=
ip1
clickios
.
parms
[
'caid1'
]
=
caid
clickios
.
send_requestandroid
(
''
)
# clickios.send_requestandroid('&preorder=true')
time
.
sleep
(
6
)
tkioreceive
.
data
[
'context'
][
'_deviceid'
]
=
i2
tkioreceive
.
data
[
'context'
][
'_idfa'
]
=
i2
tkioreceive
.
data
[
'context'
][
'_ip'
]
=
ip1
tkioreceive
.
data
[
'context'
][
'_caid'
]
=
caid
tkioreceive
.
send_request
()
print
(
i
)
print
(
ip1
)
tkio/clickandroid.py
View file @
15ed9f4b
...
...
@@ -34,11 +34,12 @@ parms = {
def
send_requestandroid
(
hc
):
url1
=
'http://52.80.137.106:8083/tkio/MfyEzya?noredirect=true'
+
hc
# url1 = 'http://uri6.com/tkio/26rQJz
a?noredirect=true' + hc
#
url1 = 'http://52.80.137.106:8083/tkio/MfyEzya?noredirect=true' + hc
url1
=
'http://uri6.com/tkio/bmEJre
a?noredirect=true'
+
hc
response
=
requests
.
get
(
url
=
url1
,
params
=
parms
,
timeout
=
10
,
verify
=
False
)
print
(
response
.
text
)
print
(
url1
)
print
(
parms
)
return
response
...
...
tkio/clickios.py
View file @
15ed9f4b
...
...
@@ -33,7 +33,7 @@ parms = {
def
send_requestandroid
(
hc
):
# url1 = 'http://52.80.137.106:8083/tkio/F3QVrqa?noredirect=true' + hc
url1
=
'http://uri6.com/tkio/
uUFN7
fa?noredirect=true'
+
hc
url1
=
'http://uri6.com/tkio/
ayERV
fa?noredirect=true'
+
hc
response
=
requests
.
get
(
url
=
url1
,
params
=
parms
,
timeout
=
10
,
verify
=
False
)
print
(
response
.
text
)
print
(
url1
)
...
...
tkio/tkioreceive.py
View file @
15ed9f4b
...
...
@@ -8,7 +8,7 @@ import hashlib
data
=
{
"what"
:
"install"
,
"appid"
:
"
b21d0385ad8371de9e90b3e969a5d0c6
"
,
"appid"
:
"
60763edf19602c0fa27b967c282fe805
"
,
"context"
:
{
"_deviceid"
:
""
,
"_idfa"
:
""
,
...
...
@@ -42,9 +42,9 @@ data_temp = json.dumps(data)
def
send_request
():
global
data
# 测试
url
=
"http://52.80.137.106:8080/receive/tkio/install"
#
url = "http://52.80.137.106:8080/receive/tkio/install"
# 线上
#
url = "http://log.trackingio.com/receive/tkio/install"
url
=
"http://log.trackingio.com/receive/tkio/install"
data
[
'context'
][
'install_time'
]
=
int
(
round
(
time
.
time
()
*
1000
))
print
(
data
)
response
=
requests
.
request
(
"POST"
,
url
,
headers
=
headers
,
data
=
json
.
dumps
(
data
))
...
...
tkio/tkioreceiveandroid.py
View file @
15ed9f4b
...
...
@@ -8,7 +8,7 @@ import hashlib
data
=
{
"what"
:
"install"
,
"appid"
:
"
5b0e99269160e67ef8e560716221e142
"
,
"appid"
:
"
894ef23136b0a6bb039800aa217f2729
"
,
"context"
:
{
"_deviceid"
:
""
,
"_imei"
:
""
,
...
...
@@ -42,11 +42,11 @@ data_temp = json.dumps(data)
def
send_request
():
global
data
# 测试
url
=
"http://52.80.137.106:8080/receive/tkio/install"
#
url = "http://52.80.137.106:8080/receive/tkio/install"
# url = "http://52.80.137.106:8080/receive/tkio/event"
# 线上
#
url = "http://log.trackingio.com/receive/tkio/install"
url
=
"http://log.trackingio.com/receive/tkio/install"
data
[
'context'
][
'install_time'
]
=
int
(
round
(
time
.
time
()
*
1000
))
print
(
data
)
response
=
requests
.
request
(
"POST"
,
url
,
headers
=
headers
,
data
=
json
.
dumps
(
data
))
...
...
xiaochengxu/x_launch.py
View file @
15ed9f4b
...
...
@@ -7,37 +7,39 @@ import requests
appkey
=
'74131e54a444aa5a8597e73b646cba77'
# cid
cid
=
'21
164
'
cid
=
'21
075
'
# surl
surl
=
'
mAbeqa
a'
# URL = 'http://52.80.137.106:8083/tkio/EjABBra?noredirect=true
'
# URL = 'http://uri6.com/tkio/
BVjQf2a?noredirect=true
'
surl
=
'
J32uqi
a'
URL
=
'http://52.80.137.106:8083/tkio/Ur2MFra?noredirect=true&callback=www.baidu.com&request_id=111111&promoted_object_id=111
'
# URL = 'http://uri6.com/tkio/
Ur2MFra?noredirect=true&callback=www.baidu.com&request_id=111111&promoted_object_id=111
'
impressionid
=
''
.
join
(
str
(
random
.
choice
(
range
(
10
)))
for
_
in
range
(
12
))
requestid
=
''
.
join
(
str
(
random
.
choice
(
range
(
10
)))
for
_
in
range
(
12
))
s
=
0
for
_
in
range
(
1
):
for
index
in
range
(
40
):
# 随机生成12为数组
#
i = ''.join(str(random.choice(range(10))) for _ in range(28))
i
=
'2539452844786738942022514936'
i
=
''
.
join
(
str
(
random
.
choice
(
range
(
10
)))
for
_
in
range
(
28
))
#
i = '2539452844786738942022514936'
# 随机生成ip
ip
=
socket
.
inet_ntoa
(
struct
.
pack
(
'>I'
,
random
.
randint
(
1
,
0xffffffff
)))
#
# 打开
#
allEvent().openxiaochengxu(i, ip, cid, surl, appkey, impressionid, requestid)
# 打开
allEvent
()
.
openxiaochengxu
(
i
,
ip
,
cid
,
surl
,
appkey
,
impressionid
,
requestid
)
# # # time.sleep(5)
# # # #pv
# # # allEvent().pviaochengxu(i,ip,cid,surl,appkey)
# # # # # #离开
# # # # allEvent().hidechengxu(i,ip,cid,surl,appkey)
# # # time.sleep(2)
allEvent
()
.
regedchengxu
(
i
,
ip
,
cid
,
surl
,
appkey
)
#
allEvent().regedchengxu(i, ip, cid, surl, appkey)
# # # time.sleep(2)
# allEvent().loggedinchengxu(i, ip, cid, surl, appkey)
# time.sleep(2)
# allEvent().paymentchengxu(i,ip,cid,surl,appkey)
# time.sleep(2)
# allEvent().eventchengxu(i,ip,cid,surl,appkey)
time
.
sleep
(
2
)
num
=
index
+
1
event
=
'event_'
+
str
(
num
)
allEvent
()
.
eventchengxu
(
i
,
ip
,
cid
,
surl
,
appkey
,
event
)
# for index in range(1):
...
...
@@ -48,9 +50,9 @@ for _ in range(1):
# # print("开始时间"+datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S'))
# # 随机生成12为数组
# # impressionid = ''.join(str(random.choice(range(10))) for _ in range(12))
# impressionid = '111222334455'
# impressionid = '111222334455
667788
'
# # requestid = ''.join(str(random.choice(range(10))) for _ in range(12))
# requestid = '1112223344'
# requestid = '1112223344
55
'
# accountid = ''.join(str(random.choice(range(10))) for _ in range(12))
# # 随机生成ip
# ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff)))
...
...
@@ -58,14 +60,16 @@ for _ in range(1):
# try:
# parms = {
# 'click_time': str(round(time.time() * 1000)),
# # 'click_time': '1663309200',
# # 'click_time': '1667308011000',
# 'wechat_openid': i,
# 'click_id':'123456789',
# 'accountid': accountid,
# 'ip': ip,
# 'impression_id': impressionid,
# 'request_id': requestid,
# '_ry_adgroup_id': '
333
',
# '_ry_adplan_id': "
333
",
# '_ry_adcreative_id': '
333
'
# '_ry_adgroup_id': '
222
',
# '_ry_adplan_id': "
222
",
# '_ry_adcreative_id': '
222
'
# }
# # timeout可以超时四秒
# # verify = False
...
...
@@ -106,7 +110,7 @@ for _ in range(1):
# # #离开
# time.sleep(2)
# allEvent().hidechengxu(i,ip,cid,surl,appkey)
# time.sleep(2
00
)
# time.sleep(2)
# allEvent().regedchengxu(i, ip, cid, surl, appkey)
# time.sleep(2)
# allEvent().loggedinchengxu(i,ip,cid,surl,appkey)
...
...
xiaochengxu/xiaochenxu_script.py
View file @
15ed9f4b
...
...
@@ -44,18 +44,19 @@ class allEvent:
"_openid"
:
i
,
"_campaignid"
:
surl
,
"_sceneid"
:
"434444"
,
"gdt_vid"
:
'1112223344'
,
# "
ry_adgroup_id": "111",
# "
ry_adplan_id": "111",
# "
ry_adcreative_id": "111",
#
"accountid":"123456",
"gdt_vid"
:
'1112223344
556677
'
,
"_
ry_adgroup_id"
:
"111"
,
"_
ry_adplan_id"
:
"111"
,
"_
ry_adcreative_id"
:
"111"
,
"accountid"
:
"123456"
,
'impression_id'
:
impressionid
,
'request_id'
:
requestid
,
# 投放广告详情-头条
"advertiser_id"
:
"ccc"
,
"ad_id"
:
"ccc"
,
"creative_id"
:
"ccc"
,
"_apptype"
:
"wx"
"_apptype"
:
"wg"
},
"where"
:
"launch"
,
# "when": when,
...
...
@@ -102,7 +103,7 @@ class allEvent:
"_openid"
:
i
,
"_campaignid"
:
surl
,
"_sceneid"
:
"unknown"
,
"_apptype"
:
"w
x
"
,
"_apptype"
:
"w
g
"
,
"_num_pages"
:
"5"
,
"_duration"
:
"10"
},
...
...
@@ -126,7 +127,8 @@ class allEvent:
"_openid"
:
i
,
"_campaignid"
:
surl
,
"_sceneid"
:
"unknown"
,
"_apptype"
:
"wx"
,
# wg-小游戏
"_apptype"
:
"wg"
,
"_num_pages"
:
"5"
,
"_duration"
:
"10"
},
...
...
@@ -153,7 +155,7 @@ class allEvent:
"_openid"
:
i
,
"_campaignid"
:
surl
,
"_sceneid"
:
"unknown"
,
"_apptype"
:
"w
x
"
,
"_apptype"
:
"w
g
"
,
"_num_pages"
:
"5"
,
'_transactionid'
:
transactionid
,
'_paymenttype'
:
paymenttype
,
...
...
@@ -198,9 +200,9 @@ class allEvent:
print
(
p
.
text
)
# 自定义事件
def
eventchengxu
(
self
,
i
,
IP
,
cid
,
surl
,
appid
):
def
eventchengxu
(
self
,
i
,
IP
,
cid
,
surl
,
appid
,
event
):
s
=
json
.
dumps
({
"what"
:
"event_10"
,
"what"
:
event
,
"appid"
:
appid
,
"context"
:
{
"_cid"
:
cid
,
...
...
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