Commit 27a48cd5 by liuxiaoxing

归因逻辑补充

parent 5afa42f0
...@@ -39,7 +39,7 @@ ry_adcreative_name = 'c测试1' ...@@ -39,7 +39,7 @@ ry_adcreative_name = 'c测试1'
# bytedance_int 今日头条,kuaishou_int 快手,tencentams_int (新)广点通,rryingxiao_int 人人营销 # bytedance_int 今日头条,kuaishou_int 快手,tencentams_int (新)广点通,rryingxiao_int 人人营销
pid = 'rryingxiao_int' pid = 'rryingxiao_int'
# URL = 'http://uri6.com/tkio/JFFnQ3a?noredirect=true' # URL = 'http://uri6.com/tkio/JFFnQ3a?noredirect=true'
URL = 'http://52.80.137.106:8083/tkio/JjiUJ3a?noredirect=true' URL = 'http://52.80.137.106:8083/tkio/FrEBnea?noredirect=true'
# 测试头条衍生事件回调时加上 # 测试头条衍生事件回调时加上
# callback= http%3A%2F%2Fad.toutiao.com%2Ftrack%2Factivate%2F%3Fcallback%3DCKP4rs-Zn4QDEKiQ6teZn4QDGN6L8Y-h9Wcg3ovxj6H1ZyiE0PjgroSEAzAOOM_X-8IDQik0YWY1NzdlOC1lZmViLTRmZDEtYmZkZC00MzE1Zjc1MmJhMGF1NTQ5M0iA0pOtA1AAiAEAkAECmAEA%26os%3D0%26muid%3D # callback= http%3A%2F%2Fad.toutiao.com%2Ftrack%2Factivate%2F%3Fcallback%3DCKP4rs-Zn4QDEKiQ6teZn4QDGN6L8Y-h9Wcg3ovxj6H1ZyiE0PjgroSEAzAOOM_X-8IDQik0YWY1NzdlOC1lZmViLTRmZDEtYmZkZC00MzE1Zjc1MmJhMGF1NTQ5M0iA0pOtA1AAiAEAkAECmAEA%26os%3D0%26muid%3D
...@@ -60,7 +60,7 @@ def computeMD5upper(message): ...@@ -60,7 +60,7 @@ def computeMD5upper(message):
return m.hexdigest().upper() return m.hexdigest().upper()
appkey = 'b7c0146c5b14d7d6d87cfd9bf1853b3e' appkey = 'a57ba9d2c364a49f43f59cb33d96577e'
lst = [] lst = []
nowTime = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') nowTime = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
s = 0 s = 0
...@@ -68,8 +68,8 @@ w = 0 ...@@ -68,8 +68,8 @@ w = 0
for index in range(1): for index in range(1):
# print("开始时间"+datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')) # print("开始时间"+datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S'))
# 随机生成12为数组 # 随机生成12为数组
# i = ''.join(str(random.choice(range(10))) for _ in range(12)) i = ''.join(str(random.choice(range(10))) for _ in range(12))
i = '044792973102' # i = '044792973102'
o = ''.join(str(random.choice(range(10))) for _ in range(12)) o = ''.join(str(random.choice(range(10))) for _ in range(12))
m = ''.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)) se = ''.join(str(random.choice(range(10))) for _ in range(12))
...@@ -195,14 +195,14 @@ for index in range(1): ...@@ -195,14 +195,14 @@ for index in range(1):
# print('androidid', a) # print('androidid', a)
w = w + 1 w = w + 1
# time.sleep(8) time.sleep(6)
# try: try:
# allEvent().installUpload(i, ip, appkey) allEvent().installUpload(i, ip, appkey)
# # allEvent().formevent(i, ip, appkey) # allEvent().formevent(i, ip, appkey)
#
# except Exception: except Exception:
# print('install_wrong:', w) print('install_wrong:', w)
# w = w + 1 w = w + 1
# # # # # # # #
# # # # # # # #
# time.sleep(5) # time.sleep(5)
...@@ -211,11 +211,11 @@ for index in range(1): ...@@ -211,11 +211,11 @@ for index in range(1):
# except Exception as e: # except Exception as e:
# print('注册_wrong:', w) # print('注册_wrong:', w)
# print(e) # print(e)
time.sleep(4) # time.sleep(4)
try: # try:
allEvent().loginEvent(i, ip, appkey) # allEvent().loginEvent(i, ip, appkey)
except Exception: # except Exception:
print('登录_wrong:', w) # print('登录_wrong:', w)
# time.sleep(5) # time.sleep(5)
# try: # try:
# allEvent().payEvent(i, ip, appkey) # allEvent().payEvent(i, ip, appkey)
......
...@@ -353,6 +353,58 @@ class allEvent: ...@@ -353,6 +353,58 @@ class allEvent:
transactionid = '765432454364342' transactionid = '765432454364342'
s = json.dumps({ s = json.dumps({
# "appid": appkey,
# "who": "unknown",
# "what": "order",
# "when": "2022-08-26 11:52:46",
# "context": {
# "_app_version": "2.0",
# "_campaignid": "320110",
# "_ryosversion": "10",
# '_ip': IP,
# "_rydevicetype": "TAS-AN00",
# "_ryandroid8version": 29,
# "_carrier": "中国电信",
# "_pkgname": "com.reyun.chicken",
# "_lib_version": "1.8.9.1",
# "_model": "TAS-AN00",
# "_istablet": "phone",
# "_ryos": "Android",
# "_imei": "dd275ad3c4412060",
# "_lib": "Android",
# "_tz": "+8",
# "_manufacturer": "HUAWEI",
# "_create_timestamp": 1661485966274,
# "_resolution": "1080*2259",
# "_androidid": "dd275ad3c4412060",
# "_network_type": "4G",
# "_deviceid": i,
# "dev_type": "androidid",
# "_cyid": "cyid001",
# "_ipv6": "240e:476:1:f0fc:c176:ada4:a28e:7264",
# "_oaid": "unknown",
# "_oaid_limited": 'false',
# "_screen_brightness": 23,
# "_audio_volume": 0,
# "_ucid": "unknown",
# "_ukid": "unknown",
# '_transactionid': transactionid,
# '_paymenttype': paymenttype,
# '_currencytype': currencytype,
# '_currencyamount': currencyamount,
#
# "mobdna_info": {
# "mobdna_oid": "155c67dc3c23b7264ee03dfaf6200b8c",
# "mobdna_cid": "320110",
# "mobdna_appkey": "16dc0cb882d3dbec4f7f66251a84d6dd",
# "mobdna_rdid": "F0FD40C1682F07C8FD94E96199E1E734",
# "mobdna_requestid": "d10e2716dd2b4eae98e501132559dc5b"
# },
# "aaa": "123",
# "bbb": "456",
# "_mac": "02:00:00:00:00:00",
# "_timestamp": 1661485976623
# }
'what': 'order', 'what': 'order',
'appid': appkey, 'appid': appkey,
'context': { 'context': {
...@@ -365,9 +417,10 @@ class allEvent: ...@@ -365,9 +417,10 @@ class allEvent:
'_paymenttype': paymenttype, '_paymenttype': paymenttype,
"_lib_version": lv, "_lib_version": lv,
'_currencytype': currencytype, '_currencytype': currencytype,
'_ryos': ryos,
'_currencyamount': currencyamount, '_currencyamount': currencyamount,
'_ryos': ryos,
}, },
# 'when': time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time())), # 'when': time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time())),
# 'ds': ds, # 'ds': ds,
......
...@@ -8,7 +8,7 @@ import hashlib ...@@ -8,7 +8,7 @@ import hashlib
#安卓常规渠道激活 #安卓常规渠道激活
appkey = 'a57ba9d2c364a49f43f59cb33d96577e' appkey = '0ecc232109dc25bfedff8aba06271539'
# 线上预约app # 线上预约app
# 7f64fbd64513bc74aa6b5bf753ae0953 # 7f64fbd64513bc74aa6b5bf753ae0953
# 16dc0cb882d3dbec4f7f66251a84d6dd # 16dc0cb882d3dbec4f7f66251a84d6dd
...@@ -48,16 +48,16 @@ for index in range(1): ...@@ -48,16 +48,16 @@ for index in range(1):
# 60.13.148.23 新疆维吾尔自治区吐鲁番市 # 60.13.148.23 新疆维吾尔自治区吐鲁番市
# 61.139.239.255 广西壮族自治区北海市 # 61.139.239.255 广西壮族自治区北海市
# 119.60.0.0 宁夏回族自治区银川市 # 119.60.0.0 宁夏回族自治区银川市
allEvent().installUpload(i, ip, appkey) # allEvent().installUpload(i, ip, appkey)
time.sleep(1) # time.sleep(1)
allEvent().startupEvent(i, ip, appkey) # allEvent().startupEvent(i, ip, appkey)
# # time.sleep(1) # # time.sleep(1)
# allEvent().loginEvent(i, ip, appkey) # allEvent().loginEvent(i, ip, appkey)
# time.sleep(1) # time.sleep(1)
# allEvent().registerEvent(i, ip, appkey) # allEvent().registerEvent(i, ip, appkey)
# allEvent().payEvent(i, ip, appkey) # allEvent().payEvent(i, ip, appkey)
# time.sleep(1) # time.sleep(1)
# allEvent().payorder(i, ip, appkey) allEvent().payorder(i, ip, appkey)
# time.sleep(1) # time.sleep(1)
# num = index + 1 # num = index + 1
# event = 'event_' + str(num) # event = 'event_' + str(num)
......
...@@ -79,7 +79,7 @@ def test_at1(): ...@@ -79,7 +79,7 @@ def test_at1():
clickios.parms['idfa'] = i2 clickios.parms['idfa'] = i2
clickios.parms['ip'] = ip2 clickios.parms['ip'] = ip2
clickios.send_requestandroid('') clickios.send_requestandroid('')
time.sleep(5) time.sleep(6)
tkioreceive.data['context']['_deviceid'] = i tkioreceive.data['context']['_deviceid'] = i
tkioreceive.data['context']['_idfa'] = i tkioreceive.data['context']['_idfa'] = i
tkioreceive.data['context']['_ip'] = ip2 tkioreceive.data['context']['_ip'] = ip2
...@@ -104,7 +104,7 @@ def test_at2(): ...@@ -104,7 +104,7 @@ def test_at2():
clickios.parms['idfa'] = i2 clickios.parms['idfa'] = i2
clickios.parms['ip'] = ip2 clickios.parms['ip'] = ip2
clickios.send_requestandroid('') clickios.send_requestandroid('')
time.sleep(5) time.sleep(6)
tkioreceive.data['context']['_deviceid'] = i2 tkioreceive.data['context']['_deviceid'] = i2
tkioreceive.data['context']['_idfa'] = i2 tkioreceive.data['context']['_idfa'] = i2
tkioreceive.data['context']['_ip'] = ip1 tkioreceive.data['context']['_ip'] = ip1
...@@ -124,7 +124,7 @@ def test_at3(): ...@@ -124,7 +124,7 @@ def test_at3():
clickios.parms['ip'] = ip1 clickios.parms['ip'] = ip1
clickios.parms['caid1'] = caid clickios.parms['caid1'] = caid
clickios.send_requestandroid('') clickios.send_requestandroid('')
time.sleep(5) time.sleep(6)
tkioreceive.data['context']['_deviceid'] = i tkioreceive.data['context']['_deviceid'] = i
tkioreceive.data['context']['_idfa'] = i tkioreceive.data['context']['_idfa'] = i
tkioreceive.data['context']['_ip'] = ip1 tkioreceive.data['context']['_ip'] = ip1
...@@ -148,7 +148,7 @@ def test_at4(): ...@@ -148,7 +148,7 @@ def test_at4():
clickios.parms['idfa'] = i2 clickios.parms['idfa'] = i2
clickios.parms['ip'] = ip2 clickios.parms['ip'] = ip2
clickios.send_requestandroid('') clickios.send_requestandroid('')
time.sleep(5) time.sleep(6)
tkioreceive.data['context']['_deviceid'] = i tkioreceive.data['context']['_deviceid'] = i
tkioreceive.data['context']['_idfa'] = i tkioreceive.data['context']['_idfa'] = i
tkioreceive.data['context']['_ip'] = ip1 tkioreceive.data['context']['_ip'] = ip1
...@@ -169,7 +169,7 @@ def test_at5(): ...@@ -169,7 +169,7 @@ def test_at5():
clickios.parms['ip'] = ip clickios.parms['ip'] = ip
clickios.parms['caid1'] = caid clickios.parms['caid1'] = caid
clickios.send_requestandroid('') clickios.send_requestandroid('')
time.sleep(5) time.sleep(6)
tkioreceive.data['context']['_deviceid'] = i tkioreceive.data['context']['_deviceid'] = i
tkioreceive.data['context']['_idfa'] = i tkioreceive.data['context']['_idfa'] = i
tkioreceive.data['context']['_ip'] = ip tkioreceive.data['context']['_ip'] = ip
...@@ -261,7 +261,7 @@ def test_at9(): ...@@ -261,7 +261,7 @@ def test_at9():
clickios.parms['caid1'] = caid clickios.parms['caid1'] = caid
clickios.parms['caid2'] = caid2 clickios.parms['caid2'] = caid2
clickios.send_requestandroid('') clickios.send_requestandroid('')
time.sleep(5) time.sleep(6)
tkioreceive.data['context']['_deviceid'] = i2 tkioreceive.data['context']['_deviceid'] = i2
tkioreceive.data['context']['_idfa'] = i2 tkioreceive.data['context']['_idfa'] = i2
tkioreceive.data['context']['_ip'] = ip tkioreceive.data['context']['_ip'] = ip
...@@ -357,7 +357,7 @@ def test_at13(): ...@@ -357,7 +357,7 @@ def test_at13():
clickios.parms['caid1'] = computeMD5upper(caid) clickios.parms['caid1'] = computeMD5upper(caid)
clickios.parms['caid2'] = caid2 clickios.parms['caid2'] = caid2
clickios.send_requestandroid('') clickios.send_requestandroid('')
time.sleep(5) time.sleep(6)
tkioreceive.data['context']['_deviceid'] = i2 tkioreceive.data['context']['_deviceid'] = i2
tkioreceive.data['context']['_idfa'] = i2 tkioreceive.data['context']['_idfa'] = i2
tkioreceive.data['context']['_ip'] = ip tkioreceive.data['context']['_ip'] = ip
...@@ -431,7 +431,7 @@ def test_at16(): ...@@ -431,7 +431,7 @@ def test_at16():
clickios.parms['caid1'] = '' clickios.parms['caid1'] = ''
clickios.parms['caid2'] = caid clickios.parms['caid2'] = caid
clickios.send_requestandroid('') clickios.send_requestandroid('')
time.sleep(5) time.sleep(6)
tkioreceive.data['context']['_deviceid'] = i2 tkioreceive.data['context']['_deviceid'] = i2
tkioreceive.data['context']['_idfa'] = i2 tkioreceive.data['context']['_idfa'] = i2
tkioreceive.data['context']['_ip'] = ip tkioreceive.data['context']['_ip'] = ip
...@@ -460,7 +460,7 @@ def test_at17(): ...@@ -460,7 +460,7 @@ def test_at17():
clickios.parms['caid1'] = '' clickios.parms['caid1'] = ''
clickios.parms['caid2'] = caid clickios.parms['caid2'] = caid
clickios.send_requestandroid('') clickios.send_requestandroid('')
time.sleep(5) time.sleep(6)
tkioreceive.data['context']['_deviceid'] = i2 tkioreceive.data['context']['_deviceid'] = i2
tkioreceive.data['context']['_idfa'] = i2 tkioreceive.data['context']['_idfa'] = i2
tkioreceive.data['context']['_ip'] = ip2 tkioreceive.data['context']['_ip'] = ip2
...@@ -766,16 +766,17 @@ def test_at30(): ...@@ -766,16 +766,17 @@ def test_at30():
caid2 = code_nums1(36) caid2 = code_nums1(36)
ip1 = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff))) ip1 = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff)))
clickios.parms['idfa'] = i clickios.parms['idfa'] = i
clickios.parms['idfa_MD5'] = computeMD5upper(i)
clickios.parms['ua'] = "Mozilla/5.0 (iPhone; CPU iPhone OS 15_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148"
clickios.parms['ip'] = ip1 clickios.parms['ip'] = ip1
clickios.parms['caid'] = caid
clickios.parms['caid1'] = caid1 clickios.parms['caid1'] = caid1
clickios.parms['caid2'] = caid2 clickios.parms['caid2'] = caid2
clickios.send_requestandroid('') clickios.send_requestandroid('')
print(i) print("idfa:"+i)
print(ip1) print("idfa_MD5:"+computeMD5upper(i))
print(caid) print("ip:"+ip1)
print(caid1) print("caid1:"+caid1.upper())
print(caid2) print("caid2:"+caid2.upper())
......
...@@ -32,8 +32,8 @@ parms = { ...@@ -32,8 +32,8 @@ parms = {
def send_requestandroid(hc): def send_requestandroid(hc):
url1 = 'http://52.80.137.106:8083/tkio/BV3iyya?noredirect=true' + hc # url1 = 'http://52.80.137.106:8083/tkio/BRzAnea?noredirect=true' + hc
# url1 = 'http://uri6.com/tkio/q6VFJva?noredirect=true' + hc url1 = 'http://uri6.com/tkio/zaABrya?noredirect=true' + hc
response = requests.get(url=url1, params=parms, timeout=10, verify=False) response = requests.get(url=url1, params=parms, timeout=10, verify=False)
print(response.text) print(response.text)
print(url1) print(url1)
...@@ -41,8 +41,8 @@ def send_requestandroid(hc): ...@@ -41,8 +41,8 @@ def send_requestandroid(hc):
def send_requestandroid2(hc): def send_requestandroid2(hc):
url1 = 'http://52.80.137.106:8083/tkio/YbIn6fa?noredirect=true' + hc url1 = 'http://52.80.137.106:8083/tkio/Jr63yia?noredirect=true' + hc
# url1 = 'http://uri6.com/tkio/q6VFJva?noredirect=true' + hc # url1 = 'http://uri6.com/tkio/yyuyaea?noredirect=true' + hc
response = requests.get(url=url1, params=parms, timeout=10, verify=False) response = requests.get(url=url1, params=parms, timeout=10, verify=False)
print(response.text) print(response.text)
print(url1) print(url1)
......
...@@ -32,8 +32,8 @@ parms = { ...@@ -32,8 +32,8 @@ parms = {
def send_requestandroid(hc): def send_requestandroid(hc):
url1 = 'http://52.80.137.106:8083/tkio/ZRRjQra?noredirect=true' + hc url1 = 'http://52.80.137.106:8083/tkio/AbEjAza?noredirect=true' + hc
# url1 = 'http://uri6.com/tkio/YjeERja?noredirect=true' + hc # url1 = 'http://uri6.com/tkio/rEFbiua?noredirect=true' + hc
response = requests.get(url=url1, params=parms, timeout=10, verify=False) response = requests.get(url=url1, params=parms, timeout=10, verify=False)
print(response.text) print(response.text)
print(url1) print(url1)
......
...@@ -8,7 +8,7 @@ import hashlib ...@@ -8,7 +8,7 @@ import hashlib
data = { data = {
"what": "install", "what": "install",
"appid": "7f43b32bad452c092096136c9be73d09", "appid": "0ecc232109dc25bfedff8aba06271539",
"context": { "context": {
"_deviceid": "", "_deviceid": "",
"_idfa": "", "_idfa": "",
......
...@@ -8,7 +8,7 @@ import hashlib ...@@ -8,7 +8,7 @@ import hashlib
data = { data = {
"what": "install", "what": "install",
"appid": "a57ba9d2c364a49f43f59cb33d96577e", "appid": "f461b1ab7aca6fdf3fa719bf4b6af863",
"context": { "context": {
"_deviceid": "", "_deviceid": "",
"_imei": "", "_imei": "",
...@@ -43,6 +43,8 @@ def send_request(): ...@@ -43,6 +43,8 @@ def send_request():
global data 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)) data['context']['install_time'] = int(round(time.time() * 1000))
...@@ -75,6 +77,3 @@ def send_requestlogin(): ...@@ -75,6 +77,3 @@ def send_requestlogin():
return response return response
def test_se1():
data["appid"] = "16dc0cb882d3dbec4f7f66251a84d6dd"
send_request()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment