首页
社区
课程
招聘
[推荐]Nexus2.14专业版的破解方法
2020-4-5 09:03 3862

[推荐]Nexus2.14专业版的破解方法

2020-4-5 09:03
3862

简介:

    Nexus是一个强大的Maven仓库管理器,它极大地简化了自己内部仓库的维护和外部仓库的访问。利用Nexus你可以只在一个地方就能够完全控制访问 和部署在你所维护仓库中的每个Artifact。Nexus是一套“开箱即用”的系统不需要数据库,它使用文件系统加Lucene来组织数据。Nexus 使用ExtJS来开发界面,利用Restlet来提供完整的REST APIs,通过m2eclipse与Eclipse集成使用。Nexus支持WebDAV与LDAP安全身份认证。


一、所需工具:

1.eclipse

2.jd-gui

3.jdk 1.8


二、破解步骤

1.新建一个java工程



2.添加Nexus所有依赖包

可以添加项目所依赖的包,这一步可以先略过。

到第四步时再逐一添加,因为需要判断导入的包在哪些jar文件中。


3.新建一个class文件



4.编辑java文件内容如下(patch代码):

/NexusPatch/src/org/sonatype/licensing/trial/internal/DefaultTrialLicenseManager.java

使用find  . -name *.jar |xargs strings -f -a -|grep codeguard.licensing.xjx

这个命令来查找依赖所在jar名称,添加到第二步的依赖中。

package org.sonatype.licensing.trial.internal;

import codeguard.licensing.xjx;
import codeguard.licensing.zsv;
import de.schlichtherle.license.LicenseContent;
import java.io.File;
import java.util.Date;
import javax.annotation.Nullable;
import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Provider;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.sonatype.licensing.CustomLicenseContent;
import org.sonatype.licensing.LicenseContentException;
import org.sonatype.licensing.LicenseKey;
import org.sonatype.licensing.LicenseKeyRequest;
import org.sonatype.licensing.LicenseValidator;
import org.sonatype.licensing.LicensingException;
import org.sonatype.licensing.feature.Feature;
import org.sonatype.licensing.feature.FeatureSet;
import org.sonatype.licensing.feature.FeatureValidator;
import org.sonatype.licensing.trial.TrialLicenseManager;
import org.sonatype.licensing.trial.TrialLicenseParam;

import com.sonatype.nexus.licensing.feature.NexusProfessionalFeature;

@Named("licensing.default")
public class DefaultTrialLicenseManager implements TrialLicenseManager {
  private final Logger wab = LoggerFactory.getLogger(getClass());
  
  private final Provider<LicenseKey> bzt;
  
  private final FeatureValidator dlc;
  
  private final LicenseValidator bwp;
  
  public DefaultTrialLicenseManager(Provider<LicenseKey> paramProvider, FeatureValidator paramFeatureValidator) {
    this(paramProvider, paramFeatureValidator, (LicenseValidator)new zsv());
  }
  
  @Inject
  public DefaultTrialLicenseManager(Provider<LicenseKey> paramProvider, FeatureValidator paramFeatureValidator, @Nullable LicenseValidator paramLicenseValidator) {
    this.bzt = paramProvider;
    this.dlc = paramFeatureValidator;
    this.bwp = paramLicenseValidator;
  }
  
  public LicenseKey createLicense(TrialLicenseParam paramTrialLicenseParam, LicenseKeyRequest paramLicenseKeyRequest) throws LicensingException {
    LicenseKey licenseKey = (LicenseKey)this.bzt.get();
    try {
      (new xjx(paramTrialLicenseParam, this.bwp)).itm((LicenseContent)paramLicenseKeyRequest.getLicenseContent(), paramLicenseKeyRequest.getLicenseKeyFile());
      licenseKey.populateFromLicenseContent(paramLicenseKeyRequest.getLicenseContent());
    } catch (LicenseContentException licenseContentException) {
      if (this.wab.isTraceEnabled())
        this.wab.trace("createLicense", (Throwable)licenseContentException); 
      throw itm(licenseKey, licenseContentException);
    } catch (Exception exception) {
      if (this.wab.isTraceEnabled())
        this.wab.trace("createLicense", exception); 
      throw new LicensingException("Unable to create license: " + itm(exception), exception);
    } 
    return licenseKey;
  }
  
