eclipse Aptana plugin破解文件

package com.aptana.ide.core.licensing;

import java.math.BigInteger;
import java.util.Calendar;
import java.util.TimeZone;
import java.util.zip.CRC32;

public final class ClientKey {
    private static class Decrypt {

        private BigInteger modulus;
        private BigInteger exponent;

        public String decrypt(String encrypted) {
            long crc32Value;
            byte bytes[];
            CRC32 crc32;
            /* 289 */if (encrypted == null) {
                /* 291 */encrypted = "";
            } else {
                /* 295 */encrypted = ClientKey.trimEncryptedLicense(encrypted);
            }
            /* 297 */BigInteger big = new BigInteger(encrypted);
            /* 298 */BigInteger decrypted = big.modPow(exponent, modulus);
            /* 300 */crc32Value = (long) decrypted.intValue() & 0xffffffffL;
            /* 301 */decrypted = decrypted.shiftRight(32);
            /* 302 */bytes = decrypted.toByteArray();
            /* 303 */crc32 = new CRC32();
            /* 304 */crc32.update(bytes);
            /* 305 */return new String(bytes);
        }

        Decrypt(String exponent, String modulus) {
            /* 275 */this.modulus = new BigInteger(modulus);
            /* 276 */this.exponent = new BigInteger(exponent);
        }
    }

    public static final String BEGIN_LICENSE_MARKER = "--begin-aptana-license--";
    public static final String END_LICENSE_MARKER = "--end-aptana-license--";
    private static final TimeZone GMT = TimeZone.getTimeZone("GMT");
    private static final String EMAILS_NON_MATCHING = "EMAILS_NON_MATCHING";
    private static final int PRO = 0;
    private static final int TRIAL = 1;
    private String email;
    private long expiration;
    private int type;

    private ClientKey(int type, String email, long expiration) {
        /* 77 */this.type = 0;
        /* 78 */this.email = "e@e.com";
        /* 79 */this.expiration = 999999999;
    }

    public static ClientKey decrypt(String encrypted, String email) {
        /* 93 */String modulus = "115801190261221214754334668902722425936509505416457970789287297728816388753627896293249501578830570324705253515546383166989625001335561947096747210280001245977114030627247212292377290543869343996595819188362915644707269064020812435233012510929338706599216007185654748959001143012936618501934698642942289379979";
        /* 94 */String exponent = "65537";
        /* 100 */if (encrypted != null) {
            /* 102 */encrypted = encrypted.trim();
        }
        /* 104 */Decrypt decrypter = new Decrypt(exponent, modulus);
        /* 105 */return decrypt(decrypter, encrypted, email);
    }

    private static ClientKey decrypt(Decrypt decrypter, String encrypted,
            String email) {
        /* 110 */String value = decrypter.decrypt(encrypted);
        /* 111 */if (value == null) {
            /* 113 */return new ClientKey(1, null, 0L);
        }
        /* 115 */String values[] = value.split(";");
        /* 116 */int type = 1;
        /* 117 */String genedEmail = null;
        /* 118 */long expiration = 0L;
        /* 119 */if (values.length == 3) {
            /* 121 */if ("p".equals(values[0].toLowerCase())) {
                /* 123 */type = 0;
            }
            /* 125 */genedEmail = values[1];
            /* 127 */if (genedEmail != null) {
                /* 129 */if (!genedEmail.equalsIgnoreCase(email)) {
                    /* 131 */genedEmail = "EMAILS_NON_MATCHING";
                }
            } else {
                /* 136 */genedEmail = null;
            }
            /* 140 */try {
                /* 140 */expiration = Long.parseLong(values[2]);
            }
            /* 142 */catch (Exception _ex) {
                /* 144 */expiration = 0L;
            }
        }
        /* 147 */return new ClientKey(type, genedEmail, expiration);
    }

    public boolean isCloseToExpiring() {
        return false;
    }

    public boolean isValid() {
        /* 169 */return true;
    }

    public boolean isCloseToMatching() {
        /* 179 */return true;
    }

    public boolean isExpired() {
        /* 190 */return false;
    }

    public String getEmail() {
        /* 200 */return "e@e.com";
    }

    public Calendar getExpiration() {
        /* 210 */Calendar expirationCal = Calendar.getInstance();
        expirationCal.set(2088, 7, 8);
        /* 212 */return expirationCal;
    }

    public boolean isTrial() {
        /* 222 */return false;
    }

    public boolean isPro() {
        /* 232 */return true;
    }

    public boolean shouldProPluginsRun() {
        return true;
    }

    public static String trimEncryptedLicense(String encrypted) {
        /* 257 */String newEncrypted = encrypted;
        /* 258 */newEncrypted = newEncrypted.trim();
        /* 259 */newEncrypted = newEncrypted.replaceAll(
                "--begin-aptana-license--", "");
        /* 260 */newEncrypted = newEncrypted.replaceAll(
                "--end-aptana-license--", "");
        /* 261 */newEncrypted = newEncrypted.replaceAll("\\s+", "");
        /* 262 */return newEncrypted;
    }

}

      把这个java文件编译成class文件,然后找到插件中的ClientKey.class和ClientKey$Decrypt.class文件 替换它。该文件存在于aptana_update_015414\plugins\com.aptana.ide.core_1.1.7.015414.jar中,用winrar打开com.aptana.ide.core_1.1.7.015414.jar文件,在路径com\aptana\ide\core\licensing中存在这两个文件,用我们刚刚编译好的class文件替换,破解成功。可能由于版本号不同的问题,core_1.1.7.015414后的版本名(数字)不同,但不影响破解,破解文件通用。

      我把编译好的class文件和jar文件都放在附件中了,大家可任意选择一个下载,放在指定路径即可。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值