1) 安装WingIDE成功后启动,激活时输入license id CN123-12345-12345-12345

2) 点击Continue后弹框,拷贝框中的request code

3) 修改Python脚本中的Request Code为刚才得到的Request Code值,运行脚本后得到激活码,填入即可成功注册

import sha
import string
BASE2 = ''
BASE10 = ''
BASE16 = '0123456789ABCDEF'
BASE30 = '123456789ABCDEFGHJKLMNPQRTVWXY'
BASE36 = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'
BASE62 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz'
BASEMAX = string.printable
def BaseConvert(number, fromdigits, todigits, ignore_negative = True):
""" converts a "number" between two bases of arbitrary digits The input number is assumed to be a string of digits from the
fromdigits string (which is in order of smallest to largest
digit). The return value is a string of elements from todigits
(ordered in the same way). The input and output bases are
determined from the lengths of the digit strings. Negative
signs are passed through. decimal to binary
>>> baseconvert(555,BASE10,BASE2)
'1000101011' binary to decimal
>>> baseconvert('1000101011',BASE2,BASE10)
'555' integer interpreted as binary and converted to decimal (!)
>>> baseconvert(1000101011,BASE2,BASE10)
'555' base10 to base4
>>> baseconvert(99,BASE10,"0123")
'1203' base4 to base5 (with alphabetic digits)
>>> baseconvert(1203,"0123","abcde")
'dee' base5, alpha digits back to base 10
>>> baseconvert('dee',"abcde",BASE10)
'99' decimal to a base that uses A-Z0-9a-z for its digits
>>> baseconvert(257938572394L,BASE10,BASE62)
'E78Lxik' ..convert back
>>> baseconvert('E78Lxik',BASE62,BASE10)
'257938572394' binary to a base with words for digits (the function cannot convert this back)
>>> baseconvert('1101',BASE2,('Zero','One'))
'OneOneZeroOne' """
if not ignore_negative and str(number)[0] == '-':
number = str(number)[1:]
neg = 1
else:
neg = 0
x = long(0)
for digit in str(number):
x = x * len(fromdigits) + fromdigits.index(digit) res = ''
while x > 0:
digit = x % len(todigits)
res = todigits[digit] + res
x /= len(todigits) if neg:
res = '-' + res
return res def SHAToBase30(digest):
"""Convert from a hexdigest form SHA hash into a more compact and
ergonomic BASE30 representation. This results in a 17 'digit'
number."""
tdigest = ''.join([ c for i, c in enumerate(digest) if i / 2 * 2 == i ])
result = BaseConvert(tdigest, BASE16, BASE30)
while len(result) < 17:
result = '' + result return result
def AddHyphens(code):
"""Insert hyphens into given license id or activation request to
make it easier to read"""
return code[:5] + '-' + code[5:10] + '-' + code[10:15] + '-' + code[15:] LicenseID='CN123-12345-12345-12345'
#Copy the Request Code from the dialog
RequestCode='RW51D-H2H9H-C1565-6EY29'
hasher = sha.new()
hasher.update(RequestCode)
hasher.update(LicenseID)
digest = hasher.hexdigest().upper()
lichash = RequestCode[:3] + SHAToBase30(digest)
lichash=AddHyphens(lichash) #Calculate the Activation Code
data=[7,123,23,87]
tmp=0
realcode=''
for i in data:
for j in lichash:
tmp=(tmp*i+ord(j))&0xFFFFF
realcode+=format(tmp,'=05X')
tmp=0 act30=BaseConvert(realcode,BASE16,BASE30)
while len(act30) < 17:
act30 = '' + act30
act30='AXX'+act30
act30=AddHyphens(act30)
print "The Activation Code is: "+act30

最新文章

  1. LINQ系列:Linq to Object分组操作符
  2. Bootstrap &lt;基础十二&gt;下拉菜单(Dropdowns)
  3. 后台首页品字形(frameset)框架搭建
  4. hdu 4325 树状数组+离散化
  5. CentOS 7.0 安装 python3.X 脚本
  6. BZOJ 1711: [Usaco2007 Open]Dingin吃饭( 最大流 )
  7. android生成apk包出现Unable to add &amp;quot;XXX&amp;quot; Zip add failed问题
  8. yii migrate 设计博客
  9. Ubuntu安装Nginx+PHP7.0.4+MySQL5.6
  10. Tomcat知识1
  11. bootstrap4 Reboot details summary 美化(点选禁止选中文本,单行隐藏角标,多行后移)
  12. 【BZOJ5292】[BJOI2018]治疗之雨(高斯消元)
  13. 对于League of Legends的分析
  14. SQL Server分页进化
  15. vue UI框架
  16. Ansible 快速上手(转)
  17. [解决]java.lang.IllegalArgumentException: Bad level &quot;DEBUG&quot;
  18. java类中serialversionuid 作用 是什么?举个例子说明(转)
  19. PAT 1143 Lowest Common Ancestor[难][BST性质]
  20. css3组件实战--绚丽效果篇

热门文章

  1. js实现小数点四舍五入
  2. UVa1601 - The Morning after Halloween [单向bfs]
  3. java Eclipse的使用技巧
  4. HDU 3746 Cyclic Nacklace(kmp next数组运用)
  5. 【codeforces 749B】Parallelogram is Back
  6. vue面试的一些总结
  7. BIO、NIO、AIO 个人总结
  8. Xgboost参数调节
  9. eclipse中部署web项目时报错java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener的解决方法
  10. easyUI dataGrid主从表点击展开问题