confluence icon indicating copy to clipboard operation
confluence copied to clipboard

AI for Confluence 插件破解失败

Open gary0121 opened this issue 1 year ago • 9 comments

激活成功 但是设置 license 被识别

Common Configuration

The license is suspected to be cracked. Please consider purchasing a legitimate license.

For further assistance, please visit: Support

gary0121 avatar Oct 31 '24 11:10 gary0121

I saw this too. I haven't extracted the jar file to see what the plugin is doing to make this decision. Possibly it's not air-gapped supported, meaning they check on their side... or perhaps the licence expiry. I might have a look into this out of curiosity

voarsh2 avatar Nov 17 '24 07:11 voarsh2

There's a specific function in the jar: image


  private boolean isLicenseCracked(PluginLicense license) {
    try {
      ZonedDateTime expiryZonedDate = null;
      if (ClassUtils.doesMethodExist(PluginLicense.class, "getExpiryDate")) {
        logger.debug("---> getExpiryDate method exists in PluginLicense class.");
        Option<DateTime> expiryDateOp = license.getExpiryDate();
        if (expiryDateOp.isDefined()) {
          DateTime expiryDate = (DateTime)expiryDateOp.get();
          expiryZonedDate = Instant.ofEpochMilli(expiryDate.getMillis()).atZone(ZonedDateTime.now().getZone());
        } 
      } else if (ClassUtils.doesMethodExist(PluginLicense.class, "getExpiryZonedDate")) {
        logger.debug("---> getExpiryZonedDate method exists in PluginLicense class.");
        Optional<ZonedDateTime> expiryZonedDateOp = license.getExpiryZonedDate();
        if (expiryZonedDateOp.isPresent())
          expiryZonedDate = expiryZonedDateOp.get(); 
      } else {
        logger.error("Neither getExpiryDate nor getExpiryZonedDate method exists in PluginLicense class.");
        return false;
      } 
      if (expiryZonedDate == null)
        return false; 
      logger.debug("---> expiryZonedDate: " + expiryZonedDate);
      ZonedDateTime currentDate = ZonedDateTime.now();
      long yearsBetween = ChronoUnit.YEARS.between(currentDate, expiryZonedDate);
      logger.debug("---> yearsBetween: " + yearsBetween);
      return (yearsBetween > 5L);
    } catch (Exception e) {
      logger.error("Error in isLicenseCracked: ", e);
      return false;
    } 
  }
}

As I suspected: The method isLicenseCracked seems to be checking for an unusual license expiration condition:

Method Detection:

It first tries to find an expiry date method in the PluginLicense class

Checks for two possible methods:

getExpiryDate() or getExpiryZonedDate()

Expiry Date Retrieval:

If getExpiryDate() exists, it converts the DateTime to ZonedDateTime If getExpiryZonedDate() exists, it directly uses that

Cracked License Logic:

The key condition is: yearsBetween > 5L This means the license is considered "cracked" if the expiry date is more than 5 years in the future

Potential Cracking Detection Strategies:

The method considers a license potentially "cracked" if:

  1. The expiry date is very far in the future (> 5 years) No valid expiry date can be retrieved

The way around this is to:

update the agent to generate a less than 5 year licence expiry, or to modify the file and recompile (which is harder)

voarsh2 avatar Nov 17 '24 07:11 voarsh2

@voarsh2 hello, boss, it is a greate analytics! But how to generate a licence expiried less than 5 years? I can't find a config param on atlassian-agent.jar.

rabintang avatar Dec 05 '24 05:12 rabintang

@voarsh2 hello, boss, it is a greate analytics! But how to generate a licence expiried less than 5 years? I can't find a config param on atlassian-agent.jar.

AAABqA0ODAoPeJyNkl9vmzAUxd/9KZD2bIohf2gkS6MEmnQhdCNds0cHboo1Y5BtkqaffgSKJlWTu ge/XOuec+7v3i+7srWWkFvO1CLewiUL17PCbGe5jjtBeV3ZrwWcmrqwWdNoO1jHtQpreRQtyBxsl ht+AmpUCyhUwAyv5ZIZoNd2TFzsTNGG5yA17C4NbFkFNEyTJPoRroMNik5MtH0TPTKhAS1B54o3f eVJCl5xA4UlBgXrcLFKYxq9uLl5K7kAm9efR+zisBCkATXETNULk1wPrisQ4j80+vZGcT2OWkvTj R4ljItB4+u5VqKwOyX0nnbFdEmT8BzGq/2DSIr0ttw/Z0x4PuzL54kk8v4cBOX3faXvQ+H/iuGhn p7jWX7ng7NqA6d8oRR1Dp23ZF2K6LXh6jLS9TEh2HU+z54Zpq7DD4AzUCdQ6yW9+7Zb48jf3uJZO iH40Z/E6DdcfoLSVzBk5jhzx/c8grZtdQCVHp9090cxGRf67zyPrcpLpuHjFbxTGfVdlLWHv7vuq WbRlnYPb8jc87z5rLN3fXeE3d/OB9Z/ANrT7XowLAIUPY5vaCDXhBc9XrK7eahkGBCqdQYCFGRWi g05zpKr95L+eFA7EiWN7UfkX02kc

