Skip to content

Commit

Permalink
add third party plugins
Browse files Browse the repository at this point in the history
Signed-off-by: pengzhile <[email protected]>
  • Loading branch information
pengzhile committed Dec 6, 2018
1 parent 2507134 commit 69e9b4e
Show file tree
Hide file tree
Showing 19 changed files with 164 additions and 97 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@
* FishEye
* Crowd
* Crucible
* Third party plugins

## 使用说明

### 优势
* 支持Atlassian家几乎所有产品,同时支持插件。
* 支持Atlassian家几乎所有产品,同时支持插件(包括插件市场的第三方插件)
* 支持DataCenter模式。
* 相比较于传统的crack来说可以很容易的升级你的服务,而不用重新再次破解。
* 提供基于java的命令行 keygen,更方便在终端环境使用。
Expand Down Expand Up @@ -53,6 +54,7 @@
* 你得确认已经配置好agent,参考上面说明。
* 当你试着执行`java -jar /path/to/atlassian-agent.jar`时应该可以看到输出的KeyGen参数帮助。
* 请仔细看看每个参数的作用,特别是`-p`参数的取值范围。
* 第三方插件将其`应用密钥`作为`-p`参数。如:`-p com.gliffy.integration.confluence`
* 在Atlassian服务安装时你应该能看到类似:`AAAA-BBBB-CCCC-DDDD`的server id,请留意。
* 提供了正确的参数运行KeyGen会在终端输出计算好的激活码。
* 将生成的激活码复制出来去激活你要使用的服务。
Expand Down
9 changes: 6 additions & 3 deletions src/main/java/io/zhile/crack/atlassian/Usage.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

