Initial commit: Bandizip Professional Patcher & Keygen
- bandizip_patcher.py: one-click patcher (backup/patch/restore/status) - bandizip_keygen.py: product key generator - 8 patches, 35 bytes total
This commit is contained in:
@@ -0,0 +1,194 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Bandizip Professional Keygen
|
||||
=============================
|
||||
生成 Bandizip Professional 注册码。
|
||||
|
||||
注意:需要配合 patch 后的 Bandizip.exe 使用。
|
||||
Patch 内容:
|
||||
- sub_1400D18F0 (在线验证) -> return 1
|
||||
- sub_1400CF980 (写注册表) -> return 1
|
||||
- sub_1400CF470 (读 Edition) -> return 1
|
||||
- 4x NOP (注册码格式检查)
|
||||
- 版本号默认值 0x98 -> 0x3D4 (Standard -> Professional)
|
||||
|
||||
使用方法:
|
||||
python bandizip_keygen.py
|
||||
python bandizip_keygen.py user@example.com
|
||||
"""
|
||||
|
||||
import random
|
||||
import string
|
||||
import hashlib
|
||||
import time
|
||||
import sys
|
||||
import os
|
||||
|
||||
|
||||
# ============ 注册码格式 ============
|
||||
# Bandizip 注册码格式: XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX
|
||||
# 每段 8 个十六进制字符,共 4 段
|
||||
# 原始验证流程已被 patch,任意格式均可通过
|
||||
|
||||
def generate_product_key(seed=None):
|
||||
"""
|
||||
生成 Bandizip 产品密钥
|
||||
格式: XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX
|
||||
"""
|
||||
if seed:
|
||||
# 使用种子生成确定性密钥
|
||||
rng = random.Random(seed)
|
||||
else:
|
||||
rng = random.Random()
|
||||
|
||||
segments = []
|
||||
for _ in range(4):
|
||||
seg = ''.join(rng.choices('0123456789ABCDEF', k=8))
|
||||
segments.append(seg)
|
||||
|
||||
return '-'.join(segments)
|
||||
|
||||
|
||||
def generate_license_data(email):
|
||||
"""
|
||||
生成完整的许可证数据
|
||||
"""
|
||||
# 基于 email 生成种子
|
||||
seed = int(hashlib.md5(email.encode()).hexdigest()[:8], 16)
|
||||
|
||||
# 生成产品密钥
|
||||
product_key = generate_product_key(seed)
|
||||
|
||||
# 生成 GUID(模拟服务器返回的)
|
||||
guid = '%08X-%04X-%04X-%04X-%012X' % (
|
||||
seed & 0xFFFFFFFF,
|
||||
(seed >> 8) & 0xFFFF,
|
||||
(seed >> 16) & 0xFFFF,
|
||||
(seed >> 24) & 0xFFFF,
|
||||
seed & 0xFFFFFFFFFFFF
|
||||
)
|
||||
|
||||
# 生成硬件 ID(模拟)
|
||||
hid = '%08X' % (seed ^ 0xDEADBEEF)
|
||||
|
||||
# 产品 ID (1000 = Professional)
|
||||
product_id = 1000
|
||||
|
||||
return {
|
||||
'email': email,
|
||||
'productKey': product_key,
|
||||
'guid': guid,
|
||||
'hid': hid,
|
||||
'productID': product_id,
|
||||
'edition': 'PRO',
|
||||
'timestamp': seed % 0x7FFFFFFF, # 稳定值,基于 email 种子
|
||||
}
|
||||
|
||||
|
||||
def format_license(data):
|
||||
"""
|
||||
格式化许可证信息
|
||||
"""
|
||||
lines = [
|
||||
'==================================================',
|
||||
' Bandizip Professional License ',
|
||||
'==================================================',
|
||||
f' Email: {data["email"]}',
|
||||
f' Product Key: {data["productKey"]}',
|
||||
f' Edition: {data["edition"]}',
|
||||
f' Product ID: {data["productID"]}',
|
||||
f' GUID: {data["guid"]}',
|
||||
f' HID: {data["hid"]}',
|
||||
'==================================================',
|
||||
]
|
||||
return '\n'.join(lines)
|
||||
|
||||
|
||||
def write_registry(data):
|
||||
"""
|
||||
写入 Windows 注册表(需要管理员权限)
|
||||
"""
|
||||
try:
|
||||
import winreg
|
||||
except ImportError:
|
||||
print(' [!] 非 Windows 系统,跳过注册表写入')
|
||||
return False
|
||||
|
||||
key_path = r'SOFTWARE\Bandizip'
|
||||
|
||||
try:
|
||||
# 写入 Edition
|
||||
with winreg.CreateKeyEx(winreg.HKEY_LOCAL_MACHINE, key_path, 0, winreg.KEY_SET_VALUE) as key:
|
||||
winreg.SetValueEx(key, 'Edition', 0, winreg.REG_SZ, data['edition'])
|
||||
|
||||
print(f' [OK] Edition = {data["edition"]}')
|
||||
return True
|
||||
except PermissionError:
|
||||
print(' [!] 需要管理员权限写入注册表')
|
||||
print(f' 请手动执行:')
|
||||
print(f' reg add "HKLM\\{key_path}" /v Edition /t REG_SZ /d "{data["edition"]}" /f')
|
||||
return False
|
||||
except Exception as e:
|
||||
print(f' [!] 注册表写入失败: {e}')
|
||||
return False
|
||||
|
||||
|
||||
def main():
|
||||
print('==================================================')
|
||||
print(' Bandizip Professional Keygen v1.0 ')
|
||||
print('==================================================')
|
||||
print()
|
||||
|
||||
# 获取 email
|
||||
if len(sys.argv) > 1:
|
||||
email = sys.argv[1]
|
||||
else:
|
||||
email = input('请输入邮箱地址: ').strip()
|
||||
if not email:
|
||||
email = 'user@bandizip.local'
|
||||
|
||||
print(f'\n[Email] {email}')
|
||||
print(f'[Keygen] 生成注册码...\n')
|
||||
|
||||
# 生成许可证数据
|
||||
data = generate_license_data(email)
|
||||
|
||||
# 显示许可证
|
||||
print(format_license(data))
|
||||
print()
|
||||
|
||||
# 询问是否写入注册表
|
||||
if sys.platform == 'win32':
|
||||
print('是否写入注册表? (y/n): ', end='')
|
||||
try:
|
||||
choice = input().strip().lower()
|
||||
if choice == 'y':
|
||||
write_registry(data)
|
||||
except EOFError:
|
||||
pass
|
||||
|
||||
print(f'\n[Steps] Registration:')
|
||||
print(f' 1. Open Bandizip')
|
||||
print(f' 2. Menu -> Help -> Register')
|
||||
print(f' 3. Email: {data["email"]}')
|
||||
print(f' 4. Product Key: {data["productKey"]}')
|
||||
print(f' 5. Click Register')
|
||||
print()
|
||||
|
||||
# 保存到文件
|
||||
license_file = os.path.join(os.path.dirname(__file__), 'bandizip_license.txt')
|
||||
with open(license_file, 'w', encoding='utf-8') as f:
|
||||
f.write(format_license(data) + '\n')
|
||||
f.write(f'\nEmail: {data["email"]}\n')
|
||||
f.write(f'Product Key: {data["productKey"]}\n')
|
||||
f.write(f'Edition: {data["edition"]}\n')
|
||||
f.write(f'Product ID: {data["productID"]}\n')
|
||||
f.write(f'GUID: {data["guid"]}\n')
|
||||
f.write(f'HID: {data["hid"]}\n')
|
||||
f.write(f'Timestamp: {data["timestamp"]}\n')
|
||||
|
||||
print(f' [Save] 许可证已保存到: {license_file}')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
Reference in New Issue
Block a user