gary0121 avatar Dec 05 '24 05:12 gary0121

@voarsh2 hello, boss, it is a greate analytics! But how to generate a licence expiried less than 5 years? I can't find a config param on atlassian-agent.jar.

AAABqA0ODAoPeJyNkl9vmzAUxd/9KZD2bIohf2gkS6MEmnQhdCNds0cHboo1Y5BtkqaffgSKJlWTu ge/XOuec+7v3i+7srWWkFvO1CLewiUL17PCbGe5jjtBeV3ZrwWcmrqwWdNoO1jHtQpreRQtyBxsl ht+AmpUCyhUwAyv5ZIZoNd2TFzsTNGG5yA17C4NbFkFNEyTJPoRroMNik5MtH0TPTKhAS1B54o3f eVJCl5xA4UlBgXrcLFKYxq9uLl5K7kAm9efR+zisBCkATXETNULk1wPrisQ4j80+vZGcT2OWkvTj R4ljItB4+u5VqKwOyX0nnbFdEmT8BzGq/2DSIr0ttw/Z0x4PuzL54kk8v4cBOX3faXvQ+H/iuGhn p7jWX7ng7NqA6d8oRR1Dp23ZF2K6LXh6jLS9TEh2HU+z54Zpq7DD4AzUCdQ6yW9+7Zb48jf3uJZO iH40Z/E6DdcfoLSVzBk5jhzx/c8grZtdQCVHp9090cxGRf67zyPrcpLpuHjFbxTGfVdlLWHv7vuq WbRlnYPb8jc87z5rLN3fXeE3d/OB9Z/ANrT7XowLAIUPY5vaCDXhBc9XrK7eahkGBCqdQYCFGRWi g05zpKr95L+eFA7EiWN7UfkX02kc

thx, i have modify the jar code and then it works!

rabintang avatar Dec 05 '24 14:12 rabintang

@voarsh2 hello, boss, it is a greate analytics! But how to generate a licence expiried less than 5 years? I can't find a config param on atlassian-agent.jar.

AAABqA0ODAoPeJyNkl9vmzAUxd/9KZD2bIohf2gkS6MEmnQhdCNds0cHboo1Y5BtkqaffgSKJlWTu ge/XOuec+7v3i+7srWWkFvO1CLewiUL17PCbGe5jjtBeV3ZrwWcmrqwWdNoO1jHtQpreRQtyBxsl ht+AmpUCyhUwAyv5ZIZoNd2TFzsTNGG5yA17C4NbFkFNEyTJPoRroMNik5MtH0TPTKhAS1B54o3f eVJCl5xA4UlBgXrcLFKYxq9uLl5K7kAm9efR+zisBCkATXETNULk1wPrisQ4j80+vZGcT2OWkvTj R4ljItB4+u5VqKwOyX0nnbFdEmT8BzGq/2DSIr0ttw/Z0x4PuzL54kk8v4cBOX3faXvQ+H/iuGhn p7jWX7ng7NqA6d8oRR1Dp23ZF2K6LXh6jLS9TEh2HU+z54Zpq7DD4AzUCdQ6yW9+7Zb48jf3uJZO iH40Z/E6DdcfoLSVzBk5jhzx/c8grZtdQCVHp9090cxGRf67zyPrcpLpuHjFbxTGfVdlLWHv7vuq WbRlnYPb8jc87z5rLN3fXeE3d/OB9Z/ANrT7XowLAIUPY5vaCDXhBc9XrK7eahkGBCqdQYCFGRWi g05zpKr95L+eFA7EiWN7UfkX02kc

thx, i have modify the jar code and then it works!

Which .jar are you talking about? The plugin .jar? I haven't attempted this, since any update will need re-apply and do not have the build script the app maintainer uses. Maybe is is a simple maven script. Haven't tried

That licence has a shorter expiry and works without modification. Would be good if @gary0121 would share his updated agent code

@voarsh2 hello, boss, it is a greate analytics! But how to generate a licence expiried less than 5 years? I can't find a config param on atlassian-agent.jar.

I attempted to modify my agent to include a expiry date parameter for a license generation. Due to time constraints I didn't finish building it because of a build issue.

If someone updated the agent to include expiry date arg, please share (Atlassian Bitbucket requires my agent version, for which I made an issue and released a version for that).

Otherwise, in due time I'll double check my agent build and include a link for it.

voarsh2 avatar Dec 05 '24 19:12 voarsh2

@rabintang Can you give me a packaged atlassian-agent.jar package which time is less then 5year ? my email [email protected] ths;

kevinzouwf avatar Jan 25 '25 09:01 kevinzouwf

AI for Jira has same problem! @voarsh2

smallidea avatar Feb 14 '25 03:02 smallidea

AI for Jira has same problem! @voarsh2

It's the same vendor. I've already given the solution, @gary0121 didn't share his updated agent build, and I've not had time to fix mine at https://bitbucket.hosttweb.com/projects/AT/repos/atlassian-agent/commits

voarsh2 avatar Feb 28 '25 21:02 voarsh2