  public LicenseKey installLicense(TrialLicenseParam paramTrialLicenseParam, File paramFile) throws LicensingException {
    LicenseKey licenseKey = (LicenseKey)this.bzt.get();
    try {
      CustomLicenseContent customLicenseContent = (CustomLicenseContent)(new xjx(paramTrialLicenseParam, this.bwp)).itm(paramFile);
      licenseKey.populateFromLicenseContent(customLicenseContent);
    } catch (LicenseContentException licenseContentException) {
      if (this.wab.isTraceEnabled())
        this.wab.trace("installLicense", (Throwable)licenseContentException); 
      throw itm(licenseKey, licenseContentException);
    } catch (Exception exception) {
      if (this.wab.isTraceEnabled())
        this.wab.trace("installLicense", exception); 
      throw new LicensingException("Unable to install license: " + itm(exception), exception);
    } 
    return licenseKey;
  }
  
  public void uninstallLicense(TrialLicenseParam paramTrialLicenseParam) throws LicensingException {
    try {
      (new xjx(paramTrialLicenseParam, this.bwp)).uninstall();
    } catch (LicenseContentException licenseContentException) {
      if (this.wab.isTraceEnabled())
        this.wab.trace("uninstallLicense", (Throwable)licenseContentException); 
      throw new LicensingException(itm(licenseContentException), licenseContentException);
    } catch (Exception exception) {
      if (this.wab.isTraceEnabled())
        this.wab.trace("uninstallLicense", exception); 
      throw new LicensingException("Unable to uninstall license: " + itm(exception), exception);
    } 
  }
  
  
//关键代码隐藏,请下载附件。
  
  public void validateFeature(LicenseKey paramLicenseKey, Feature paramFeature) throws LicensingException {
    this.dlc.validate(paramFeature, paramLicenseKey);
  }
  
  private String itm(Exception paramException) {
    String str = (paramException.getLocalizedMessage() != null) ? paramException.getLocalizedMessage() : paramException.getMessage();
    return (str != null) ? str : paramException.getClass().getSimpleName();
  }
  
  private LicensingException itm(LicenseKey paramLicenseKey, LicenseContentException paramLicenseContentException) {
    paramLicenseKey.populateFromLicenseContent((CustomLicenseContent)paramLicenseContentException.getLicenseContent());
    return new LicensingException(paramLicenseKey, itm((Exception)paramLicenseContentException), paramLicenseContentException);
  }
}


5.生成class文件

替换jar包中的DefaultTrialLicenseManager.class文件

替换nexus安装目录下的license-bundle-1.4.jar文件


详细的视频操作在附件的下载地址中,授人以鱼不如授人以渔,视频中是一步一步操作下来,比较详细,希望大家给点鼓励吧。

分享本视频的初衷也是分享一种方法和思路,如果您有什么好的思路和方法,拜托也不吝分享给大家,希望大家共同进步,谢谢。


附件中包含:

1.视频教程

2.隐藏的关键代码

3.试用license文件和Nexus2.14专业版安装包。


[培训]《安卓高级研修班(网课)》月薪三万计划

最后于 2020-4-18 10:43 被zyj_super编辑 ,原因: 更新附件
注:下载本附件需支付 4雪币(note:4 points for downloading this attachment)
上传的附件:
收藏
点赞3
打赏
分享
最新回复 (3)
雪    币: 360
活跃值: (252)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
CuteMiyu 2020-4-13 10:47
2
0
分享已過期?
雪    币: 6484
活跃值: (3052)
能力值: ( LV2,RANK:15 )
在线值:
发帖
回帖
粉丝
zyj_super 2020-4-13 19:45
3
0
test
最后于 2020-4-18 10:42 被zyj_super编辑 ,原因:
雪    币: 2
能力值: ( LV1,RANK:0 )
在线值:
发帖
回帖
粉丝
daymissed 2020-5-18 11:09
4
0
感谢分享
游客
登录 | 注册 方可回帖
返回