Compare commits
9
Commits
d00677c68b
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a854ac9bf | ||
|
|
aacec14d3e | ||
|
|
45d16cfcde | ||
|
|
697e7175e8 | ||
|
|
ef8d1e1e5d | ||
|
|
74c34aec27 | ||
|
|
4f2cdfbb1e | ||
|
|
b9f0c785d8 | ||
|
|
2625b666f6 |
@@ -1,2 +1,72 @@
|
|||||||
# Bandzip-Patched
|
# Bandizip Professional 补丁器 & 注册机
|
||||||
|
|
||||||
|
> Bandizip 专业版一键补丁工具与注册码生成器。
|
||||||
|
|
||||||
|
[](https://www.python.org/)
|
||||||
|
[](https://zh.wikipedia.org/wiki/Microsoft_Windows)
|
||||||
|
[](LICENSE)
|
||||||
|
|
||||||
|
## 简介
|
||||||
|
|
||||||
|
一键修补 Bandizip 主程序,激活专业版功能。自动检测安装路径,支持备份恢复,附带注册码生成器。纯 Python 实现,零依赖。
|
||||||
|
|
||||||
|
## 功能特性
|
||||||
|
|
||||||
|
- **自动检测** Bandizip 安装路径
|
||||||
|
- **一键修补** — 自动备份、应用补丁、验证结果
|
||||||
|
- **安全恢复** — 随时还原为原始文件
|
||||||
|
- **状态检查** — 查看当前补丁状态
|
||||||
|
- **注册机** — 根据任意邮箱生成产品密钥
|
||||||
|
- **零依赖** — 纯 Python,无需安装第三方包
|
||||||
|
|
||||||
|
## 快速开始
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 1. 应用补丁(需管理员权限)
|
||||||
|
python bandizip_patcher.py patch
|
||||||
|
|
||||||
|
# 2. 生成注册码
|
||||||
|
python bandizip_keygen.py your@email.com
|
||||||
|
|
||||||
|
# 3. 打开 Bandizip → 帮助 → 注册
|
||||||
|
# 输入第 2 步生成的邮箱和注册码
|
||||||
|
```
|
||||||
|
|
||||||
|
## 使用说明
|
||||||
|
|
||||||
|
### 补丁器
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python bandizip_patcher.py # 交互模式
|
||||||
|
python bandizip_patcher.py patch # 应用补丁
|
||||||
|
python bandizip_patcher.py restore # 恢复原始文件
|
||||||
|
python bandizip_patcher.py status # 查看当前状态
|
||||||
|
```
|
||||||
|
|
||||||
|
如果自动检测失败,可手动指定安装路径:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
set BANDIZIP_DIR=C:\Program Files\Bandizip
|
||||||
|
python bandizip_patcher.py patch
|
||||||
|
```
|
||||||
|
|
||||||
|
### 注册机
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python bandizip_keygen.py your@email.com # 指定邮箱生成注册码
|
||||||
|
python bandizip_keygen.py # 交互模式
|
||||||
|
```
|
||||||
|
|
||||||
|
## 环境要求
|
||||||
|
|
||||||
|
- **Python** 3.10+
|
||||||
|
- **Windows** 系统(修补需管理员权限)
|
||||||
|
- 已安装 **Bandizip**
|
||||||
|
|
||||||
|
## 免责声明
|
||||||
|
|
||||||
|
本工具仅供学习交流和个人使用。建议通过购买正版许可证支持软件开发者。使用者需自行承担因使用本工具产生的任何法律责任,作者不对任何滥用行为负责。
|
||||||
|
|
||||||
|
## 许可证
|
||||||
|
|
||||||
|
[MIT](LICENSE)
|
||||||
|
|||||||
@@ -0,0 +1,377 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
Honeycam Professional Patcher & Keygen
|
||||||
|
=======================================
|
||||||
|
一键补丁工具与注册码生成器。
|
||||||
|
|
||||||
|
使用方法:
|
||||||
|
python honeycam_patcher.py # 交互模式
|
||||||
|
python honeycam_patcher.py patch # 应用补丁
|
||||||
|
python honeycam_patcher.py restore # 恢复原始
|
||||||
|
python honeycam_patcher.py status # 检查状态
|
||||||
|
python honeycam_keygen.py email # 生成注册码
|
||||||
|
"""
|
||||||
|
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import shutil
|
||||||
|
import random
|
||||||
|
import string
|
||||||
|
import hashlib
|
||||||
|
import winreg
|
||||||
|
|
||||||
|
# ============ 配置 ============
|
||||||
|
REG_KEY = r'SOFTWARE\Honeycam'
|
||||||
|
REG_VALUE = 'Edition'
|
||||||
|
REG_DATA = 'PRO'
|
||||||
|
|
||||||
|
|
||||||
|
def find_honeycam_dir():
|
||||||
|
"""自动查找 Honeycam 安装目录"""
|
||||||
|
# 方法1: 注册表
|
||||||
|
try:
|
||||||
|
with winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, REG_KEY) as key:
|
||||||
|
path, _ = winreg.QueryValueEx(key, 'ProgramFolder')
|
||||||
|
if path and os.path.exists(os.path.join(path, 'Honeycam.exe')):
|
||||||
|
return path.rstrip('\\')
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
|
||||||
|
# 方法2: 卸载信息
|
||||||
|
for subkey in [r'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Honeycam',
|
||||||
|
r'SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Honeycam']:
|
||||||
|
try:
|
||||||
|
with winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, subkey) as key:
|
||||||
|
loc, _ = winreg.QueryValueEx(key, 'InstallLocation')
|
||||||
|
if loc and os.path.exists(os.path.join(loc, 'Honeycam.exe')):
|
||||||
|
return loc.rstrip('\\')
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
|
||||||
|
# 方法3: 常见路径
|
||||||
|
common_paths = [
|
||||||
|
os.path.join(os.environ.get('ProgramFiles', r'C:\Program Files'), 'Honeycam'),
|
||||||
|
os.path.join(os.environ.get('ProgramFiles(x86)', r'C:\Program Files (x86)'), 'Honeycam'),
|
||||||
|
r'D:\Apps\Honeycam',
|
||||||
|
]
|
||||||
|
for p in common_paths:
|
||||||
|
if os.path.exists(os.path.join(p, 'Honeycam.exe')):
|
||||||
|
return p
|
||||||
|
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
BANDIZIP_DIR = os.environ.get('HONEYCAM_DIR') or find_honeycam_dir()
|
||||||
|
EXE_PATH = os.path.join(BANDIZIP_DIR, 'Honeycam.exe') if BANDIZIP_DIR else None
|
||||||
|
BACKUP_PATH = (EXE_PATH + '.bak') if EXE_PATH else None
|
||||||
|
|
||||||
|
# Patch 定义: (文件偏移, 原始字节, 补丁字节, 描述)
|
||||||
|
PATCHES = [
|
||||||
|
(0x154EB0, b'\x48\x89\x54\x24\x10\x53', b'\xB0\x01\xC3',
|
||||||
|
'sub_1401558B0 (Edition read -> return 1)'),
|
||||||
|
(0x0F8F09, b'\x0F\x85\x51\x05\x00\x00', b'\x90\x90\x90\x90\x90\x90',
|
||||||
|
'NOP: key length check'),
|
||||||
|
(0x0F8F16, b'\x0F\x8C\x44\x05\x00\x00', b'\x90\x90\x90\x90\x90\x90',
|
||||||
|
'NOP: data validity check'),
|
||||||
|
(0x0F8F2B, b'\x0F\x84\x2F\x05\x00\x00', b'\x90\x90\x90\x90\x90\x90',
|
||||||
|
'NOP: @ symbol check'),
|
||||||
|
(0x0F8F39, b'\x0F\x8E\x21\x05\x00\x00', b'\x90\x90\x90\x90\x90\x90',
|
||||||
|
'NOP: @ position check'),
|
||||||
|
(0x0F8F54, b'\x74\x1B', b'\xEB\x1B',
|
||||||
|
'jz -> jmp (skip lm.dll key validation)'),
|
||||||
|
(0x0F911A, b'\x0F\x84\x9A\x02\x00\x00', b'\x90\x90\x90\x90\x90\x90',
|
||||||
|
'NOP: BADF3300 error exit (continue offline path)'),
|
||||||
|
(0x0F90FC, b'\x84\xC0\x0F\x85\x17\x01\x00\x00', b'\xB0\x01\xE9\x18\x01\x00\x00\x90',
|
||||||
|
'Force success after online verify (mov al,1; jmp)'),
|
||||||
|
(0x1552C0, b'\x89\x4C\x24\x08\x4C\x8B', b'\xB0\x01\xC3',
|
||||||
|
'sub_140155CC0 (license data read -> return 1)'),
|
||||||
|
(0x0F7560, b'\x48\x89\x5C\x24\x08\x4C', b'\xB0\x01\xC3',
|
||||||
|
'sub_1400F7F60 (license validation -> return 1)'),
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
def is_patched():
|
||||||
|
if not EXE_PATH or not os.path.exists(EXE_PATH):
|
||||||
|
return False
|
||||||
|
with open(EXE_PATH, 'rb') as f:
|
||||||
|
for offset, orig, patch, desc in PATCHES:
|
||||||
|
f.seek(offset)
|
||||||
|
if f.read(len(patch)) != patch:
|
||||||
|
return False
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
def is_backup_exists():
|
||||||
|
return BACKUP_PATH and os.path.exists(BACKUP_PATH)
|
||||||
|
|
||||||
|
|
||||||
|
def is_honeycam_running():
|
||||||
|
try:
|
||||||
|
import subprocess
|
||||||
|
result = subprocess.run(['tasklist', '/FI', 'IMAGENAME eq Honeycam.exe'],
|
||||||
|
capture_output=True, text=True, timeout=5)
|
||||||
|
return 'Honeycam.exe' in result.stdout
|
||||||
|
except Exception:
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
def kill_honeycam():
|
||||||
|
try:
|
||||||
|
import subprocess
|
||||||
|
subprocess.run(['taskkill', '/F', '/IM', 'Honeycam.exe'],
|
||||||
|
capture_output=True, timeout=5)
|
||||||
|
import time
|
||||||
|
time.sleep(2)
|
||||||
|
return True
|
||||||
|
except Exception:
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
def backup():
|
||||||
|
if is_backup_exists():
|
||||||
|
print(' [OK] Backup already exists')
|
||||||
|
return True
|
||||||
|
try:
|
||||||
|
shutil.copy2(EXE_PATH, BACKUP_PATH)
|
||||||
|
print(' [OK] Backup created: ' + BACKUP_PATH)
|
||||||
|
return True
|
||||||
|
except PermissionError:
|
||||||
|
print(' [!] Permission denied. Run as Administrator.')
|
||||||
|
return False
|
||||||
|
except Exception as e:
|
||||||
|
print(' [!] Backup failed: ' + str(e))
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
def apply_patches():
|
||||||
|
try:
|
||||||
|
with open(EXE_PATH, 'r+b') as f:
|
||||||
|
for offset, orig, patch, desc in PATCHES:
|
||||||
|
f.seek(offset)
|
||||||
|
current = f.read(len(patch))
|
||||||
|
if current == patch:
|
||||||
|
print(' [SKIP] ' + desc)
|
||||||
|
continue
|
||||||
|
f.seek(offset)
|
||||||
|
f.write(patch)
|
||||||
|
print(' [OK] ' + desc)
|
||||||
|
return True
|
||||||
|
except PermissionError:
|
||||||
|
print(' [!] Permission denied. Close Honeycam and run as Administrator.')
|
||||||
|
return False
|
||||||
|
except Exception as e:
|
||||||
|
print(' [!] Patch failed: ' + str(e))
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
def restore():
|
||||||
|
if not is_backup_exists():
|
||||||
|
print(' [!] No backup found')
|
||||||
|
return False
|
||||||
|
try:
|
||||||
|
shutil.copy2(BACKUP_PATH, EXE_PATH)
|
||||||
|
print(' [OK] Restored from backup')
|
||||||
|
return True
|
||||||
|
except PermissionError:
|
||||||
|
print(' [!] Permission denied. Close Honeycam and run as Administrator.')
|
||||||
|
return False
|
||||||
|
except Exception as e:
|
||||||
|
print(' [!] Restore failed: ' + str(e))
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
def set_registry():
|
||||||
|
try:
|
||||||
|
with winreg.CreateKeyEx(winreg.HKEY_LOCAL_MACHINE, REG_KEY, 0,
|
||||||
|
winreg.KEY_SET_VALUE) as key:
|
||||||
|
winreg.SetValueEx(key, REG_VALUE, 0, winreg.REG_SZ, REG_DATA)
|
||||||
|
print(' [OK] Registry: Edition = ' + REG_DATA)
|
||||||
|
return True
|
||||||
|
except PermissionError:
|
||||||
|
print(' [!] Registry write denied. Run as Administrator.')
|
||||||
|
return False
|
||||||
|
except Exception as e:
|
||||||
|
print(' [!] Registry write failed: ' + str(e))
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
def check_status():
|
||||||
|
print('=' * 50)
|
||||||
|
print(' Honeycam Patcher - Status')
|
||||||
|
print('=' * 50)
|
||||||
|
|
||||||
|
if EXE_PATH and os.path.exists(EXE_PATH):
|
||||||
|
print(' [OK] Honeycam.exe: ' + EXE_PATH)
|
||||||
|
else:
|
||||||
|
print(' [!] Honeycam.exe not found!')
|
||||||
|
return
|
||||||
|
|
||||||
|
if is_backup_exists():
|
||||||
|
print(' [OK] Backup exists')
|
||||||
|
else:
|
||||||
|
print(' [!] No backup')
|
||||||
|
|
||||||
|
patched_count = 0
|
||||||
|
with open(EXE_PATH, 'rb') as f:
|
||||||
|
for offset, orig, patch, desc in PATCHES:
|
||||||
|
f.seek(offset)
|
||||||
|
current = f.read(len(patch))
|
||||||
|
if current == patch:
|
||||||
|
patched_count += 1
|
||||||
|
status = '[PATCHED]'
|
||||||
|
elif current == orig:
|
||||||
|
status = '[ORIGINAL]'
|
||||||
|
else:
|
||||||
|
status = '[UNKNOWN]'
|
||||||
|
print(' ' + status + ' 0x{:06X}: '.format(offset) + desc)
|
||||||
|
|
||||||
|
print('\n Patched: ' + str(patched_count) + '/' + str(len(PATCHES)))
|
||||||
|
|
||||||
|
try:
|
||||||
|
with winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, REG_KEY) as key:
|
||||||
|
val, _ = winreg.QueryValueEx(key, REG_VALUE)
|
||||||
|
print(' [Registry] Edition = ' + val)
|
||||||
|
except Exception:
|
||||||
|
print(' [Registry] Edition not set')
|
||||||
|
|
||||||
|
if is_honeycam_running():
|
||||||
|
print(' [WARNING] Honeycam is running!')
|
||||||
|
else:
|
||||||
|
print(' [OK] Honeycam is not running')
|
||||||
|
|
||||||
|
print('=' * 50)
|
||||||
|
|
||||||
|
|
||||||
|
def do_patch():
|
||||||
|
print('=' * 50)
|
||||||
|
print(' Honeycam Patcher - Apply')
|
||||||
|
print('=' * 50)
|
||||||
|
|
||||||
|
if not EXE_PATH or not os.path.exists(EXE_PATH):
|
||||||
|
print(' [!] Honeycam.exe not found!')
|
||||||
|
return False
|
||||||
|
|
||||||
|
if is_honeycam_running():
|
||||||
|
print(' [..] Honeycam is running, closing...')
|
||||||
|
if not kill_honeycam():
|
||||||
|
print(' [!] Cannot close Honeycam.')
|
||||||
|
return False
|
||||||
|
|
||||||
|
print('\n [1/3] Backup...')
|
||||||
|
if not backup():
|
||||||
|
return False
|
||||||
|
|
||||||
|
print('\n [2/3] Patching...')
|
||||||
|
if not apply_patches():
|
||||||
|
return False
|
||||||
|
|
||||||
|
print('\n [3/3] Registry...')
|
||||||
|
set_registry()
|
||||||
|
|
||||||
|
print('\n' + '=' * 50)
|
||||||
|
print(' [DONE] All patches applied!')
|
||||||
|
print('=' * 50)
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
def do_restore():
|
||||||
|
print('=' * 50)
|
||||||
|
print(' Honeycam Patcher - Restore')
|
||||||
|
print('=' * 50)
|
||||||
|
|
||||||
|
if is_honeycam_running():
|
||||||
|
print(' [..] Honeycam is running, closing...')
|
||||||
|
if not kill_honeycam():
|
||||||
|
return False
|
||||||
|
|
||||||
|
print('\n [1/1] Restoring...')
|
||||||
|
if restore():
|
||||||
|
print('\n' + '=' * 50)
|
||||||
|
print(' [DONE] Restored to original.')
|
||||||
|
print('=' * 50)
|
||||||
|
|
||||||
|
|
||||||
|
def generate_keygen(email):
|
||||||
|
"""生成注册码
|
||||||
|
|
||||||
|
Honeycam 注册码格式: 26 字符
|
||||||
|
- 前 8 位: 日期 YYYYMMDD (正则 [2][0-1][0-9][0-9][0-1][0-9][0-3][0-9])
|
||||||
|
- 后 18 位: 任意字符
|
||||||
|
"""
|
||||||
|
import datetime
|
||||||
|
seed = int(hashlib.md5(email.encode()).hexdigest()[:8], 16)
|
||||||
|
rng = random.Random(seed)
|
||||||
|
|
||||||
|
# 前 8 位: 日期 (2019-2021 年范围, 匹配正则 [2][0-1][0-9][0-9])
|
||||||
|
year = rng.randint(2019, 2021)
|
||||||
|
month = rng.randint(1, 12)
|
||||||
|
day = rng.randint(1, 28)
|
||||||
|
date_prefix = f"{year}{month:02d}{day:02d}"
|
||||||
|
|
||||||
|
# 后 18 位: 随机字符
|
||||||
|
charset = string.ascii_letters + string.digits
|
||||||
|
suffix = ''.join(rng.choices(charset, k=18))
|
||||||
|
|
||||||
|
return date_prefix + suffix
|
||||||
|
|
||||||
|
|
||||||
|
def do_keygen():
|
||||||
|
if len(sys.argv) > 2:
|
||||||
|
email = sys.argv[2]
|
||||||
|
else:
|
||||||
|
email = input(' Email: ').strip()
|
||||||
|
if not email:
|
||||||
|
email = 'user@honeycam.local'
|
||||||
|
|
||||||
|
key = generate_keygen(email)
|
||||||
|
print('\n Email: ' + email)
|
||||||
|
print(' Product Key: ' + key)
|
||||||
|
print(' Edition: PRO')
|
||||||
|
print('\n Open Honeycam -> Help -> Register')
|
||||||
|
print(' Enter the email and product key above.')
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
print('=' * 50)
|
||||||
|
print(' Honeycam Professional Patcher v1.0')
|
||||||
|
print('=' * 50)
|
||||||
|
|
||||||
|
if len(sys.argv) > 1:
|
||||||
|
cmd = sys.argv[1].lower()
|
||||||
|
if cmd == 'patch':
|
||||||
|
do_patch()
|
||||||
|
return
|
||||||
|
elif cmd == 'restore':
|
||||||
|
do_restore()
|
||||||
|
return
|
||||||
|
elif cmd == 'status':
|
||||||
|
check_status()
|
||||||
|
return
|
||||||
|
elif cmd == 'keygen':
|
||||||
|
do_keygen()
|
||||||
|
return
|
||||||
|
|
||||||
|
print('\n Commands:')
|
||||||
|
print(' 1. Patch - Apply all patches')
|
||||||
|
print(' 2. Restore - Restore original')
|
||||||
|
print(' 3. Status - Check status')
|
||||||
|
print(' 4. Keygen - Generate product key')
|
||||||
|
print(' 5. Exit')
|
||||||
|
|
||||||
|
try:
|
||||||
|
choice = input('\n Select [1-5]: ').strip()
|
||||||
|
except EOFError:
|
||||||
|
choice = '1'
|
||||||
|
|
||||||
|
if choice == '1':
|
||||||
|
do_patch()
|
||||||
|
elif choice == '2':
|
||||||
|
do_restore()
|
||||||
|
elif choice == '3':
|
||||||
|
check_status()
|
||||||
|
elif choice == '4':
|
||||||
|
do_keygen()
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
||||||
Reference in New Issue
Block a user