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

【Python】Part I 设置Python环境

时间:2018-05-10 11:30:37      阅读:249      评论:0      收藏:0      [点我收藏+]

标签: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 License
11  
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 = 1
17     else:
18         neg = 0
19     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] + res
27         x /= len(todigits)
28  
29     if neg:
30         res = - + res
31     return res
32  
33  
34 def AddHyphens(code):
35     return code[:5] + - + code[5:10] + - + code[10:15] + - + code[15:]        #change format
36  
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 + result
43     return result
44  
45  
46 def loop(ecx, lichash):
47     part = 0
48     for c in lichash:
49         part = ecx * part + ord(c) & 1048575
50     return part
51  
52 rng = AddHyphens(CN + randomstring(18, 123456789ABCDEFGHJKLMNPQRTVWXY))
53 print License id:  + rng                                                          #generate License id and write it in wing
54 act30 = raw_input(Enter request code:)                                            #get request code from wing
55 lichash = act30
56 hasher = sha.new()
57 hasher.update(act30)                                                                #sha request code
58 hasher.update(rng)                                                                  #sha license id
59 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 + part5
67  
68 part5 = AXX + part5
69 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环境

标签:char   破解   new   omd   linux   size   index   ret   写入   

原文地址:https://www.cnblogs.com/sunieve/p/9017871.html

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