[Xmind Pro (windows&macOS) 一键激活/破解脚本(10月23日更新)]

Windows 版本激活/破解脚本
注意:必须安装 python 环境,否则报错:

没有 python 环境报错截图
安装 python 环境
下载 python for windows:https://www.python.org/downloads/windows/

下载安装

安装注意勾选环境变量选项

安装后验证
python 环境安装成功后,按下面流程操作:
1、下载完整脚本包:crack_xmind.zip (5.3 KB)
2、解压后执行 一键脚本 (无需管理员身份运行)
常见问题
FileExistsError
**Traceback** **(**most recent call last**)**:
** File **"C:\\Users\\admin\\AppData\\Local\\Programs\\Xmind\\xmind.py"**, line **108**, **in** **<**module**>
** **XmindKeyGen**()**.**run**()
** File **"C:\\Users\\admin\\AppData\\Local\\Programs\\Xmind\\xmind.py"**, line **31**, **in** run**
** patch\_info = self.**patch**()**
** ^^^^^^^^^^^^**
** File **"C:\\Users\\admin\\AppData\\Local\\Programs\\Xmind\\xmind.py"**, line **69**, **in** patch**
** **extract\_asar**(**str**(**self.**asar\_file**)**, **str**(**self.**crack\_asar\_dir**))
** File **"C:\\Users\\admin\\AppData\\Local\\Programs\\Xmind\\venv\\Lib\\site-packages\\asarPy\\asar.py"**, line **162**, **in** extract\_asar**
** a.**extract**(**dest**)**
** File **"C:\\Users\\admin\\AppData\\Local\\Programs\\Xmind\\venv\\Lib\\site-packages\\asarPy\\asar.py"**, line **143**, **in** extract**
** raise **FileExistsError**()**
**FileExistsError**
**请按任意键继续. . .**

解决方案
卸载重装!卸载重装!卸载重装!
重要的事情说三遍,讲你的 xmind 卸载,下载重装最新版即可。不需要管理员权限运行,脚本也没问题。
解决后正常脚本输出如下图:

破解成功

