您的位置:首页 > 其它

JIRA 6.0.1 (ZIP Archive)最新破解方法,绝对可用

2013-06-08 03:03 429 查看
最新公司换了新项目,项目比较大,每次更改bug,修改source都很费劲,特别是提交测试后再次回退修改,每次都很麻烦,突然想到使用JIRA本地管理一下自己的任务,于是去官网下载。发现官方网站已经更新到6.0.1版本。

JIRA是有License的,很不爽,于是百度破解,发现最新的破解也只是适用5.2.4版本。对比了一下网上的破解方法,基本上都是更改atlassian-extras-2.2.2.jar这个jar包,6.0.1版本也是用的这个jar包,于是认为改动应该不大,于是着手自己破解。过程如下:

1、任意建立一个eclipse的java项目,将atlassian-extras-2.2.2.jar包以外的atlassian-jira\WEB-INF\lib下jar导入到工程的类路径。

2、反编译atlassian-extras-2.2.2.jar包,得到source,将该souce作为1中建立的项目的源码。编译工程,一般反编译的source在异常处理处会出错,throw语句会放在catch语句之后,稍微修改即可。

3、JIRA5版本的破解主要更改两个文件JiraLicenseStoreImpl.java,Version2LicenseDecoder.java;通过实验JIRA6可以不用修改JiraLicenseStoreImpl.class文件。但是JIRA6破解需要修改另一个文件LicenseManager.java如果不修改该文件,破解后管理插件时候会提示没有可用的有效License。本文最后会贴出修改后的代码。

4、开始启动JIRA6,按照提示配置安装(安装教程和JIRA5版本类似,此处略)时候到填写License的时候会提示你去JIRA的网站申请一个帐号和试用License。去申请一个得到一个试用License,如下图



记住Service ID,SEN和license Key,后面会用到。

填写申请到的license Key使安装继续到创建完管理员账户。关闭JIRA。

5、用Version2LicenseDecoder.class和LicenseManager.class替换atlassian-extras-2.2.2.jar对应文件,注意LicenseManager.class文件在atlassian-extras-2.2.2.jar有两个同名的文件,要替换非抽象的那个,不要替换错了。

6、替换之后重新启动JIRA,并用管理员登录。进入到授权管理页面,如下图



这是我破解后的样子,破解签是JIRA:EVALUATION,时间是安装时间一个月后到期。

进去后,在新的License输入框中输入明码

Description=JIRA: Commercial,

CreationDate=你的安装日期,格式(yyyy-mm-dd),

jira.LicenseEdition=ENTERPRISE,

Evaluation=false,

jira.LicenseTypeName=COMMERCIAL,

jira.active=true,

licenseVersion=2,

MaintenanceExpiryDate=你想设置的失效日期如:2099-12-31,

Organisation=你的JIRA网站的注册名,

SEN=你申请到的SEN注意没有前缀LID,

ServerID=你申请到的ServerID,

jira.NumberOfUsers=-1,

LicenseID=LID你申请到的SEN,注意LID前缀不要丢掉,

LicenseExpiryDate=你想设置的失效日期如:2099-12-31,

PurchaseDate=你的安装日期,格式(yyyy-mm-dd)

注意要用“,”分割。

点击ADD添加先的License。如果没有错误,可以看到License已经更新了。

7、上述破解后,如果你去安装中文插件会看到无效的License提示,但是中文插件也是可以成功安装的,但是插件管理部分无法正常使用。原因是JIRA6在一些功能中使用的是插件式的验证机制。还要更新一个jar包,这个jar包是atlassian-bundled-plugins.zip中的atlassian-universal-plugin-manager-plugin-2.10.1.jar;该jar中也有Version2LicenseDecoder.class和LicenseManager.class文件,同样用修改过的文件替换,然后重启JIRA,插件管理功能可以正常使用了。

附上修改的代码:

Version2LicenseDecoder类

将canDecode方法改名为canDecode2,再新建一个canDecode方法,方法直接返回true;

public boolean canDecode2(String licenseString)
{
licenseString = removeWhiteSpaces(licenseString);

int pos = licenseString.lastIndexOf('X');
if ((pos == -1) || (pos + 3 >= licenseString.length()))
{
return false;
}

try
{
int version = Integer.parseInt(licenseString.substring(pos + 1, pos + 3));
if ((version != 1) && (version != 2))
{
return false;
}

String lengthStr = licenseString.substring(pos + 3);
int encodedLicenseLength = Integer.valueOf(lengthStr, 31).intValue();

return pos == encodedLicenseLength;
}
catch (NumberFormatException e)
{
}

return false;
}

public boolean canDecode(String licenseString)
{
return true;
}


修改doDecode方法

public Properties doDecode(String licenseString)
{
Properties result = null;
String encodedLicenseTextAndHash = null;
if (canDecode2(licenseString)){
encodedLicenseTextAndHash = getLicenseContent(removeWhiteSpaces(licenseString));
byte[] zippedLicenseBytes = checkAndGetLicenseText(encodedLicenseTextAndHash);
Reader licenseText = unzipText(zippedLicenseBytes);
result = loadLicenseConfiguration(licenseText);
} else {
encodedLicenseTextAndHash = removeWhiteSpaces(licenseString);
result = new Properties();

if (encodedLicenseTextAndHash != null && encodedLicenseTextAndHash.length()>0){

String[] proStrs = encodedLicenseTextAndHash.split(",");
if (proStrs!= null && proStrs.length>0){
for (String property : proStrs){
String[] proStr = property.split("=");
result.put(proStr[0], proStr[1]);
}
}
}
}

return result;
}

其他方法不做任何更改。

LicenseManager类

修改hasValidLicense方法,直接返回true;

public boolean hasValidLicense(String licenseKey)
{
return true;
//return (getLicense(licenseKey) != null) && (!getLicense(licenseKey).isExpired());
}


破解完成。

之后可以安装中文插件,汉化一下。

大家也可以去CSDN
下载破解包, 里面是直接打包好的补丁。

以上修改只用于学习研究之用,请不要用于任何商业用途,任何由此产生的法律纠纷,均与本人无关,本人概不负责。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: