您的位置:首页 > 编程语言 > Python开发

WingIDE破解 python2.x和python3.x

2015-08-28 02:43 639 查看
WingIDE是专业的Python编程工具,下面就介绍下它的破解过程。

官方下载路径:http://wingware.com/

之前的破解代码是用python2.X编写的,由于3.X与2.X存在差异,因此直接用2.X的代码运行在3.X环境下会报错误。修改后的代码能在3.X环境运行,解决了由于安装3.X版本导致无法破解WingIDE的情况。以下测试环境:win7\XP、WingIDE Professional 5.1.7、Python 3.4.3,其他版本自行测试。

python 2.X 破解代码

import sha
import string
BASE2 = '01'
BASE10 = '0123456789'
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
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 = '1' + 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'
RequestCode='AAAAA-AAAAA-AAAAA-AAAAA'

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 = '1' + act30
act30='AXX'+act30
act30=AddHyphens(act30)
print "The Activation Code is: "+act30

raw_input()


python 3.X 破解代码

import hashlib
import string
BASE2 = '01'
BASE10 = '0123456789'
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
if not ignore_negative and str(number)[0] == '-':
number = str(number)[1:]
neg = 1
else:
neg = 0
x = 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 =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 = '1' + 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'
RequestCode='AAAAA-AAAAA-AAAAA-AAAAA'

hasher = hashlib.sha1()
hasher.update(RequestCode.encode("utf-8"))
hasher.update(LicenseID.encode("utf-8"))
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 = '1' + act30
act30='AXX'+act30
act30=AddHyphens(act30)
print('The Activation Code is:'+act30)

input


破解步骤:

1、启动WingIDE,打开注册对话框,选择“Install and activate a permanent license.Enter license id:”,并输入 CN123-12345-12345-12345 ,点击continue



2、选择”Or: Activate manually at http://wingware.com/activate“ ,复制request code替换代码中的RequestCode变量



3、获得注册码

如果设置了python环境变量,可以直接在DOS下运行代码:

复制代码到记事本,文件保存为test.py,在dos下输入python test.py运行代码。





如果没有设置,可以在WingIDE中运行代码:

关闭注册对话框,新建一个工程,复制代码并运行,复制得到的注册码,点击Help-->Enter License重新打开注册对话框。



4、注册WingIDE

将获得的注册码粘贴到”provided activation key here:“,点击continue完成注册



5、注册成功

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息