某工具的python注册机

前言

博客发布的一切破解补丁、注册机和注册信息及软件的解密分析文章仅限用于学习和研究目的;不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负。 本站信息来自网络,版权争议与本站无关。您必须在下载后的24个小时之内,从您的电脑中彻底删除上述内容。如果您喜欢该程序,请支持正版软件,购买注册,得到更好的正版服务。如有侵权请邮件与我们联系处理。

某工具的python注册机

安装依赖

1
python -m pip install pycryptodome

代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import base64
import os
from Crypto.Cipher import AES
from Crypto.Util.Padding import pad
def sub_4832B0(a1, a2, a3):
# for ( i = 7; i >= 0; --i )
for i in range(7, -1, -1):
result = a2 - 1;
v4 = (a3 >> (4 * i)) & 0x0F;
v5 = a2 - 1;
if (v4 <= a2 - 1):
while (v4 <= result):

if ((result & 1) != 0):
v6 = a1[result - v4];
a1[result - v4] = a1[v5];
a1[v5] = v6;
result-=1
v5-=1

print(''.join(map(chr,a1)))
# while ( v4 <= result );
return result;
def mcrc16(x: bytes) -> bytes:
a = 0xFFFF
b = 0xA001
for byte in x:
a ^= byte
for i in range(8):
last = a % 2
a >>= 1
if last == 1:
a ^= b
return a.to_bytes(2, 'little')
def kg(aeskey: str):
aeskey = aeskey.replace('-', '').encode()
info = aeskey
info += b'1234'
info += b'5678'
info += b'\x4b\x48\x00\x00'
info += 0x07ffffff.to_bytes(4, 'little')
info += b'\x66\x00'
info += b'ABCDEF'
info += 0x00.to_bytes(2, 'little') # donot Transform
# info=bytes(sub_4832B0(list(info), len(info), 0))
info += mcrc16(info)
aescipher = AES.new(key=aeskey, mode=AES.MODE_ECB)
bs = aescipher.encrypt(pad(info, 16))
lic = base64.b64encode(bs).decode()
licpath = os.path.expanduser('~')+r'\AppData\Roaming\Cmsoft\NetAssist.lic'
print(lic)
print('注册指定过不了网络验证,但可以写入lic文件')
print('lic文件路径:'+licpath)
x = input("是否写入lic文件?(y)").lower()
if x == 'y':
with open(licpath, 'w') as f:
f.write(lic)
# aescipher.decrypt( )


if __name__ == '__main__':
mid = input("请输入终端识别码:")
kg(mid)

运行该代码即可