Confluence 3.0版破解

来源:互联网 发布:雪女 知乎 编辑:程序博客网 时间:2024/04/28 08:12

 

网上大多数破解方案都是针对Confluence之前的版本的,最开始的时候按照他们的方式进行破解,却发现无效。

无奈只能自己看源码破解了,我的版本是3.0.1,以下是破解过程:

1. 去官网下载一个Confluence的正式版,解压后启动服务,按照提示进行安装,最后去官网上申请个Evaluation的License注册下,就能够有1各月500个用户的使用啦。接下来进行破解

2. 复制出atlassian-extras-2.1.3.jar文件,解压,用jad或java decompiler对com.atlassian.license.decoder.LicenseAdaptor进行反编译,然后编辑之:

public Date getExpiryDate() {
    return null;  // 永不过期
}
...
public LicenseType getLicenseType() {
    return com.atlassian.license.applications.confluence.ConfluenceLicenseTypeStore.FULL_LICENSE;  // 改为最强License
}
...
public int getUsers() {
    return 100000;  // 允许十万用户
}
...
public boolean isExpired() {
    return false;  // 永不过期
}

3. 反编译com.atlassian.license.LicenseUtils类,编辑:

public static final long POST_LICENSE_EVAL_PERIOD = 0x75cd788000L;  // 均改为16年
public static final long UPDATE_ALLOWED_PERIOD = 0x75cd788000L;
...
public static long getSupportPeriodEnd(License license) {
    return license.getDateCreated().getTime() + 0x75cd788000L; // 16 years
}
...
public static boolean isLicenseTooOldForBuild(License license, Date date) {
    return false;
}
...
public static boolean confirmExtendLicenseExpired(Date date) {
    return false;
}
...
public static boolean confirmExtendLicenseExpired(String s) throws NumberFormatException {
    return false;
}
...
private static long getNewBuildWithOldLicenseExpiryDate(Date date) {
    return date.getTime() + 0x75cd788000L;
}

完成,编译: 

javac com/atlassian/license/decoder/LicenseAdaptor.java
javac com/atlassian/license/LicenseUtils.java 

打包:

jar -cvf atlassian-extras-2.1.3.jar *

将包覆盖原有confluence/WEB-INF/lib下的同名包,重启应用,用admin账号进入Confluence Admin,点击左侧菜单的License Details可以看到类似如下视图:

 商业License,无用户数限制,永不过期

 

转自:http://fallenlord.blogbus.com/logs/46686584.html

原创粉丝点击