ITeye博客

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

Fred_Han · 2013-09-08 13:17 · 非技术 · 非技术 · Markdown

最新公司换了新项目,项目比较大,每次更改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,如下图

申请到的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;

[java] view plaincopy

  1. public boolean canDecode2(String licenseString)
  2. {
  3. licenseString = removeWhiteSpaces(licenseString);
  4. int pos = licenseString.lastIndexOf('X');
  5. if ((pos == -1) || (pos + 3 >= licenseString.length()))
  6. {
  7. return false;
  8. }
  9. try
  10. {
  11. int version = Integer.parseInt(licenseString.substring(pos + 1, pos + 3));
  12. if ((version != 1) && (version != 2))
  13. {
  14. return false;
  15. }
  16. String lengthStr = licenseString.substring(pos + 3);
  17. int encodedLicenseLength = Integer.valueOf(lengthStr, 31).intValue();
  18. return pos == encodedLicenseLength;
  19. }
  20. catch (NumberFormatException e)
  21. {
  22. }
  23. return false;
  24. }
  25. public boolean canDecode(String licenseString)
  26. {
  27. return true;
  28. }

修改doDecode方法

[java] view plaincopy

  1. public Properties doDecode(String licenseString)
  2. {
  3. Properties result = null;
  4. String encodedLicenseTextAndHash = null;
  5. if (canDecode2(licenseString)){
  6. encodedLicenseTextAndHash = getLicenseContent(removeWhiteSpaces(licenseString));
  7. byte[] zippedLicenseBytes = checkAndGetLicenseText(encodedLicenseTextAndHash);
  8. Reader licenseText = unzipText(zippedLicenseBytes);
  9. result = loadLicenseConfiguration(licenseText);
  10. } else {
  11. encodedLicenseTextAndHash = removeWhiteSpaces(licenseString);
  12. result = new Properties();
  13. if (encodedLicenseTextAndHash != null && encodedLicenseTextAndHash.length()>0){
  14. String[] proStrs = encodedLicenseTextAndHash.split(",");
  15. if (proStrs!= null && proStrs.length>0){
  16. for (String property : proStrs){
  17. String[] proStr = property.split("=");
  18. result.put(proStr[0], proStr[1]);
  19. }
  20. }
  21. }
  22. }
  23. return result;
  24. }

其他方法不做任何更改。

 

LicenseManager类

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

[java] view plaincopy

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

破解完成。

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

 

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

以上修改只用于学习研究之用,请不要用于任何商业用途,任何由此产生的法律纠纷,均与本人无关,本人概不负责。

转自:http://blog.csdn.net/joinandjoin/article/details/9052785

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。