Commit cf614b4d by liuxiaoxing

test

parent f68d5708
# from .import clickparams
from microservices import clickparams from microservices import clickparams
from microservices import redirectandroid
from microservices import receiveandroid
import socket import socket
import struct import struct
import random import random
import time
import requests import requests
import json import json
URL = 'http://tmtest.trackingio.com/receive/turl/Yzuiuma' # 700bdf6f8e628686dc9fffccf6ebe58b 对应的安卓短链:73iIZ3a
clickparams.parms_ios['os'] = 'android'
response = requests.get(url=URL, params=clickparams.parms.update(clickparams.parms_ios), timeout=10, verify=False) # URL = 'http://tmtest.trackingio.com/receive/turl/QJZfmma'
print(clickparams.parms) # clickparams.parms_android['imei1'] = i
print(response.text) # response = requests.get(url=URL, params=clickparams.parms.update(clickparams.parms_ios), timeout=10, verify=False)
# print(clickparams.parms)
# print(response.text)
i = ''.join(str(random.choice(range(10))) for _ in range(12))
def test_atb1():
redirectandroid.parms['oaid'] = i
redirectandroid.send_request("73iIZ3a", '')
time.sleep(10)
receiveandroid.data[0]['device_info']['device_id'] = i
receiveandroid.data[0]['device_info']['oaid'] = i
receiveandroid.data[0]['device_info']['device_id_type'] = 'oaid'
receiveandroid.send_request()
print(i)
s = 0
w = 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 = '65453434546345'
# # 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))
# # adid = ''.join(str(random.choice(range(10))) for _ in range(12))
# # # 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 = '032273574734'
# # p1 = '测试一下'
# # "idfa": 'B5588C9C-4534-43FB-935D-F17C91622C83',
# # "idfa": '00000000-0000-0000-0000-000000000000',
# # sh1 = "track_click:"+appkey+":"+get_str_sha1_secret_str(i)
# # print(sh1)
# # i = '091508889907'
# # md5加密
# # 创建md5对象
# # m = hashlib.md5()
# # b = i.encode(encoding='utf-8')
# # m.update(b)
# # str_md5 = m.hexdigest().upper()
# # print("md5加密:"+str_md5)
# # ##########
# # # md16加密(截取md5加密的字符串)
# # imei_16 = str_md5[8:24]
# # print("md16加密:"+imei_16)
#
# # 随机生成ip
# ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff)))
# ip = '156.119.456.199'
# try:
# parms = {
# # 触点传参时间。is_s2s=1时必传,0时选传。不同渠道有可能传多种格式,详见需求。限制32位字符内。短链传参。
# 'ts': '2122132121',
# # 集成方式。is_s2s=1为服务器上报触点,0为客户端上报触点。0或1时有不同的参数非空校验,详见需求。固定为0或1。都必传
# 'is_s2s': '1',
# # 操作系统。限制16字符内。都选传。短链传参。暂不与app_platform互相做校验。
# 'os': 'ios',
# # 设备型号。限制64字符内。都选传。短链传参。
# 'model': '小米',
# # 用户公网IP v4版本。限制15字符内。is_s2s=1时都必传,0时都选传,0时优先取传参IP,未传参或传参报错时,取http header中的ip作为ipv4的值
# 'ipv4': '1.1.1.1',
# # 用户公网IP v6版本。限制128字符内。都选传
# 'ipv6': '1.1.1.1',
# # 用户代理信息。限制512字符内。is_s2s=1时都必传,0时都选传,0时优先取传参UA,未传参或报错时,取http header中的user agent作为ua的值
# '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/37.0.0.0 MQQBrowser/7.3 Mobile Safari/537.36',
# # 监测短链id。固定7位。
# # 'turl_id': '3r5K1h9',
# # 全部url参数。
# # 'tkul_string': 'xxx',
# # 触点类型。固定为click。都必传
# 'touchpoint_type': 'click',
# # 归因类型。固定为ua(user acquirement新客获取)
# 'attribution_type': 'ua',
# # 广告账户id。限制64字符内。都选传
# 'account_id': '',
# # 广告组id。限制64字符内。都选传
# 'adgroup_id': '',
# # 广告组名称。限制256字符内。都选传
# 'adgroup_name': '',
# # 广告计划id。限制64字符内。都选传
# 'adplan_id': '',
# # 广告计划名称。限制256字符内。都选传
# 'adplan_name': '',
# # 广告创意id。限制128字符内。都选传
# 'adcreative_id': '',
# # 广告创意名称。限制256字符内。都选传
# 'adcreative_name': '',
# # 创意类型(例如大图、小图、视频等)。限制16字符内。都选传
# 'adcreative_type': '',
# # 流量媒体id(例如巨量的今日头条、穿山甲、抖音等)。限制32字符内。都选传
# 'site_id': '',
# # 流量媒体名称(例如巨量的今日头条、穿山甲、抖音等)。限制128字符内。都选传
# 'site_name': '',
# # 广告类型(例如开屏、信息流、搜索等)。限制32字符内。都选传。
# 'ad_type': '',
# # 广告位id。限制64字符内。都选传
# 'placement_id': '',
# # 转化id。限制64字符内。都选传
# 'conversion_id': '',
# # 广告点击id。限制64字符内。都选传
# 'click_id': '',
# # 广告展示id。限制64字符内。都选传
# 'impression_id': '',
# # 广告请求id。限制64字符内。都选传
# 'request_id': '',
# # 渠道回调id。限制256字符。都选传
# 'callback_id': 'EJiw267wvfQCGKf2g74ZIPD89-vIATAMOAFCIjIwMTkxMTI3MTQxMTEzMDEwMDI2MDc3MjE1MTUwNTczNTBIAQ==',
# # 渠道回调地址。限制256字符。都选传
# 'callback_url': 'http%3A%2F%2Ftracking.e.qq.com%2Fconv%3Fcb%3DMTIzYWJjNDU2ZGVm%26conv_id%3D12345678',
# # 自定触点参数集合。都选传。
# 'custom_params_1': '' ,
# # Android OAID原值。限制512字符内。Android选传,app_platform=ios时报错
# 'oaid': '3DEA635F-B24F-434B-833F-4ED028FEAEEF',
# # Android OAID原值MD5后转小写。固定为32字符。Android选传,app_platform=ios时报错
# 'oaid_md5': '8e488a40a17aed2f6752f51382a4eafc',
# # Android主卡IMEI原值。限制32字符内。Android选传,app_platform=ios时报错
# 'imei1': i,
# # Android主卡IMEI原值MD5后转小写。固定为32字符。Android选传,app_platform=ios时报错
# 'imei1_md5': '8e488a40a17aed2f6752f51382a4eafc',
# # Android副卡IMEI原值。限制32字符内。Android选传,app_platform=ios时报错
# 'imei2': '8342732742383',
# # Android副卡IMEI原值MD5后转小写。固定为32字符。Android选传,app_platform=ios时报错
# 'imei2_md5': '8e488a40a17aed2f6752f51382a4eafc',
# # Google Advertising ID原值。固定36字符。Android选传,app_platform=ios时报错
# 'gaid': 'B21C5EC5-9921-42FD-AAC5-07A0EB6CF1A0',
# # Google Advertising ID原值MD5后转小写。固定为32字符。Android选传,app_platform=ios时报错
# 'gaid_md5': '8e488a40a17aed2f6752f51382a4eafc',
# # //MAC原值。固定17字符。Android选传,app_platform=ios时报错
# 'mac': '',
# # MAC原值MD5后转小写。固定为32字符。Android选传,app_platform=ios时报错
# 'mac_md5': '',
# # Android ID原值。固定16字符。Android选传,app_platform=ios时报错
# 'android_id': '',
# # Android ID原值MD5后转小写。固定为32字符。Android选传,app_platform=ios时报错
# 'android_id_md5': '',
# }
# # timeout可以超时四秒
# # verify = False
# p = requests.get(url=URL, params=parms, timeout=10, verify=False)
# print('imei:', i)
# print("ip:", ip)
# # print("accountid:", accountid)
# print(p.text)
# print(p.url)
# # print("oaid:",o)
# print('success:', s)
# print(p.status_code)
# print(p.content)
# # print('androidid:',a)
# # print(nowTime)
# s = s + 1
# except Exception as err:
# print(err)
# print('wrong:', w)
# print('imei:', i)
# print("ip:", ip)
# # print(p.status_code)
# # print('androidid', a)
# w = w + 1
\ No newline at end of file
...@@ -73,6 +73,7 @@ parms_ios = { ...@@ -73,6 +73,7 @@ parms_ios = {
parms_android = { parms_android = {
'os': 'android',
# Android OAID原值。限制512字符内。Android选传,app_platform=ios时报错 # Android OAID原值。限制512字符内。Android选传,app_platform=ios时报错
'oaid': '3DEA635F-B24F-434B-833F-4ED028FEAEEF', 'oaid': '3DEA635F-B24F-434B-833F-4ED028FEAEEF',
# Android OAID原值MD5后转小写。固定为32字符。Android选传,app_platform=ios时报错 # Android OAID原值MD5后转小写。固定为32字符。Android选传,app_platform=ios时报错
......
import requests import requests
import json import json
import pytest import pytest
import time
# 153字符 # 153字符
chaochang = '543214223221321321312131313133132131232131232132132543214223221321321312131313133132131232131232132132543214223221321321312131313133132131232131232132132' chaochang = '543214223221321321312131313133132131232131232132132543214223221321321312131313133132131232131232132132543214223221321321312131313133132131232131232132132'
cc612 = '543214223221321321312131313133132131232131232132132543214223221321321312131313133132131232131232132132543214223221321321312131313133132131232131232132132543214223221321321312131313133132131232131235432142232213213213121313131331321312321312321321325432142232213213213121313131331321312321312321321325432142232213213213121313131331321312321312321321325432142232213213213121313131331321312321312321321325432142232213213213121313131331321312321312321321325432142232213213213121313131331321312321312321321322132132543214223221321321312131313133132131232131232132132543214223221321321312131313133132131232131232132132' cc612 = '543214223221321321312131313133132131232131232132132543214223221321321312131313133132131232131232132132543214223221321321312131313133132131232131232132132543214223221321321312131313133132131232131235432142232213213213121313131331321312321312321321325432142232213213213121313131331321312321312321321325432142232213213213121313131331321312321312321321325432142232213213213121313131331321312321312321321325432142232213213213121313131331321312321312321321325432142232213213213121313131331321312321312321321322132132543214223221321321312131313133132131232131232132132543214223221321321312131313133132131232131232132132'
current_time_13 = int(round(time.time() * 1000))
headers = { headers = {
'Content-Type': 'application/json' 'Content-Type': 'application/json'
...@@ -13,16 +15,16 @@ global data ...@@ -13,16 +15,16 @@ global data
data = [ data = [
{ {
"application_info": { "application_info": {
"appkey": "74b81be2432c029040e0b2bc375ce7fb", "appkey": "700bdf6f8e628686dc9fffccf6ebe58b",
"bundleid": "3423232", "bundleid": "3423232",
"app_version": "1.9.0", "app_version": "1.9.0",
"channel_name": "HUAWEI" "channel_name": "HUAWEI"
}, },
"timestamp_info": { "timestamp_info": {
"time_zone": "GMT+08", "time_zone": "GMT+08",
"install_time": "1637823377000", "install_time": int(round(time.time() * 1000)),
"current_event_time": "1637823377000", "current_event_time": int(round(time.time() * 1000)),
"report_time": "1637823377000" "report_time": int(round(time.time() * 1000))
}, },
"collector_info": { "collector_info": {
"integration_type": "sdk", "integration_type": "sdk",
...@@ -97,6 +99,7 @@ data_temp = json.dumps(data) ...@@ -97,6 +99,7 @@ data_temp = json.dumps(data)
def send_request(): def send_request():
global data global data
url = "http://tkiomicro-receive-788931749.cn-north-1.elb.amazonaws.com.cn/receive/tkiov2/sdk" url = "http://tkiomicro-receive-788931749.cn-north-1.elb.amazonaws.com.cn/receive/tkiov2/sdk"
data[0]['timestamp_info']['install_time'] = int(round(time.time() * 1000))
print(data) print(data)
response = requests.request("POST", url, headers=headers, data=json.dumps(data)) response = requests.request("POST", url, headers=headers, data=json.dumps(data))
print(response.text) print(response.text)
......
...@@ -14,12 +14,13 @@ zf256 = '测试广告组名称,广告计划名称,广告创意名称,渠 ...@@ -14,12 +14,13 @@ zf256 = '测试广告组名称,广告计划名称,广告创意名称,渠
global parms global parms
parms = { parms = {
'ry_touchpoint_ts': int(round(time.time() * 1000)),
# 触点传参时间。is_s2s=1时必传,0时选传。不同渠道有可能传多种格式,详见需求。限制32位字符内。短链传参。 # 触点传参时间。is_s2s=1时必传,0时选传。不同渠道有可能传多种格式,详见需求。限制32位字符内。短链传参。
'ts': '2122132121', 'ts': int(round(time.time() * 1000)),
# 集成方式。is_s2s=1为服务器上报触点,0为客户端上报触点。0或1时有不同的参数非空校验,详见需求。固定为0或1。都必传 # 集成方式。is_s2s=1为服务器上报触点,0为客户端上报触点。0或1时有不同的参数非空校验,详见需求。固定为0或1。都必传
'is_s2s': '1', 'is_s2s': '1',
# 操作系统。限制16字符内。都选传。短链传参。暂不与app_platform互相做校验。 # 操作系统。限制16字符内。都选传。短链传参。暂不与app_platform互相做校验。
'os': 'ios', 'os': 'android',
# 设备型号。限制64字符内。都选传。短链传参。 # 设备型号。限制64字符内。都选传。短链传参。
'model': '小米', 'model': '小米',
# 用户公网IP v4版本。限制15字符内。is_s2s=1时都必传,0时都选传,0时优先取传参IP,未传参或传参报错时,取http header中的ip作为ipv4的值 # 用户公网IP v4版本。限制15字符内。is_s2s=1时都必传,0时都选传,0时优先取传参IP,未传参或传参报错时,取http header中的ip作为ipv4的值
...@@ -99,7 +100,7 @@ parms = { ...@@ -99,7 +100,7 @@ parms = {
'callback_url': 'http%3A%2F%2Ftracking.e.qq.com%2Fconv%3Fcb%3DMTIzYWJjNDU2ZGVm%26conv_id%3D12345678', 'callback_url': 'http%3A%2F%2Ftracking.e.qq.com%2Fconv%3Fcb%3DMTIzYWJjNDU2ZGVm%26conv_id%3D12345678',
# 自定触点参数集合。都选传。 # 自定触点参数集合。都选传。
'custom_params_1': '' 'custom_params_1': 'null'
} }
data_temp = json.dumps(parms) data_temp = json.dumps(parms)
...@@ -111,16 +112,19 @@ data_temp = json.dumps(parms) ...@@ -111,16 +112,19 @@ data_temp = json.dumps(parms)
def send_request(dl, cs): def send_request(dl, cs):
global parms global parms
url1 = 'http://tmtest.trackingio.com/receive/turl/' + dl + cs url1 = 'http://tmtest.trackingio.com/receive/turl/' + dl + cs
parms['ts'] = int(round(time.time() * 1000))
response = requests.get(url=url1, params=parms, timeout=10, verify=False) response = requests.get(url=url1, params=parms, timeout=10, verify=False)
print(response.url) print(response.url)
print(response.text)
parms = json.loads(data_temp) parms = json.loads(data_temp)
response = json.loads(response.text) response = json.loads(response.text)
return response return response
def send_request2(dl, cs): def send_request2(dl, cs):
url1 = 'http://tmtest.trackingio.com/receive/turl/' + dl + cs url1 = 'http://tmtest.trackingio.com/receive/turl/' + dl + cs
parms['ts'] = int(round(time.time() * 1000))
response = requests.get(url=url1, params=parms, timeout=10, verify=False) response = requests.get(url=url1, params=parms, timeout=10, verify=False)
print(response.url) print(response.url)
# response = json.loads(response.text) # response = json.loads(response.text)
...@@ -140,9 +144,16 @@ def test_ts1(): ...@@ -140,9 +144,16 @@ def test_ts1():
assert re["status"] == 0 assert re["status"] == 0
# 触点传参时间超过32字符 # 触点传参时间超过13字符
def test_ts2(): def test_ts2():
parms['ts'] = zf35 parms['ts'] = '16462909436611'
re = send_request('Yzuiuma', '')
assert re["status"] == 167
# 触点传参时间等于13字符,但是包含特殊字符
def test_ts3():
parms['ts'] = '1@46290943661'
re = send_request('Yzuiuma', '') re = send_request('Yzuiuma', '')
assert re["status"] == 167 assert re["status"] == 167
...@@ -230,6 +241,12 @@ def test_os2(): ...@@ -230,6 +241,12 @@ def test_os2():
re = send_request('Yzuiuma', '') re = send_request('Yzuiuma', '')
assert re["status"] == 0 assert re["status"] == 0
# 操作系统正常
def test_os3():
parms['os'] = 'android'
re = send_request('Yzuiuma', '')
assert re["status"] == 0
# 设备型号为空 # 设备型号为空
def test_model1(): def test_model1():
......
...@@ -97,7 +97,7 @@ def send_request(dl, cs): ...@@ -97,7 +97,7 @@ def send_request(dl, cs):
# idfa为空 # idfa为空
def test_idfa1(): def test_idfa1():
parms['idfa'] = '' parms['idfa'] = ''
re = send_request('nEFnQra', '') re = send_request('QJZfmma', '')
assert re["status"] == 0 assert re["status"] == 0
# idfa为全0 # idfa为全0
......
import turtle as t
import turtle as t
import math
# 取消绘图过程
#t.tracer(0)
#设置速度
t.speed(0)#速度
t.delay(10)#延迟
#turtle.tracer(False)
#双耳
#左耳
t.penup()
t.goto(-150,200)
t.setheading(160)
t.begin_fill()
t.pendown()
t.circle(-30,230)
t.setheading(180)
t.circle(37,90)
t.end_fill()
#右耳
t.penup()
t.goto(60,200)
t.setheading(20)
t.begin_fill()
t.pendown()
t.circle(30,230)
t.setheading(0)
t.circle(-37,90)
t.end_fill()
#头
t.pensize(5)
t.penup()
t.goto(-113,237)
t.setheading(30)
t.pendown()
t.circle(-134,60)
t.penup()
t.goto(-150,200)
t.setheading(-120)
t.pendown()
t.circle(200,80)
t.penup()
t.goto(60,200)
t.setheading(-60)
t.pendown()
t.circle(-200,80)
t.penup()
t.setheading(210)
t.pendown()
t.circle(-120,60)
#双眼
#左眼
#眼圈
t.penup()
t.goto(-140,100)
t.setheading(-45)
t.begin_fill()
t.pendown()
a = 0.2
for i in range(120):
if 0<=i<30 or 60<=i<90:
a=a+0.1
t.lt(3) #向左转3度
t.fd(a) #向前走a的步长
else:
a=a-0.1
t.lt(3)
t.fd(a)
t.end_fill()
#眼白
t.fillcolor("white")
t.penup()
t.goto(-103,125)
t.setheading(0)
t.begin_fill()
t.pendown()
t.circle(13,360)
t.end_fill()
#眼珠
t.fillcolor("sienna")
t.pencolor("sienna")
t.penup()
t.goto(-102,133)
t.setheading(0)
t.begin_fill()
t.pendown()
t.circle(5,360)
t.end_fill()
#右眼
#眼圈
t.penup()
t.goto(50,100)
t.setheading(45)
t.fillcolor("black")
t.pencolor("black")
t.begin_fill()
t.pendown()
a = 0.2
for i in range(120):
if 0<=i<30 or 60<=i<90:
a=a+0.1
t.lt(3) #向左转3度
t.fd(a) #向前走a的步长
else:
a=a-0.1
t.lt(3)
t.fd(a)
t.end_fill()
#眼白
t.fillcolor("white")
t.penup()
t.goto(13,125)
t.setheading(0)
t.begin_fill()
t.pendown()
t.circle(13,360)
t.end_fill()
#眼珠
t.fillcolor("sienna")
t.pencolor("sienna")
t.penup()
t.goto(12,133)
t.setheading(0)
t.begin_fill()
t.pendown()
t.circle(5,360)
t.end_fill()
#鼻子
t.pencolor("black")
t.fillcolor("black")
t.penup()
t.goto(-55,133)
t.begin_fill()
t.pendown()
t.fd(20)
t.seth(-120)
t.fd(20)
t.seth(120)
t.fd(20)
t.end_fill()
#嘴
t.penup()
t.goto(-70,110)
t.setheading(-30)
t.fillcolor("red")
t.begin_fill()
t.pendown()
t.circle(50,60)
t.setheading(-120)
t.circle(-100,15)
t.circle(-15,90)
t.circle(-100,15)
t.end_fill()
#四肢
#左臂
t.penup()
t.goto(-175,100)
t.fillcolor("black")
t.begin_fill()
t.setheading(-120)
t.pendown()
t.fd(100)
t.setheading(-110)
t.circle(20,180)
t.fd(30)
t.circle(-5,160)
t.end_fill()
#右臂
t.penup()
t.goto(85,100)
t.setheading(60)
t.begin_fill()
t.pendown()
t.fd(100)
t.setheading(70)
t.circle(20,180)
t.fd(30)
t.circle(-5,160)
t.end_fill()
#小红心
t.penup()
t.pencolor("red")
t.fillcolor('red')
t.goto(105,200)
t.begin_fill()
t.pendown()
t.circle(-5,180)
t.setheading(90)
t.circle(-5,180)
t.setheading(-120)
t.fd(17)
t.penup()
t.goto(105,200)
t.pendown()
t.setheading(-60)
t.fd(17)
t.end_fill()
t.pencolor("black")
t.fillcolor("black")
#左腿
t.penup()
t.goto(-120,-45)
t.begin_fill()
t.pendown()
t.setheading(-90)
t.circle(-140,20)
t.circle(5,109)
t.fd(30)
t.circle(10,120)
t.setheading(90)
t.circle(-140,10)
t.end_fill()
#右腿
t.penup()
t.goto(30,-45)
t.begin_fill()
t.pendown()
t.setheading(-90)
t.circle(140,20)
t.circle(-5,109)
t.fd(30)
t.circle(-10,120)
t.setheading(90)
t.circle(140,10)
t.end_fill()
#冰糖外壳
t.pensize(1)
t.penup()
t.goto(-160,195)
t.setheading(160)
t.pendown()
t.circle(-40,230)
t.setheading(30)
t.circle(-134,58)
t.setheading(60)
t.circle(-40,215)
t.setheading(-60)
t.fd(15)
t.circle(2,200)
t.setheading(65)
t.fd(30)
t.circle(-25,180)
t.fd(100)
t.circle(2,25)
t.circle(-200,47)
t.circle(2,60)
t.circle(140,23)
t.circle(-2,90)
t.setheading(180)
t.fd(70)
t.circle(-2,90)
t.fd(30)
t.setheading(-160)
t.circle(-100,35)
t.setheading(-90)
t.fd(30)
t.circle(-2,90)
t.fd(70)
t.circle(-2,90)
t.setheading(60)
t.circle(140,30)
t.circle(2,45)
t.circle(-200,19)
t.circle(2,130)
t.fd(30)
t.circle(-25,180)
t.fd(100)
t.setheading(90)
t.circle(-200,30)
#冰糖面罩
t.pensize(3)
t.penup()
t.goto(65,120)
t.setheading(90)
t.pendown()
t.pencolor("red")
a = 1
for i in range(120):
if 0<=i<30 or 60<=i<90: #控制a的变化
a=a+0.25
t.lt(3) #向左转3度
t.fd(a) #向前走a的步长
else:
a=a-0.25
t.lt(3)
t.fd(a)
t.pencolor("orange")
t.penup()
t.goto(66,120)
t.pendown()
a = 1
for i in range(120):
if 0<=i<30 or 60<=i<90:
a = a + 0.255
t.lt(3)
t.fd(a)
else:
a = a - 0.255
t.lt(3)
t.fd(a)
t.pencolor("green")
t.penup()
t.goto(67,120)
t.pendown()
a = 1
for i in range(120):
if 0<=i<30 or 60<=i<90:
a = a + 0.2555
t.lt(3)
t.fd(a)
else:
a = a - 0.2555
t.lt(3)
t.fd(a)
t.pencolor("deep sky blue")
t.penup()
t.goto(68,120)
t.pendown()
a = 1
for i in range(120):
if 0<=i<30 or 60<=i<90:
a = a + 0.25955
t.lt(3)
t.fd(a)
else:
a = a - 0.25955
t.lt(3)
t.fd(a)
t.pencolor("pink")
t.penup()
t.goto(71,120)
t.pendown()
a = 1
for i in range(120):
if 0<=i<30 or 60<=i<90:
a = a + 0.26
t.lt(3)
t.fd(a)
else:
a = a - 0.26
t.lt(3)
t.fd(a)
t.pencolor("purple")
t.penup()
t.goto(72,120)
t.pendown()
a = 1
for i in range(120):
if 0<=i<30 or 60<=i<90:
a = a + 0.269
t.lt(3)
t.fd(a)
else:
a = a - 0.269
t.lt(3)
t.fd(a)
###五环
##t.penup()
##t.goto(-55,-10)
##t.pendown()
##t.pencolor("blue")
##t.circle(10)
##t.penup()
##t.goto(-40,-10)
##t.pendown()
##t.pencolor("black")
##t.circle(10)
##t.penup()
##t.goto(-25,-10)
##t.pendown()
##t.pencolor("red")
##t.circle(10)
##t.penup()
##t.goto(-50,-20)
##t.pendown()
##t.pencolor("yellow")
##t.circle(10)
##t.penup()
##t.goto(-30,-20)
##t.pendown()
##t.pencolor("green")
##t.circle(10)
# 直接贴图片
# t.register_shape("北京.gif") # 注册形状
t1 = t.Turtle()
# t1.shape("北京.gif")
t1.penup()
t1.goto(-45,-10)
#t.update()
t.done()
...@@ -2,15 +2,18 @@ from yanchidp.dp import allEvent ...@@ -2,15 +2,18 @@ from yanchidp.dp import allEvent
import socket import socket
import struct import struct
import random import random
import time
# appkey = '16dc0cb882d3dbec4f7f66251a84d6dd'
# for _ in range(1):
# # 随机生成12为数组
# # i = ''.join(str(random.choice(range(10))) for _ in range(12))
# i = '352745509625'
# # 随机生成ip
# ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff)))
# # ip = '100.120.179.101'
# # allEvent().ziding_event(i,ip,appkey,event)
# allEvent().dp_imei(i, appkey)
# # allEvent().dp_ios(i, appkey)
appkey = '16dc0cb882d3dbec4f7f66251a84d6dd' current_time_13 = int(round(time.time() * 1000))
for _ in range(1): print(current_time_13)
# 随机生成12为数组
# i = ''.join(str(random.choice(range(10))) for _ in range(12))
i = '352745509625'
# 随机生成ip
ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff)))
# ip = '100.120.179.101'
# allEvent().ziding_event(i,ip,appkey,event)
allEvent().dp_imei(i, appkey)
# allEvent().dp_ios(i, appkey)
\ No newline at end of file
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