Wing ide 6.0 注册 ,python 3.6环境
直接切入主题,套路如下:
1、选择手动输入license
license number输入:CN123-12345-12345-12345
2、在下一步中,选择第二项,拷贝的request code
3、运行下述脚本:
其中licenseid 输入:CN123-12345-12345-12345
Request code 输入:第二步获取的值。
得到激活码。
1 #coding = utf-8 2 #!/usr/bin/env python3 3 4 LicenseID='CN123-12345-12345-12345' 5 RequestCode='RW634-TEC3Q-6P859-N6PV4' 6 7 import hashlib 8 B16 = '0123456789ABCDEF' 9 B30 = '123456789ABCDEFGHJKLMNPQRTVWXY' 10 def B(n,f,t): 11 xx = 0 12 for d in str(n): 13 xx = xx * len(f) + f.index(d) 14 res = '' 15 while xx > 0: 16 res=t[int(xx%len(t))]+res 17 xx//=len(t) 18 return res 19 def S(D): 20 r = B(''.join([c for i,c in enumerate(D) if i//2*2==i]),B16,B30) 21 while len(r) < 17: 22 r = '1' + r 23 return r 24 def A(c): 25 return c[:5]+'-'+c[5:10]+'-'+c[10:15]+'-'+c[15:] 26 h = hashlib.sha1() 27 h.update(RequestCode.encode('utf-8')+LicenseID.encode('utf-8')) 28 lichash=A(RequestCode[:3]+S(h.hexdigest().upper()) ) 29 data=[23,161,47,9] 30 tmp=0 31 realcode='' 32 for i in data: 33 for j in lichash: 34 tmp=(tmp*i+ord(j))&0xFFFFF 35 realcode+=format(tmp,'=05X') 36 tmp=0 37 D=B(realcode,B16,B30) 38 while len(D) < 17: 39 D = '1' + D 40 print("The Activation Code is: "+A('AXX'+D))