注意:需要注册登录账号后,才能看到 Pro 版本。
脚本源码
**import** os
**import** pathlib
**import** shutil
**from **abc** import** ABCMeta
**from **abc** import** abstractmethod
**from **base64** import** b64encode, b64decode
**from **asarPy** import** extract\_asar, pack\_asar
**from **crypto\_plus** import** CryptoPlus
**from **crypto\_plus.encrypt** import** encrypt\_by\_key, decrypt\_by\_key
**class** **KeyGen**(**metaclass=ABCMeta**)**:**
** @abstractmethod**
** **def** **generate**(**self**)**:
** **pass
** @abstractmethod**
** **def** **parse**(**self, licenses**)**:
** **pass
** @abstractmethod**
** **def** **patch**(**self**)**:
** **return** **""
** **def** **run**(**self, patch=**True**)**:**
** ciphertext\_licenses = self.**generate**()**
** **print**(**f**"ciphertext\_licenses: \\n{ciphertext\_licenses}"**)
** **if** patch:**
** patch\_info = self.**patch**()**
** **if** patch\_info:**
** **print**(**f**"patch: \\n{patch\_info}"**)
** plaintext\_licenses = self.**parse**(**ciphertext\_licenses**)**
** **print**(**f**'plaintext\_licenses: \\n{plaintext\_licenses}'**)
**class** **XmindKeyGen**(**KeyGen**)**:**
** **def** **\_\_init\_\_**(**self**)**:
** tmp\_path = os.environ**[**'TMP'**]
** asar\_path = pathlib.**Path**(**tmp\_path**)**.parent.**joinpath**(**r**'Programs\\Xmind\\resources'**)**
** self.asar\_file = asar\_path.**joinpath**(**'app.asar'**)**
** self.asar\_file\_bak = asar\_path.**joinpath**(**'app.asar.bak'**)**
** self.crack\_asar\_dir = asar\_path.**joinpath**(**'ext'**)**
** self.main\_dir = self.crack\_asar\_dir.**joinpath**(**"main"**)**
** self.renderer\_dir = self.crack\_asar\_dir.**joinpath**(**"renderer"**)**
** self.private\_key = **None
** self.public\_key = **None
** self.old\_public\_key = **open**(**'old.pem'**)**.**read**()
** **def** **generate**(**self**)**:
** **if** os.path.**isfile**(**'key.pem'**)**:
** rsa = CryptoPlus.**load**(**'key.pem'**)**
** **else**:**
** rsa = CryptoPlus.**generate\_rsa**(**1024**)**
** rsa.**dump**(**"key.pem"**, **"new\_public\_key.pem"**)**
** license\_info = **'{"status": "sub", "expireTime": 4093057076000, "ss": "", "deviceId": "AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA"}'
** self.public\_key = rsa.public\_key**
** self.private\_key = rsa.private\_key**
** self.license\_data = **b64encode**(**encrypt\_by\_key**(**rsa.private\_key, license\_info.**encode**()))
** **return** self.license\_data**
** **def** **parse**(**self, licenses**)**:
** **return** **decrypt\_by\_key**(**self.public\_key, **b64decode**(**licenses**))
** **def** **patch**(**self**)**:
** **# 解包
** **extract\_asar**(**str**(**self.asar\_file**)**, **str**(**self.crack\_asar\_dir**))
** shutil.**copytree**(**'crack'**, self.main\_dir, dirs\_exist\_ok=**True**)**
** **# 注入
** **with** **open**(**self.main\_dir.**joinpath**(**'main.js'**)**, **'rb'**)** **as** f:
** lines = f.**readlines**()**
** lines**[**5**]** = b**'require("./hook")\\n'
** **with** **open**(**self.main\_dir.**joinpath**(**'main.js'**)**, **'wb'**)** **as** f:
** f.**writelines**(**lines**)**
** **# 替换密钥
** old\_key = f**"String.fromCharCode({','.join([str(i) for i in self.old\_public\_key.encode()])})"**.**encode**()**
** new\_key = f**"String.fromCharCode({','.join([str(i) for i in self.public\_key.export\_key()])})"**.**encode**()**
** **for** js\_file **in** self.renderer\_dir.**rglob**(**"\*.js"**)**:
** **with** **open**(**js\_file, **'rb'**)** **as** f:**
** byte\_str = f.**read**()**
** index = byte\_str.**find**(**old\_key**)**
** **if** index != **-1**:**
** byte\_str.**replace**(**old\_key, new\_key**)**
** **with** **open**(**js\_file, **'wb'**)** **as** \_f:**
** \_f.**write**(**byte\_str.**replace**(**old\_key, new\_key**))
** **print**(**js\_file**)**
** **break
** **# 占位符填充
** **with** **open**(**self.main\_dir.**joinpath**(**'hook.js'**)**, **'r'**, encoding=**'u8'**)** **as** f:
** content = f.**read**()**
** content = content.**replace**(**"{{license\_data}}"**, self.license\_data.**decode**())**
** **with** **open**(**self.main\_dir.**joinpath**(**'hook.js'**)**, **'w'**, encoding=**'u8'**)** **as** f:
** f.**write**(**content**)**
** **with** **open**(**self.main\_dir.**joinpath**(**'hook'**)**.**joinpath**(**'crypto.js'**)**, **'r'**, encoding=**'u8'**)** **as** f:**
** content = f.**read**()**
** content = content.**replace**(**"{{old\_public\_key}}"**, self.old\_public\_key.**replace**(**"\\n"**, **"\\\\n"**))**
** content = content.**replace**(**"{{new\_public\_key}}"**, self.public\_key.**export\_key**()**.**decode**()**.**replace**(**"\\n"**, **"\\\\n"**))**
** **with** **open**(**self.main\_dir.**joinpath**(**'hook'**)**.**joinpath**(**'crypto.js'**)**, **'w'**, encoding=**'u8'**)** **as** f:**
** f.**write**(**content**)**
** **# 封包
** os.**remove**(**self.asar\_file**)**
** **pack\_asar**(**self.crack\_asar\_dir, self.asar\_file**)**
** shutil.**rmtree**(**self.crack\_asar\_dir**)**
**if** **\_\_name\_\_** == **'\_\_main\_\_'**:
** **XmindKeyGen**()**.**run**()
macOS 版本激活/破解脚本
1、下载完整脚本包:crack_xmind_macos.zip(12 KB)
2、解压后执行 xmind.py (需要python 环境,见:macOS 安装 python)
**python3 xmind.**py
如果脚本运行正常,你会得到以下内容:

此时不要打开xmind,否则会得到如下反馈(xmind 已损坏,无法打开):

