1. 程式人生 > >Wing ide 6.0 註冊 ,python 3.6環境

Wing ide 6.0 註冊 ,python 3.6環境

index pytho abc encode cnblogs urn python3 uestc 其中

直接切入主題,套路如下:

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))

Wing ide 6.0 註冊 ,python 3.6環境