├── LICENSE ├── README.md ├── crack.py └── main.py /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 ciscochao 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Xmind_Zen_Crack 2 | Xmind Zen本地破解脚本,暂时仅支持Linux和MAC系统。 3 | ## 说明 4 | 本脚本仅作为学习使用,请勿用于任何商业用途。 5 | ## 功能简介 6 | * 去除软件右上角激活按钮 7 | * 去除导出时激活弹窗 8 | * 去除导出PDF文件时的水印 9 | * 去除导出PNG文件时的水印 10 | ## 使用说明 11 | 将main.py和crack.py复制到Xmind Zen的安装目录下,然后通过python3 main.py运行该脚本即可。 12 | # License 13 | MIT 14 | -------------------------------------------------------------------------------- /crack.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | """ 3 | # @Time : 8/22/19 11:46 AM 4 | # @Author : F0rGeEk@root 5 | # @Email : bat250@protonmail.com 6 | # @File : crack.py 7 | # @Software: PyCharm 8 | *********************************************************** 9 | ███████╗ ██████╗ ██████╗ ██████╗ ███████╗███████╗██╗ ██╗ 10 | ██╔════╝██╔═████╗██╔══██╗██╔════╝ ██╔════╝██╔════╝██║ ██╔╝ 11 | █████╗ ██║██╔██║██████╔╝██║ ███╗█████╗ █████╗ █████╔╝ 12 | ██╔══╝ ████╔╝██║██╔══██╗██║ ██║██╔══╝ ██╔══╝ ██╔═██╗ 13 | ██║ ╚██████╔╝██║ ██║╚██████╔╝███████╗███████╗██║ ██╗ 14 | ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚══════╝╚═╝ ╚═╝ 15 | *********************************************************** 16 | """ 17 | 18 | 19 | class Crack(object): 20 | def __init__(self, f_name): 21 | self.f_name = f_name 22 | 23 | def replace_str(self, old, new): 24 | with open(self.f_name) as f1: 25 | content = f1.read() 26 | f1.close() 27 | rep = content.replace(old, new) 28 | with open(self.f_name, "wb") as f2: 29 | f2.write(rep.encode()) 30 | f2.close() 31 | 32 | def add_css(self, k_word, new_css): 33 | with open(self.f_name) as f2: 34 | content = f2.read() 35 | pos = content.find(k_word) 36 | if pos != -1: 37 | content = content[:pos+len(k_word)] + new_css + content[pos+len(k_word):] 38 | f2 = open(self.f_name, "wb") 39 | f2.write(content.encode()) 40 | f2.close() 41 | 42 | def del_all(self): 43 | open(self.f_name, "wb").close() 44 | -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | """ 3 | # @Time : 8/22/19 4:47 PM 4 | # @Author : F0rGeEk@root 5 | # @Email : bat250@protonmail.com 6 | # @File : main.py 7 | # @Software: PyCharm 8 | *********************************************************** 9 | ███████╗ ██████╗ ██████╗ ██████╗ ███████╗███████╗██╗ ██╗ 10 | ██╔════╝██╔═████╗██╔══██╗██╔════╝ ██╔════╝██╔════╝██║ ██╔╝ 11 | █████╗ ██║██╔██║██████╔╝██║ ███╗█████╗ █████╗ █████╔╝ 12 | ██╔══╝ ████╔╝██║██╔══██╗██║ ██║██╔══╝ ██╔══╝ ██╔═██╗ 13 | ██║ ╚██████╔╝██║ ██║╚██████╔╝███████╗███████╗██║ ██╗ 14 | ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚══════╝╚═╝ ╚═╝ 15 | *********************************************************** 16 | """ 17 | import os 18 | import time 19 | import platform 20 | import crack 21 | 22 | # 通过操作系统判断需要破解文件的路径 23 | app_out_dir = "" 24 | if platform.system().lower() == "darwin": 25 | app_out_dir = "./XMind ZEN.app/Contents/Resources/app/out/" 26 | else: 27 | app_out_dir = "./resources/app/out/" 28 | 29 | # 需要破解的文件及文件路径 30 | active = os.path.join(app_out_dir, "modal-activateAlert.js") 31 | pdf = os.path.join(app_out_dir, "imgs/pdf-footer-zh-CN.svg") 32 | png = os.path.join(app_out_dir, "imgs/png-watermark-zh-CN.svg") 33 | pri = os.path.join(app_out_dir, "imgs/print-watermark-zh-CN.svg") 34 | new_css = os.path.join(app_out_dir, "new.css") 35 | render_css = os.path.join(app_out_dir, "renderer.css") 36 | 37 | # 填充CSS所需代码 38 | add_css = "\n display: none !important;" 39 | k_word = ".evaluation-text {" 40 | new_code = 'viewBox="0 0 0 0"' 41 | 42 | # 破解过程 43 | print('===========开始破解============') 44 | start_time = time.time() 45 | step1 = crack.Crack(active) 46 | step1.del_all() 47 | print('------试用版 请激活按钮已取消!') 48 | step2 = crack.Crack(new_css) 49 | step2.replace_str(k_word, add_css) 50 | step3 = crack.Crack(render_css) 51 | step3.replace_str(k_word, add_css) 52 | step4 = crack.Crack(pri) 53 | step4.replace_str('viewBox="0 0 514 454"', new_code) 54 | step5 = crack.Crack(pdf) 55 | step5.replace_str('viewBox="0 0 263 20"', new_code) 56 | print('------导出PDF文件中水印已取消!') 57 | step6 = crack.Crack(png) 58 | step6.replace_str('viewBox="0 0 190 80"', new_code) 59 | print('------导出PNG文件中水印已取消!') 60 | end_time = time.time() 61 | print("破解用时 %s 秒" % (round(end_time - start_time, 3))) 62 | print('------感谢您的使用!By 【F0rGeEk】') 63 | --------------------------------------------------------------------------------