值得注意的是,python2的整除/在python3中变成了//,sha方法细化成了sha1和sha256,所以破解文件需要更改加密方式和整除部分的编码方式,经过修改后,这个文件可以完美演算出破解码,你懂得

import hashlib
import string
BASE2 = ''
BASE10 = ''
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 = 0
for digit in str(number):
x = x * len(fromdigits) + fromdigits.index(digit) res = ''
while x > 0:
digit = x % len(todigits)
res = todigits[int(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(str(digest)) if int(i) // 2 * 2 == int(i) ])
result = BaseConvert(tdigest, BASE16, BASE30)
while len(result) < 17:
result = '' + 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'
LicenseID='ENX27-HWM6G-XYVFA-165PG'
#Copy the Request Code from the dialog
RequestCode='RW52X-G93T8-R2927-YJYFX'
hasher = hashlib.sha1()
hasher.update(bytes(RequestCode, 'ascii'))
hasher.update(bytes(LicenseID, 'ascii'))
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 = '' + act30
act30='AXX'+act30
act30=AddHyphens(act30)
print ("The Activation Code is: "+act30)

作为比较,把python2的破解代码放在下方:

import sha
import string
BASE2 = ''
BASE10 = ''
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 ])
print 'tdigest',tdigest
result = BaseConvert(tdigest, BASE16, BASE30)
while len(result) < 17:
result = '' + 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' LicenseID='ENX27-HWM6G-XYVFA-165PG'
#Copy the Request Code from the dialog
RequestCode='RW52X-G93T8-R2927-YJYFX'
hasher = sha.new() hasher.update(RequestCode)
hasher.update(LicenseID)
digest = hasher.hexdigest().upper()
lichash = RequestCode[:3] + SHAToBase30(digest)
#print 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 = '' + act30
act30='AXX'+act30
act30=AddHyphens(act30)
print ("The Activation Code is: "+act30)

用python3破解wingIDE的更多相关文章

  1. python3 破解 geetest(极验)的滑块验证码

    Kernel_wu 快速学习的实践者 python3 破解 geetest(极验)的滑块验证码 from selenium import webdriver from selenium.webdriv ...

  2. 破解wingide编辑器

    先到官网下载最新版的wingide(我下载的是5.1.11-1),然后安装,打开,出现下面的界面时选第三个,然后输入“ENX27-HWM6G-XYVFA-165PG”,如下图所示: 接下来你软件会给你 ...

  3. python开发环境搭建(python3.3.2+wing IDE4.1)

    1.下载python http://www.wingide.com/downloads下载最新版python 2.下载Wing IDE http://wingware.com/downloads/wi ...

  4. wing IDE破解方法

    WingIDE是我接触到最好的一款Python编译器了.但其属于商业软件,注册需要一笔不小的费用.因此,这篇简短的文章主要介绍了破解WingIDE的方法.破解软件仅供学习或者教学使用,如果您是商业使用 ...

  5. 【Python】Part I 设置Python环境

    01 设置Python环境 02 破解WingIDE (1)下载专业版wingide http://wingware.com/downloads/wing-pro/6.0.11-1/binaries& ...

  6. 使用uncompyle2直接反编译python字节码文件pyo/pyc

    update:在Mac OS X版的September 10, 2014版(5.0.9-1)中发现安装目录中的src.zip已更换位置至WingIDE.app/Contents/Resources/b ...

  7. python3.6下安装wingIDE破解方法

    1.wingIDE的下载: 在电脑配置好的python环境情况下,去官网下载wingIDE6,按照一般方式安装好.安装好它会自动提示你是否激活,你点击激活.然后到下一步. 2.脚本的制作: impor ...

  8. 最新WingIDE注册破解方法 【转】

    WingIDE是Python程序语言设计的集成开发环境,具有语法标签高亮显示,命令自动完成和函数跳转列表等非常强大的功能.本文主要介绍WingIDE 5安装及注册破解方法. 注:本教程在python ...

  9. WingIDE注册破解方法

    WingIDE是Python程序语言设计的集成开发环境,具有语法标签高亮显示,命令自动完成和函数跳转列表等非常强大的功能.本文主要介绍WingIDE 5安装及注册破解方法. 1. WingIDE 5下 ...

随机推荐

  1. ubuntu common

    系统信息 # uname -a              # 查看内核/操作系统/CPU信息 # cat /etc/issue        # 查看操作系统版本 #cat /proc/version ...

  2. BackgroundWorker组件学习

    今天看到别人的博客中提到了BackgroundWorker组件.在现在的系统中有见到过这个组件,由于实际应用的系统中逻辑比较复杂所以也没深入去看.今天凑巧看到了一个关于BackgroundWorker ...

  3. c# 网络是否连接

    c#  网络是否连接 方案一: using System; using System.Collections.Generic; using System.Linq; using System.Text ...

  4. flex 4 布局样式

    Flex 4 样式与布局 第一篇 Flex 4 与自定义布局(Layout) Flex 4/Spark组件架构的新功能之一是可以定制一个容器的布局而不必改变容器本身.您需要做的就是定义一个自定义布局. ...

  5. js和 jquery对象

    核心提示:jquery选择器得到的jquery对象和标准的 javascript中的document.getElementById()取得的dom对象是两种不同的对象类型,一般情况下,如S(’#id’ ...

  6. 二、理解over()函数

    1.1.两个order by的执行时机分析函数是在整个sql查询结束后(sql语句中的order by的执行比较特殊)再进行的操作, 也就是说sql语句中的order by也会影响分析函数的执行结果: ...

  7. timer的使用

    ; private void timer1_Tick(object sender, EventArgs e) //定时执行事件 { button1.Text = i.ToString();//显示按钮 ...

  8. 《自己动手写操作系统》pmtest2笔记

    ;DispReturn模拟一个回车的显示,(让下一个要显示的字符在下一行的开头处显示),其中edi始终指向要显示的下一个字符的位置.;   ------------------------------ ...

  9. 深入.NET平台和C#编程 错题录

    1.在C#中,关于文件操作相关的类说法正确的是(AB) <选择二项> A:FileInfo类提供了用于操作文件的实例方法 B:File类提供了用于操作文件的静态方法 C:Directory ...

  10. POJ 2524 (简单并查集) Ubiquitous Religions

    题意:有编号为1到n的学生,然后有m组调查,每组调查中有a和b,表示该两个学生有同样的宗教信仰,问最多有多少种不同的宗教信仰 简单并查集 //#define LOCAL #include <io ...