[轉]Wing IDE 6.0 安裝及算號器註冊機代碼

來源:互聯網
上載者:User

標籤:分享   result   raw   代碼   oms   mat   har   inline   top   

 

下載安裝wing

 

選擇第三個,運行算號器,輸入license id

輸入request id。

 

 

 

Python 2 算號器註冊機代碼

import stringimport randomimport shaBASE16 = ‘0123456789ABCDEF‘BASE30 = ‘123456789ABCDEFGHJKLMNPQRTVWXY‘def randomstring(size=20, chars=string.ascii_uppercase + string.digits):    return ‘‘.join((random.choice(chars) for _ in range(size)))def BaseConvert(number, fromdigits, todigits, ignore_negative=True):    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 resdef AddHyphens(code):    return code[:5] + ‘-‘ + code[5:10] + ‘-‘ + code[10:15] + ‘-‘ + code[15:]def SHAToBase30(digest):    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 resultdef loop(ecx, lichash):    part = 0    for c in lichash:        part = ecx * part + ord(c) & 1048575    return partrng = AddHyphens(‘CN‘ + randomstring(18, ‘123456789ABCDEFGHJKLMNPQRTVWXY‘))print ‘License id: ‘ + rngact30 = raw_input(‘Enter request code:‘)lichash = act30hasher = sha.new()hasher.update(act30)hasher.update(rng)lichash = AddHyphens(lichash[:3] + SHAToBase30(hasher.hexdigest().upper()))part5 = format(loop(23, lichash), ‘05x‘) + format(loop(161, lichash), ‘05x‘) + format(loop(47, lichash),                                                                                      ‘05x‘) + format(loop(9, lichash),                                                                                                      ‘05x‘)part5 = BaseConvert(part5.upper(), BASE16, BASE30)while len(part5) < 17:    part5 = ‘1‘ + part5part5 = ‘AXX‘ + part5print ‘Activation code: ‘ + AddHyphens(part5)

 

Python 3 算號器註冊機代碼

import stringimport randomimport hashlibBASE16 = ‘0123456789ABCDEF‘BASE30 = ‘123456789ABCDEFGHJKLMNPQRTVWXY‘def randomstring(size=20, chars=string.ascii_uppercase + string.digits):    return ‘‘.join((random.choice(chars) for _ in range(size)))def BaseConvert(number, fromdigits, todigits, ignore_negative=True):    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 //= len(todigits)    if neg:        res = ‘-‘ + res    return resdef AddHyphens(code):    return code[:5] + ‘-‘ + code[5:10] + ‘-‘ + code[10:15] + ‘-‘ + code[15:]def SHAToBase30(digest):    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 resultdef loop(ecx, lichash):    part = 0    for c in lichash:        part = ecx * part + ord(c) & 1048575    return partrng = AddHyphens(‘CN‘ + randomstring(18, ‘123456789ABCDEFGHJKLMNPQRTVWXY‘))print(‘License id: {}‘.format(rng))act30 = input(‘Enter request code:‘)lichash = act30hasher = hashlib.sha1()act30 = act30.encode()hasher.update(act30)rng = rng.encode()hasher.update(rng)lichash = AddHyphens(lichash[:3] + SHAToBase30(hasher.hexdigest().upper()))part5 = format(loop(23, lichash), ‘05x‘) + format(loop(161, lichash), ‘05x‘) + format(loop(47, lichash),                                                                                      ‘05x‘) + format(loop(9, lichash),                                                                                                      ‘05x‘)part5 = BaseConvert(part5.upper(), BASE16, BASE30)while len(part5) < 17:    part5 = ‘1‘ + part5part5 = ‘AXX‘ + part5print(‘Activation code: {}‘.format(AddHyphens(part5)))

[轉]Wing IDE 6.0 安裝及算號器註冊機代碼

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.