赞
踩
- import math
- import time
- import hashlib
-
- def as_cp_clac():
- t = int(time.time())
- print(t)
- a = hex(t)
- a = a.upper()
- a = a.lstrip('0X')
- print(a)
- e = hashlib.md5()
- e.update(str(t).encode(encoding='utf-8'))
- e = e.hexdigest().upper()
-
- if len(a) != 8:
- as_str = "479BB4B7254C150"
- cp_str = "7E0AC8874BB0985"
- else:
- s = e[0:5]
- o = e[-5:]
- n = ''
- l = ''
- for i in range(0,5):
- n += s[i] + a[i]
- for j in range(0,5):
- l += a[j+3] + o[j]
- as_str = 'A1' + n + a[-3:]
- cp_str = a[0:3] + l + 'E1'
- return as_str, cp_str
-
- """
- !function(t) {
- var i = {};
- i.getHoney = function() {
- # 获取毫秒数,
- var t = Math.floor((new Date).getTime() / 1e3)
- # 将 t 转为 16 进制
- , i = t.toString(16).toUpperCase()
- , e = md5(t).toString().toUpperCase();
- if (8 != i.length)
- return {
- as: "479BB4B7254C150",
- cp: "7E0AC8874BB0985"
- };
- for (var s = e.slice(0, 5), o = e.slice(-5), n = "", a = 0; 5 > a; a++)
- n += s[a] + i[a];
- for (var l = "", r = 0; 5 > r; r++)
- l += i[r + 3] + o[r];
- return {
- as: "A1" + n + i.slice(-3),
- cp: i.slice(0, 3) + l + "E1"
- }
- }
- ,
- """
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。