ios_fenlianjie.py 1.6 KB
Newer Older
liuxiaoxing committed
1 2 3 4 5 6 7 8
from ios_event.ios_script import allEvent
import struct
import socket
import random
import string
import time

#iOS常规渠道激活
liuxiaoxing committed
9
appkey = 'd7fbbb5410a9b70754c9d1e8f16741b3'
liuxiaoxing committed
10 11
event = 'event_1'

liuxiaoxing committed
12
for index in range(1):
liuxiaoxing committed
13 14 15 16 17 18 19
    # 随机生成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))

liuxiaoxing committed
20 21
    i = (a + "-" + b + "-" + c + "-" + d + "-" + e).upper()
    # i = '583D2BB0-B19C-4A9A-A600-2A1EB2FB7E39'
liuxiaoxing committed
22 23 24 25
    print(i)
    adid = ''.join(str(random.choice(range(10))) for _ in range(12))
    # 随机生成ip
    ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff)))
liuxiaoxing committed
26
    # ip = '61.192.125.69'
liuxiaoxing committed
27 28
    allEvent().installUpload(i,ip,appkey)
    allEvent().startupEvent(i, ip, appkey)
liuxiaoxing committed
29 30 31 32
    # time.sleep(10)
    # allEvent().loginEvent(i, ip, appkey)
    # allEvent().registerEvent(i, ip, appkey)
    # allEvent().payEvent(i, ip, appkey)
liuxiaoxing committed
33
    # time.sleep(1)
liuxiaoxing committed
34
    # allEvent().payorder(i, ip, appkey)
liuxiaoxing committed
35
    # time.sleep(3)
liuxiaoxing committed
36 37 38
    # num = index + 1
    # event = 'event_' + str(num)
    # allEvent().ziding_event(i, ip, appkey, event)
liuxiaoxing committed
39
    # print(event)
liuxiaoxing committed
40 41 42 43 44 45
    # allEvent().adshow(i,ip,appkey,adid)
    # allEvent().adclick(i,ip,appkey,adid)
    # allEvent().pageduration(i,ip,appkey,se,p)
    # allEvent().appduration(i,ip,appkey,s)
    # allEvent().invoke_test(i,ip,appkey)
    # allEvent().retentionEvent(i,ip,appkey)