3、为解决上述报错,在命令行执行如下脚本:
**sudo xattr -rd com.**apple**.**quarantine** /Applications/Xmind.**app
破解成功
注册登录账号后,打开 xmind:

脚本源码
**import os**
**import pathlib**
**import shutil**
**from base64 import b64decode, b64encode**
**from asarPy import extract\_asar, pack\_asar**
**from crypto\_plus import CryptoPlus**
**from crypto\_plus.**encrypt** import decrypt\_by\_key, encrypt\_by\_key**
**from abc import ABCMeta, abstractmethod**
**class** **KeyGen**(**metaclass=ABCMeta**)**:**
** @abstractmethod**
** **def** **generate**(**self**)**:
** pass**
** @abstractmethod**
** **def** **parse**(**self, licenses**)**:
** pass**
** @abstractmethod**
** **def** **patch**(**self**)**:
** **return** **""
** **def** **run**(**self, patch=**True**)**:**
** ciphertext\_licenses = self.**generate**()**
** **print**(**f**"ciphertext\_licenses: \\n{ciphertext\_licenses}"**)
** **if** patch:**
** patch\_info = self.**patch**()**
** **if** patch\_info:**
** **print**(**f**"patch: \\n{patch\_info}"**)
** plaintext\_licenses = self.**parse**(**ciphertext\_licenses**)**
** **print**(**f**'plaintext\_licenses: \\n{plaintext\_licenses}'**)
**class** **XmindKeyGen**(**KeyGen**)**:**
** **def** **\_\_init\_\_**(**self**)**:
** **# tmp\_path = os.environ['TMP']
** **# mac 软件路径不一样,可以自己看着修改
** asar\_path = pathlib.**Path**(**'/Applications/Xmind.app/Contents/Resources'**)**
** self.**asar\_file** = asar\_path.**joinpath**(**'app.asar'**)**
** self.**asar\_file\_bak** = asar\_path.**joinpath**(**'app.asar.bak'**)**
** self.**crack\_asar\_dir** = asar\_path.**joinpath**(**'ext'**)**
** self.**main\_dir** = self.**crack\_asar\_dir**.**joinpath**(**"main"**)**
** self.**renderer\_dir** = self.**crack\_asar\_dir**.**joinpath**(**"renderer"**)**
** self.**private\_key** = None**
** self.**public\_key** = None**
** self.**old\_public\_key** = **open**(**'old.pem'**)**.**read**()
** **def** **generate**(**self**)**:
** **if** os.**path**.**isfile**(**'key.pem'**)**:
** rsa = CryptoPlus.**load**(**'key.pem'**)**
** **else**:**
** rsa = CryptoPlus.**generate\_rsa**(**1024**)**
** rsa.**dump**(**"key.pem"**, **"new\_public\_key.pem"**)**
** license\_info = **'{"status": "sub", "expireTime": 4093057076000, "ss": "", "deviceId": "AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA"}'
** self.**public\_key** = rsa.**public\_key
** self.**private\_key** = rsa.**private\_key
** self.**license\_data** = **b64encode**(**encrypt\_by\_key**(**rsa.**private\_key**, license\_info.**encode**()))
** **return** self.**license\_data
** **def** **parse**(**self, licenses**)**:
** **return** **decrypt\_by\_key**(**self.**public\_key**, **b64decode**(**licenses**))
** **def** **patch**(**self**)**:
** **# 先删除接包的内容,防止已经存在报错
** shutil.**rmtree**(**self.**crack\_asar\_dir**, ignore\_errors=**True**)
** **# 解包
** **extract\_asar**(**str**(**self.**asar\_file**)**, **str**(**self.**crack\_asar\_dir**))
** shutil.**copytree**(**'crack'**, self.**main\_dir**, dirs\_exist\_ok=**True**)**
** **# 注入
** **# 看了一下mac最新版本的源代码只有一行,这里采用插入首行
** with **open**(**self.**main\_dir**.**joinpath**(**'main.js'**)**, **'rb'**)** as f:
** lines = f.**readlines**()**
** **# lines[5] = b'require("./hook")\\n'
** lines.**insert**(**0**, b**'require("./hook");\\n'**)**
** with **open**(**self.**main\_dir**.**joinpath**(**'main.js'**)**, **'wb'**)** as f:
** f.**writelines**(**lines**)**
** **# 替换密钥
** old\_key = f**"String.fromCharCode({','.join([str(i) for i in self.old\_public\_key.encode()])})"**.**encode**()**
** new\_key = f**"String.fromCharCode({','.join([str(i) for i in self.public\_key.export\_key()])})"**.**encode**()**
** **for** js\_file **in** self.**renderer\_dir**.**rglob**(**"\*.js"**)**:
** with **open**(**js\_file, **'rb'**)** as f:**
** byte\_str = f.**read**()**
** index = byte\_str.**find**(**old\_key**)**
** **if** index != **-1**:**
** byte\_str.**replace**(**old\_key, new\_key**)**
** with **open**(**js\_file, **'wb'**)** as \_f:**
** \_f.**write**(**byte\_str.**replace**(**old\_key, new\_key**))
** **print**(**js\_file**)**
** break**
** **# 手动搜索发现 main.js 里面也有公钥信息,一起替换掉
** **for** js\_file **in** self.**main\_dir**.**rglob**(**"\*.js"**)**:
** with **open**(**js\_file, **'rb'**)** as f:**
** byte\_str = f.**read**()**
** index = byte\_str.**find**(**old\_key**)**
** **if** index != **-1**:**
** byte\_str.**replace**(**old\_key, new\_key**)**
** with **open**(**js\_file, **'wb'**)** as \_f:**
** \_f.**write**(**byte\_str.**replace**(**old\_key, new\_key**))
** **print**(**js\_file**)**
** break**
** **# 占位符填充
** with **open**(**self.**main\_dir**.**joinpath**(**'hook.js'**)**, **'r'**, encoding=**'u8'**)** as f:
** content = f.**read**()**
** content = content.**replace**(**"{{license\_data}}"**, self.**license\_data**.**decode**())**
** with **open**(**self.**main\_dir**.**joinpath**(**'hook.js'**)**, **'w'**, encoding=**'u8'**)** as f:
** f.**write**(**content**)**
** with **open**(**self.**main\_dir**.**joinpath**(**'hook'**)**.**joinpath**(**'crypto.js'**)**, **'r'**, encoding=**'u8'**)** as f:**
** content = f.**read**()**
** content = content.**replace**(**"{{old\_public\_key}}"**, self.**old\_public\_key**.**replace**(**"\\n"**, **"\\\\n"**))**
** content = content.**replace**(**"{{new\_public\_key}}"**, self.**public\_key**.**export\_key**()**.**decode**()**.**replace**(**"\\n"**, **"\\\\n"**))**
** with **open**(**self.**main\_dir**.**joinpath**(**'hook'**)**.**joinpath**(**'crypto.js'**)**, **'w'**, encoding=**'u8'**)** as f:**
** f.**write**(**content**)**
** **# 封包
** os.**remove**(**self.**asar\_file**)
** **pack\_asar**(**self.**crack\_asar\_dir**, self.**asar\_file**)
** shutil.**rmtree**(**self.**crack\_asar\_dir**)
**if** \_\_name\_\_ == **'\_\_main\_\_'**:
** **XmindKeyGen**()**.**run**()
常见问题
#### **ModuleNotFoundErrore No module named “asarPy**“

解决方案
**pip install asarPy**
**##or pip3 install asarPy**
更新日志
2024.10.18 新增读者朋友反馈windows环境没有python导致脚本无法执行的问题及解决方案
2024.10.09 新增读者朋友反馈 FileExistsError 问题导致无法激活问题复现及解决方案。
2024.3.22: 修复无法激活的bug,提供了一键脚本。
注意:如果以前替换过公钥,需要还原一下app.asar再执行一键脚本,否则重新生成的公钥会不匹配;没备份app.asar的话建议重装最新版。
Xmind 官方高质量思维导图集合 – Mindmap Gallery
Mindmap Gallery 是思维导图软件 Xmind 的一官方公开网站,专门分享一些热门实用高质量思维导图集合,思维导图都来自用户分享,支持免费开放下载,还可以进行搜索,各种各样的思维大图都有,非常赞。
Mindmap Gallery 网站地址:https://xuanyuan.me/lab/sites/12164.html
参考资料
Crack 脚本项目:项目 939
GitHub:https://github.com/qy527145/crack
免责申明
本文内容收集自互联网,仅供学习交流,如果不慎侵权请联系 tianmiao.work@foxmail.com 删除。
请勿传播盗版软件。
- 感谢你赐予我前进的力量
