1、下载gliffy-confluence-plugin-9.1.2.obr
2、解压后找到GliffyLicenseManager.class
3、反编译GliffyLicenseManager.class,替换原来的实现,重新编译成class后替换进去
package com.gliffy.plugin.confluence.license;
import com.atlassian.confluence.setup.BootstrapManager;
import com.atlassian.confluence.setup.settings.CoreFeaturesManager;
import com.atlassian.upm.api.license.PluginLicenseManager;
import com.atlassian.upm.api.license.entity.LicenseError;
import com.atlassian.upm.api.license.entity.LicenseType;
import com.atlassian.upm.api.license.entity.PluginLicense;
import com.atlassian.upm.api.util.Option;
import org.joda.time.DateTime;
import org.joda.time.Days;
import org.joda.time.ReadableInstant;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class GliffyLicenseManager {
private static final Logger logger = LoggerFactory.getLogger(GliffyLicenseManager.class);
private PluginLicenseManager licenseManager;
private CoreFeaturesManager coreFeaturesManager;
private BootstrapManager bootstrapManager;
public GliffyLicenseManager(PluginLicenseManager licenseManager, CoreFeaturesManager coreFeaturesManager, BootstrapManager bootstrapManager) {
this.licenseManager = licenseManager;
this.coreFeaturesManager = coreFeaturesManager;
this.bootstrapManager = bootstrapManager;
}
/*private PluginLicense fetchLicense() {
PluginLicense license = null;
Option<PluginLicense> licenseOption = this.licenseManager.getLicense();
if (licenseOption.isDefined()) {
license = (PluginLicense)licenseOption.get();
} else {
logger.debug("no Gliffy license found");
}
return license;
}*/
public boolean isValid() {
/*PluginLicense license = this.fetchLicense();
return license != null ? license.isValid() : false;*/
return true;
}
public boolean isSupported() {
/*PluginLicense license = this.fetchLicense();
if (license != null) {
return !license.isMaintenanceExpired();
} else {
return false;
}*/
return true;
}
public boolean isEvaluation() {
/*PluginLicense license = this.fetchLicense();
return license != null ? license.isEvaluation() : false;*/
return false;
}
public String getLicenseError() {
/*PluginLicense license = this.fetchLicense();
if (license != null) {
Option<LicenseError> errorOption = license.getError();
if (errorOption.isDefined()) {
return ((LicenseError)errorOption.get()).toString();
}
}
return null;*/
return null;
}
public String getSEN() {
/*PluginLicense license = this.fetchLicense();
if (license != null) {
Option<String> customerIdOption = license.getSupportEntitlementNumber();
if (customerIdOption.isDefined()) {
return (String)customerIdOption.get();
}
}
return null;*/
return null;
}
public boolean isCloud() {
return this.coreFeaturesManager.isOnDemand();
}
public LicenseType getLicenseType() {
/*PluginLicense license = this.fetchLicense();
return license != null ? license.getLicenseType() : null;*/
return LicenseType.COMMERCIAL;
}
public int getDaysToExpiration() {
/*PluginLicense license = this.fetchLicense();
if (license != null) {
Option<DateTime> expiryDateOption = license.getExpiryDate();
if (expiryDateOption.isDefined()) {
return Days.daysBetween(new DateTime(), (ReadableInstant)expiryDateOption.get()).getDays();
}
}
return 0;*/
return Integer.MAX_VALUE;
}
public Integer getUserCount() {
/*PluginLicense license = this.fetchLicense();
if (license != null) {
Option<Integer> qtyUsersOption = license.getEdition();
if (qtyUsersOption.isDefined()) {
return (Integer)qtyUsersOption.get();
}
}
return null;*/
return Integer.MAX_VALUE;
}
public boolean isFree() {
/*if (this.fetchLicense() == null) {
return false;
} else {
LicenseType type = this.getLicenseType();
return type.equals(LicenseType.COMMUNITY) || type.equals(LicenseType.NON_PROFIT) || type.equals(LicenseType.OPEN_SOURCE);
}*/
return false;
}
public boolean isCommercial() {
return this.isValid() && this.isSupported() && !this.isEvaluation() && !this.isFree();
}
public long getLicenseInstallUnixTimestamp() {
/*PluginLicense license = this.fetchLicense();
return license != null ? license.getCreationDate().getMillis() / 1000L : 0L;*/
return 0L;
}
public String getLicenseManagementURL() {
/*return this.bootstrapManager.getWebAppContextPath() + "/plugins/servlet/upm#manage/com.gliffy.integration.confluence";*/
return "";
}
public boolean isNonAnalyticsLicenseType() {
/*LicenseType licenseType = this.getLicenseType();
boolean isEvalCloudInstance = this.isCloud() && (this.isEvaluation() || licenseType == null);
return isEvalCloudInstance || LicenseType.DEVELOPER.equals(licenseType) || LicenseType.TESTING.equals(licenseType) || LicenseType.DEMONSTRATION.equals(licenseType);*/
return false;
}
}
知识点扩展:Gliffy confluence插件的破解
Gliffy是一个在线画流程图的工具,或者简单的说Gliffy就是web版的Visio。Gliffy的用户体验非常的好,加打开浏览器就可以使用,使用起来非常的方便。Gliffy同时推出了confluence的插件版本。在安装插件后可在confluence中方便的编辑和插入流程图。
同事对Gliffy甚为垂涎,只是Gliffy还有些小贵。confluence插件版,500用户的许可要卖到2000$。
虽然同事的利诱有些不靠谱,但偶尔干干着方面的事也还算有趣,那就动手吧。
注:下面只是简单的讲解一些关键点,如果你对java一窍不通,那还是罢手吧。
java应用破解的通常做法是:将文件反编译,找到认证部分的处理,直接将认证结果返回true。java的反编译工具推荐Java Decompiler。
Gliffy的jar包比较大,但其中java代码并不是很多。而且Gliffy采用的是仿君子不防小人的做法,里面的java代码并未混淆过。在代码中有个目录非常的扎眼\src\com\gliffy\core\license\。再做些简单的分析我们即可找到真正的关键点SimpleLicenseManager.java。
不得不说Gliffy的命名还是非常规范的。以函数名为线索,很容易就可以找到我们要的函数validLicenseValues。简单粗暴的将函数返回值改为true。打包并重新安装插件。
如果问题就这么解决了,那也未免顺利的有些不太寻常。虽然可以成功安装,但运行的时候抛出一堆的异常。试着进入Gliffy的管理界面,依旧是一堆的异常。虽然我们强制的将认证结果设置为了true,但某些地方还需要获取license的到期日期等信息。由于读不到相关数据,直接出异常了。
既然如此,那我们需要先将license信息写入系统。
把validLicenseValues还原,然后找到设置license的函数installLicense。在函数中注释掉license认证相关的代码,让系统在忽略认证结果的情况下强行写入注册信息。修改后的java文件在执行时还会报getHostedStatus的虚函数错误。按理说这个函数应当会在子类中被重写。不过我们先不管这么多,把它修改为普通函数并直接返回0。
重新打包安装,然后进入Gliffy的管理界面,license信息随便填写,然后保存。保存是成功的,但认证还是失败。修改validLicenseValues函数,重新打包安装。这次由于我们有写入注册信息,因此就不会再出现先前的空指针异常了。
享受Gliffy吧。
注:Gliffy确实是个好东西,如果喜欢,还是尽量说服公司出钱买吧。
来源:https://blog.csdn.net/shiyuan_90/article/details/113838210