/**
* @author pengzhile
* @link https://zhile.io
* @version 1.0
* @link https://zhile.io
*/
public class Usage {
private static final Options OPTIONS = new Options();
Expand All @@ -33,6 +33,7 @@ public class Usage {
PRODUCTS.put("jsd", "JIRA Service Desk");
PRODUCTS.put("training", "Training plugin for JIRA");
PRODUCTS.put("capture", "Capture plugin for JIRA");
PRODUCTS.put("*", "Third party plugin key, looks like: com.foo.bar");

StringBuilder sb = new StringBuilder();
for (Map.Entry<String, String> entry : PRODUCTS.entrySet()) {
Expand Down Expand Up @@ -149,11 +150,13 @@ private static void runCommand(CommandLine commandLine) {
property = new Capture(contactName, contactEMail, serverID, organisation);
break;
default:
printUsage();
return;
property = new ThirdPlugin(contactName, contactEMail, serverID, organisation);
((ThirdPlugin) property).setProductName(product);
break;
}

try {
property.init();
String licenseCode = Encoder.encode(property.toString());

System.out.println("Your license code(Don't copy this line!!!): \n");
Expand Down
34 changes: 24 additions & 10 deletions src/main/java/io/zhile/crack/atlassian/license/LicenseProperty.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,34 @@

/**
* @author pengzhile
* @link https://zhile.io
* @version 1.0
* @link https://zhile.io
*/
abstract public class LicenseProperty {
protected Date date = new Date();
protected Map<String, String> data = new HashMap<>(32);

protected String contactName;
protected String contactEMail;
protected String serverID;
protected String organisation;
protected boolean dataCenter;

abstract public String getProductName();

public LicenseProperty(String ContactName, String ContactEMail, String ServerID, String Organisation, boolean dataCenter) {
public LicenseProperty(String contactName, String contactEMail, String serverID, String organisation, boolean dataCenter) {
this.contactName = contactName;
this.contactEMail = contactEMail;
this.serverID = serverID;
this.organisation = organisation;
this.dataCenter = dataCenter;
}

public LicenseProperty(String contactName, String contactEMail, String serverID, String organisation) {
this(contactName, contactEMail, serverID, organisation, false);
}

public void init() {
Date expiryDate = new Date(3771590399000L);
String licenseId = "L" + System.currentTimeMillis();

Expand All @@ -33,19 +51,15 @@ public LicenseProperty(String ContactName, String ContactEMail, String ServerID,
setDescription("Unlimited license by https://zhile.io");
setEvaluation(false);

setContactName(ContactName);
setContactEMail(ContactEMail);
setServerID(ServerID);
setOrganisation(Organisation);
setContactName(contactName);
setContactEMail(contactEMail);
setServerID(serverID);
setOrganisation(organisation);
setDataCenter(dataCenter);

data.put("licenseVersion", "2");
}

public LicenseProperty(String ContactName, String ContactEMail, String ServerID, String Organisation) {
this(ContactName, ContactEMail, ServerID, Organisation, false);
}

public void setDescription(String description) {
data.put("Description", description);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,17 @@

/**
* @author pengzhile
* @link https://zhile.io
* @version 1.0
* @link https://zhile.io
*/
public class Bamboo extends LicenseProperty {
public Bamboo(String ContactName, String ContactEMail, String ServerID, String Organisation) {
super(ContactName, ContactEMail, ServerID, Organisation);
public Bamboo(String contactName, String contactEMail, String serverID, String organisation) {
super(contactName, contactEMail, serverID, organisation);
}

@Override
public void init() {
super.init();

setLicenseEdition(LicenseEdition.UNLIMITED);
setNumberOfBambooLocalAgents(-1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@

/**
* @author pengzhile
* @link https://zhile.io
* @version 1.0
* @link https://zhile.io
*/
public class Bitbucket extends LicenseProperty {
public Bitbucket(String ContactName, String ContactEMail, String ServerID, String Organisation, boolean dataCenter) {
super(ContactName, ContactEMail, ServerID, Organisation, dataCenter);
public Bitbucket(String contactName, String contactEMail, String serverID, String organisation, boolean dataCenter) {
super(contactName, contactEMail, serverID, organisation, dataCenter);
}

public Bitbucket(String ContactName, String ContactEMail, String ServerID, String Organisation) {
this(ContactName, ContactEMail, ServerID, Organisation, false);
public Bitbucket(String contactName, String contactEMail, String serverID, String organisation) {
super(contactName, contactEMail, serverID, organisation);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,14 @@
package io.zhile.crack.atlassian.license.products;

import io.zhile.crack.atlassian.license.LicenseType;

/**
* @author pengzhile
* @link https://zhile.io
* @version 1.0
* @link https://zhile.io
*/
public class Capture extends Plugin {
public Capture(String ContactName, String ContactEMail, String ServerID, String Organisation) {
super(ContactName, ContactEMail, ServerID, Organisation);

setServerID(null);
}

@Override
public String getProductName() {
return "bonfire";
}
public class Capture extends ThirdPlugin {
public Capture(String contactName, String contactEMail, String serverID, String organisation) {
super(contactName, contactEMail, serverID, organisation);

@Override
public void setLicenseType(LicenseType licenseType) {
data.put("LicenseTypeName", licenseType.toString());
setProductName("bonfire");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@

/**
* @author pengzhile
* @link https://zhile.io
* @version 1.0
* @link https://zhile.io
*/
public class Confluence extends LicenseProperty {
public Confluence(String ContactName, String ContactEMail, String ServerID, String Organisation, boolean dataCenter) {
super(ContactName, ContactEMail, ServerID, Organisation, dataCenter);
public Confluence(String contactName, String contactEMail, String serverID, String organisation, boolean dataCenter) {
super(contactName, contactEMail, serverID, organisation, dataCenter);
}

public Confluence(String ContactName, String ContactEMail, String ServerID, String Organisation) {
this(ContactName, ContactEMail, ServerID, Organisation, false);
public Confluence(String contactName, String contactEMail, String serverID, String organisation) {
super(contactName, contactEMail, serverID, organisation);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@

/**
* @author pengzhile
* @link https://zhile.io
* @version 1.0
* @link https://zhile.io
*/
public class Crowd extends LicenseProperty {
public Crowd(String ContactName, String ContactEMail, String ServerID, String Organisation, boolean dataCenter) {
super(ContactName, ContactEMail, ServerID, Organisation, dataCenter);
public Crowd(String contactName, String contactEMail, String serverID, String organisation, boolean dataCenter) {
super(contactName, contactEMail, serverID, organisation, dataCenter);
}

public Crowd(String ContactName, String ContactEMail, String ServerID, String Organisation) {
this(ContactName, ContactEMail, ServerID, Organisation, false);
public Crowd(String contactName, String contactEMail, String serverID, String organisation) {
super(contactName, contactEMail, serverID, organisation);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

/**
* @author pengzhile
* @link https://zhile.io
* @version 1.0
* @link https://zhile.io
*/
public class Crucible extends LicenseProperty {
public Crucible(String ContactName, String ContactEMail, String ServerID, String Organisation) {
super(ContactName, ContactEMail, ServerID, Organisation);
public Crucible(String contactName, String contactEMail, String serverID, String organisation) {
super(contactName, contactEMail, serverID, organisation);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

/**
* @author pengzhile
* @link https://zhile.io
* @version 1.0
* @link https://zhile.io
*/
public class FishEye extends LicenseProperty {
public FishEye(String ContactName, String ContactEMail, String ServerID, String Organisation) {
super(ContactName, ContactEMail, ServerID, Organisation);
public FishEye(String contactName, String contactEMail, String serverID, String organisation) {
super(contactName, contactEMail, serverID, organisation);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@

/**
* @author pengzhile
* @link https://zhile.io
* @version 1.0
* @link https://zhile.io
*/
public class JIRACore extends LicenseProperty {
public JIRACore(String ContactName, String ContactEMail, String ServerID, String Organisation) {
super(ContactName, ContactEMail, ServerID, Organisation);
public JIRACore(String contactName, String contactEMail, String serverID, String organisation) {
super(contactName, contactEMail, serverID, organisation);
}

@Override
public void init() {
super.init();

setLicenseEdition(LicenseEdition.UNLIMITED);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,24 @@

/**
* @author pengzhile
* @link https://zhile.io
* @version 1.0
* @link https://zhile.io
*/
public class JIRAServiceDesk extends LicenseProperty {
public JIRAServiceDesk(String ContactName, String ContactEMail, String ServerID, String Organisation, boolean dataCenter) {
super(ContactName, ContactEMail, ServerID, Organisation, dataCenter);
public JIRAServiceDesk(String contactName, String contactEMail, String serverID, String organisation, boolean dataCenter) {
super(contactName, contactEMail, serverID, organisation, dataCenter);
}

setEnterprise(true);
setNumRoleCount(-1);
public JIRAServiceDesk(String contactName, String contactEMail, String serverID, String organisation) {
super(contactName, contactEMail, serverID, organisation);
}

public JIRAServiceDesk(String ContactName, String ContactEMail, String ServerID, String Organisation) {
this(ContactName, ContactEMail, ServerID, Organisation, false);
@Override
public void init() {
super.init();

setEnterprise(true);
setNumRoleCount(-1);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,24 @@

/**
* @author pengzhile
* @link https://zhile.io
* @version 1.0
* @link https://zhile.io
*/
public class JIRASoftware extends LicenseProperty {
public JIRASoftware(String ContactName, String ContactEMail, String ServerID, String Organisation, boolean dataCenter) {
super(ContactName, ContactEMail, ServerID, Organisation, dataCenter);
public JIRASoftware(String contactName, String contactEMail, String serverID, String organisation, boolean dataCenter) {
super(contactName, contactEMail, serverID, organisation, dataCenter);
}

setLicenseEdition(LicenseEdition.UNLIMITED);
setEnterprise(true);
public JIRASoftware(String contactName, String contactEMail, String serverID, String organisation) {
super(contactName, contactEMail, serverID, organisation);
}

public JIRASoftware(String ContactName, String ContactEMail, String ServerID, String Organisation) {
this(ContactName, ContactEMail, ServerID, Organisation, false);
@Override
public void init() {
super.init();

setLicenseEdition(LicenseEdition.UNLIMITED);
setEnterprise(true);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,24 @@

/**
* @author pengzhile
* @link https://zhile.io
* @version 1.0
* @link https://zhile.io
*/
abstract public class Plugin extends LicenseProperty {
Plugin(String ContactName, String ContactEMail, String ServerID, String Organisation, boolean dataCenter) {
super(ContactName, ContactEMail, ServerID, Organisation, dataCenter);
public Plugin(String contactName, String contactEMail, String serverID, String organisation, boolean dataCenter) {
super(contactName, contactEMail, serverID, organisation, dataCenter);
}

setLicenseID(null);
setEnterprise(true);
public Plugin(String contactName, String contactEMail, String serverID, String organisation) {
super(contactName, contactEMail, serverID, organisation);
}

Plugin(String ContactName, String ContactEMail, String ServerID, String Organisation) {
this(ContactName, ContactEMail, ServerID, Organisation, false);
@Override
public void init() {
super.init();

setLicenseID(null);
setEnterprise(true);
}

@Override
Expand Down
Loading

0 comments on commit 69e9b4e

Please sign in to comment.