標籤:char 破解 new omd linux size index ret 寫入
01 設定Python環境
02 破解WingIDE
(1)下載專業版wingide
http://wingware.com/downloads/wing-pro/6.0.11-1/binaries&os=linux64
(2)破解代碼crack.py
1 import string 2 import random 3 import sha 4 5 BASE16 = ‘0123456789ABCDEF‘ 6 BASE30 = ‘123456789ABCDEFGHJKLMNPQRTVWXY‘ #charset of License 7 8 9 def randomstring(size=20, chars=string.ascii_uppercase + string.digits):10 return ‘‘.join((random.choice(chars) for _ in range(size))) #generate random License11 12 13 def BaseConvert(number, fromdigits, todigits, ignore_negative=True):14 if not ignore_negative and str(number)[0] == ‘-‘:15 number = str(number)[1:]16 neg = 117 else:18 neg = 019 x = long(0)20 for digit in str(number):21 x = x * len(fromdigits) + fromdigits.index(digit)22 23 res = ‘‘24 while x > 0:25 digit = x % len(todigits)26 res = todigits[digit] + res27 x /= len(todigits)28 29 if neg:30 res = ‘-‘ + res31 return res32 33 34 def AddHyphens(code):35 return code[:5] + ‘-‘ + code[5:10] + ‘-‘ + code[10:15] + ‘-‘ + code[15:] #change format36 37 38 def SHAToBase30(digest):39 tdigest = ‘‘.join([c for i, c in enumerate(digest) if i / 2 * 2 == i])40 result = BaseConvert(tdigest, BASE16, BASE30)41 while len(result) < 17:42 result = ‘1‘ + result43 return result44 45 46 def loop(ecx, lichash):47 part = 048 for c in lichash:49 part = ecx * part + ord(c) & 104857550 return part51 52 rng = AddHyphens(‘CN‘ + randomstring(18, ‘123456789ABCDEFGHJKLMNPQRTVWXY‘))53 print ‘License id: ‘ + rng #generate License id and write it in wing54 act30 = raw_input(‘Enter request code:‘) #get request code from wing55 lichash = act3056 hasher = sha.new()57 hasher.update(act30) #sha request code58 hasher.update(rng) #sha license id59 lichash = AddHyphens(lichash[:3] + SHAToBase30(hasher.hexdigest().upper()))60 61 part5 = format(loop(23, lichash), ‘05x‘) + format(loop(161, lichash), ‘05x‘) + format(loop(47, lichash),62 ‘05x‘) + format(loop(9, lichash),63 ‘05x‘)64 part5 = BaseConvert(part5.upper(), BASE16, BASE30)65 while len(part5) < 17:66 part5 = ‘1‘ + part567 68 part5 = ‘AXX‘ + part569 print ‘Activation code: ‘ + AddHyphens(part5) #output Activation code and write it in wing
(3) 破解wing
step1 運行crack.py,得到License id,把License id輸入進wing
step2 從wing中複製request code, 輸入crack.py的輸入框
step3 從crack.py得到Activation code,寫入wing
【Python】Part I 設定Python環境