码迷,mamicode.com
首页 > 编程语言 > 详细

Python Wing IDE5.1.8-1 KeyGen

时间:2015-12-22 19:25:13      阅读:291      评论:0      收藏:0      [点我收藏+]

标签:

源码来源于PYG老大的博客: http://www.dllhook.com/post/36.html

测试官网最新版可以注册成功:

技术分享

源码是Python写的,所以需要先安装Python2.7, 3.x的不能运行,飘大已经在博客说了。

注册机源码:

# -*- coding: cp936 -*-
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
    
    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 = 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:]


#Fixed By PiaoYun  改为EN开头,可以支持升级
print("Wing IDE 5.0.8 KeyGen\n请在软件界面输入:EN123-12345-12345-12345 并继续\n");
LicenseID =EN223-57414-34329-41119
#Copy the Request Code from the dialog
#RequestCode =‘RW519-2FW42-1TDRK-VGMW7‘
RequestCode = input("请输入Request Code字符串:\n")

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

安装完Wing IDE,运行,查看源码94行,复制那里的EN开头的Key(key里面的数字可以任意换,符合key的格式就可以),如图:

技术分享

然后continue,不想输入,直接在源码中吧查询的code改一下就可以了,把输入的语句注释掉,如图:

技术分享

运行Python代码即可:

技术分享

技术分享

技术分享

技术分享

 

Python Wing IDE5.1.8-1 KeyGen

标签:

原文地址:http://www.cnblogs.com/dacainiao/p/5067759.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!