猜你喜欢
- 前言在写报表功能时遇到一个需要根据用户id分组查询最新一条钱包明细数据的需求,在写sql测试时遇到一个有趣的问题,开始使用子查询根据时间倒序
- mysql的root账户,我在连接时通常用的是localhost或127.0.0.1,公司的测试服务器上的mysql也是localhost所
- 在做机器学习的时候,遇到这样一个数据集...一共399行10列,1-9列是用不定长度的空格分割,第9-10列之间用'\t'分
- 指定路径斜杠与反斜杠的问题报错:SyntaxError: (unicode error) ‘unicodeescape&
- 在python中安装非自带python模块,有三种方式:1.easy_install2.pip3.下载压缩包(.zip, .tar, .ta
- 这几天研究了下PyQt5中QWebEngineView内嵌网页与Python的数据交互,今天把实例方法与代码发布出来供大家参数数据交互需要l
- 简介: 我们在这世上,选择什么就成为什么,人生的丰富多彩,得靠自己成就。你此刻的付出,决定了你未来成为什么样的人,当你改变不了世界
- 一、基本概念Reactive X中有几个核心的概念,先来简单介绍一下。1.1、Observable和Observer(可观察对象和观察者)首
- 本文实例为大家分享了python rsync服务器之间文件夹同步的具体代码,供大家参考,具体内容如下About rsync配置两
- 目录一、🌕月亮二、🌕雪花月饼一、🌕月亮导入库matplotlib和numpy,作为工具直接用。from mpl_toolkits.mplot
- 先给大家讲解一下什么是kalikali是一种Linux系统,kali是专门用来渗透的,他是由back track系统演化而来的,后面结合了l
- 安装一些必要的环境1.下载go sdk (本人装的是1.9) 2.下载golang3.下载git 因为有些依赖 要用 go get 去git
- 本文实例讲述了Python实现树的先序、中序、后序排序算法。分享给大家供大家参考,具体如下:#encoding=utf-8class Tre
- 以下是个人对Python深浅拷贝的通俗解释,易于绕开复杂的Python数据结构存储来进行理解!高级语言中变量是对内存及其地址的抽象,Pyth
- 这个问题用了我整整一晚上的时间才解决,希望有人遇到和我一样的时能少走些弯路。启动Django,服务器拒绝访问,可以尝试以下方法解决:1. 没
- 点击顶部的“SQL”标签进入sql命令输入界面。输入以下命令:update mysql.user set password=PASSWORD
- 我需要查询从现在算起五天前的日期。按照商业习惯,这五天应该不包含星期六和星期天。专家回答:对于许多跟商业日期有关的情况,最好的解决方案是使用
- 以前用js很少用到js的正则表达式,即使用到了,也是诸如邮件名称之类的判断,网上代码很多,很少有研究,拿来即用。最近开发遇到一些需要使用正则
- 当服务器必须提供与两个或更多个网络或网络子网的连接时,典型的方案是使用多宿主计算机。此计算机通常位于外围网络(也称为 DMZ、外围安全区域或
- 运行效果:完整源码:##import libraryfrom tkinter import *import timefrom playsou