JetBrains KegGen

转载自:http://www.rover12421.com/2014/11/18/jetbrains-keggen.html

公布Idea 14 的Keygen之后,看到有同学回复需要JetBrains其它产品的Keygen.
很多同学对比Idea 13,14的keygen代码,可能会猜测JetBrains的其他产品只需换掉其中的关键点就行了.其实不然.
除了Idea的key是没有经过RAS加密之外,其他产品的key都是经过RSA加密的.
这里再次公布下JetBrains的其他产品keygen算法.

已经测试支持:

  • PyCharm 3.4.1
  • PhpStorm 8.0.1
  • RubyMine 7.0
  • WebStorm 9.0.1

理论上至少还支持同系列上一个版本,和小版本.
AppCode 没有测试(谁来送我一个Mac吧…^)


有图有真相: "PyCharmKey""PhpStormKey""RubyMineKey""WebStormKey"


看完真相,拿果子…

有实力的同学还是请支持正版!!!

Please support genuine.


RSAEncoder

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
package com.rover12421.crack.jerbrains;

import java.math.BigInteger;

public class RSAEncoder
{
    private final BigInteger privKey;
    private final BigInteger pubKey;
    private final int c;
    private final int d;
    private int e = 0;
    private final BigInteger f;
    private final boolean g;

    public RSAEncoder(BigInteger privKey, BigInteger pubKey, int len, boolean newLine) {
        this.privKey = privKey;
        this.pubKey = pubKey;
        this.g = newLine;
        int privKeyLen = privKey.bitLength();
        this.f = new BigInteger(String.valueOf(len));
        int i = (int) Math.ceil(privKeyLen / Math.log(len) * Math.log(2.0D));
        if (i % 5 != 0) {
            i = (i / 5 + 1) * 5;
        }
        this.d = i;
        this.c = (privKeyLen / 8 - 1);
    }

    public String encode(byte[] bytes) {
        int i = bytes.length % this.c;
        byte[] arrayOfByte = new byte[i == 0 ? bytes.length : bytes.length + this.c - i];
        System.arraycopy(bytes, 0, arrayOfByte, this.c - i, bytes.length);

        StringBuffer stringBuffer = new StringBuffer();
        for (int j = 0; j < arrayOfByte.length; j += this.c) {
            encode(arrayOfByte, stringBuffer, j, this.c);
        }
        return stringBuffer.toString();
    }

    private void encode(byte[] bytes, StringBuffer stringBuffer, int off, int len) {
        if (len == 0) {
            return;
        }
        byte[] arrayOfByte = new byte[this.c];
        System.arraycopy(bytes, off, arrayOfByte, 0, len);
        BigInteger localBigInteger1 = new BigInteger(1, arrayOfByte);
        if (localBigInteger1.compareTo(this.pubKey) >= 0) {
            throw new IllegalArgumentException("result is too long");
        }
        BigInteger localBigInteger2 = localBigInteger1.modPow(this.privKey, this.pubKey);
        stringBuffer.append(a(a(localBigInteger2)));
    }

    private String a(String paramString) {
        StringBuffer localStringBuffer = new StringBuffer();
        for (int i = 0; i < paramString.length(); i++) {
            a(localStringBuffer);
            localStringBuffer.append(paramString.charAt(i));
        }
        return localStringBuffer.toString();
    }

    private String a(BigInteger paramBigInteger) {
        StringBuffer localStringBuffer = new StringBuffer();
        for (int i = 0; i < this.d; i++) {
            localStringBuffer.insert(0, b(paramBigInteger.mod(this.f)));
            paramBigInteger = paramBigInteger.divide(this.f);
        }
        return localStringBuffer.toString();
    }

    private void a(StringBuffer paramStringBuffer) {
        if ((this.e > 0) && (this.e % 5 == 0)) {
            if (this.e % 30 == 0)
                paramStringBuffer.append('\n');
            else if (this.g) {
                paramStringBuffer.append('-');
            }
        }
        this.e += 1;
    }

    private static char b(BigInteger paramBigInteger) {
        int i = paramBigInteger.intValue();
        char c1;
        if (i < 10) {
            c1 = (char)(48 + i);
        }
        else
        {
            if (i < 36) {
                c1 = (char)(65 + i - 10);
            }
            else
            {
                if (i < 62)
                    c1 = (char)(97 + i - 36);
                else {
                    c1 = (char)(33 + i - 62);
                }
            }
        }
        return c1;
    }
}

GenericKeyMaker.java

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
package com.rover12421.crack.jerbrains;

import java.math.BigInteger;
import java.util.Random;
import java.util.zip.CRC32;

/**
 * Created by rover12421 on 11/18/14.
 */
public class GenericKeyMaker {

    public static final int LICENSETYPE_COMMERCIAL = 0;
    public static final int LICENSETYPE_NON_COMMERCIAL = 1;
    public static final int LICENSETYPE_SITE = 2;
    public static final int LICENSETYPE_OPENSOURCE = 3;
    public static final int LICENSETYPE_PERSONAL = 4;
    public static final int LICENSETYPE_YEARACADEMIC = 5;

    public static final int PRODUCTID_RubyMine = 4;
    public static final int PRODUCTID_PyCharm = 5;
    public static final int PRODUCTID_WebStorm = 6;
    public static final int PRODUCTID_PhpStorm = 7;
    public static final int PRODUCTID_AppCode = 8;

    private Random random = new Random();

    private String getLicenseId() {
        return String.format("D%sT", Integer.toString(random.nextInt(90000) + 10000));
    }

    private short getCRC(String s, int i, byte bytes[])
    {
        CRC32 crc32 = new CRC32();
        if (s != null)
        {
            for (int j = 0; j < s.length(); j++)
            {
                char c = s.charAt(j);
                crc32.update(c);
            }
        }
        crc32.update(i);
        crc32.update(i >> 8);
        crc32.update(i >> 16);
        crc32.update(i >> 24);
        for (int k = 0; k < bytes.length - 2; k++)
        {
            byte byte0 = bytes[k];
            crc32.update(byte0);
        }
        return (short) (int) crc32.getValue();
    }

    private byte[] generateKeyBytes(int licenseType, int productId,
                                    int minorVersion, int majorVersion,
                                    String userName, int customerId) {
        byte[] keyBytes = new byte[14];
        keyBytes[0] = (byte)((licenseType << 4) + (productId & 0xFF));
        keyBytes[1] = (byte)((minorVersion << 4) + (majorVersion & 0xFF));
        long time = System.currentTimeMillis() >> 16;
        keyBytes[2] = (byte)(int)(time & 0xFF);
        keyBytes[3] = (byte)(int)(time >> 8 & 0xFF);
        keyBytes[4] = (byte)(int)(time >> 16 & 0xFF);
        keyBytes[5] = (byte)(int)(time >> 24 & 0xFF);
        long timeDiff = 99*365;

        timeDiff &= 65535L;
        keyBytes[6] = (byte)(int)(timeDiff & 0xFF);
        keyBytes[7] = (byte)(int)(timeDiff >> 8 & 0xFF);
        keyBytes[8] = 0;
        keyBytes[9] = 1;
        keyBytes[10] = 2;
        keyBytes[11] = 3;
        keyBytes[12] = 4;
        keyBytes[13] = 5;

        int crc32 = getCRC(userName, customerId, keyBytes);
        keyBytes[12] = (byte)(crc32 & 0xFF);
        keyBytes[13] = (byte)(crc32 >> 8 & 0xFF);

        return keyBytes;
    }

    public String generateKey(BigInteger privKey, BigInteger pubKey,
                                     int licenseType, int productId,
                                     int minorVersion, int majorVersion,
                                     String userName) {

        int customerId = random.nextInt(9000) + 1000;
        byte[] keyBytes = generateKeyBytes(licenseType, productId, minorVersion, majorVersion, userName, customerId);

        RSAEncoder encoder = new RSAEncoder(privKey, pubKey, 64, false);
        String serial = encoder.encode(keyBytes);

        serial = "===== LICENSE BEGIN =====\n" + customerId + "-" + getLicenseId() + "\n" + serial + "\n===== LICENSE END =====";
        return serial;
    }

    public String genericPyCharmKey(int minorVersion, int majorVersion, String userName) {
        BigInteger pubKey = new BigInteger("D57B0596A03949D9A3BB0CD1F7931E405AE27D0E0AF4E562072B487B0DAB7F0874AA982E5383E75FF13D36CA9D8531AC1FA2ED7B11C8858E821C2D5FB48002DD", 16);
        BigInteger privKey = new BigInteger("406047D02363033D295DB7C0FD8A94DDCD4A6D71B5A622220C8D65DF0DC1409E0BDE26AF66B0AD717406C22FC8BEC3ED88C1B7091BA3443B6BFBA26120DE6A15", 16);

        return generateKey(privKey, pubKey, LICENSETYPE_NON_COMMERCIAL, PRODUCTID_PyCharm, minorVersion, majorVersion, userName);
    }

    public String genericAppCodeKey(int minorVersion, int majorVersion, String userName) {
        BigInteger pubKey = new BigInteger("F0DD6995C4BD3223641C79C8608D74F32ED54A8BDAE468EB5AC53F1F1C8925E263F82317356BC73B1C82B520630250212416C99CB39A8B7C2611E35552E166B9", 16);
        BigInteger privKey = new BigInteger("81B5EAEF61A4B584839C26253781D63243CD4F38E3A74FAD3713B3FB7025978538F10E743456F24BB20D5792BFDCB76DB6162C3D5C77DB7B29906CBFC9114EA5", 16);

        return generateKey(privKey, pubKey, LICENSETYPE_NON_COMMERCIAL, PRODUCTID_AppCode, minorVersion, majorVersion, userName);
    }

    public String genericPhpStormKey(int minorVersion, int majorVersion, String userName) {
        BigInteger pubKey = new BigInteger("BB62FBB57F105CD61B47AE2290FCB3CE1179942DE171BEDDF6BAA1A521B9368B735C7C931902EBA8DE6D160711A6ECC40F4A5E766E9FCDEE8A38715DB572AD3D", 16);
        BigInteger privKey = new BigInteger("7BFADCB153F59E86E69BC1820B4DB72573786E6B00CB824E57AD59BFE915231972746F47C6FBE0D8D88809DA313C1E4BEAD305AD8AFD31AE116ABCB181FF4F21", 16);

        return generateKey(privKey, pubKey, LICENSETYPE_NON_COMMERCIAL, PRODUCTID_PhpStorm, minorVersion, majorVersion, userName);
    }

    public String genericRubyMineKey(int minorVersion, int majorVersion, String userName) {
        BigInteger pubKey = new BigInteger("BB62FBB57F105CD61B47AE2290FCB3CE1179942DE171BEDDF6BAA1A521B9368B735C7C931902EBA8DE6D160711A6ECC40F4A5E766E9FCDEE8A38715DB572AD3D", 16);
        BigInteger privKey = new BigInteger("7BFADCB153F59E86E69BC1820B4DB72573786E6B00CB824E57AD59BFE915231972746F47C6FBE0D8D88809DA313C1E4BEAD305AD8AFD31AE116ABCB181FF4F21", 16);

        return generateKey(privKey, pubKey, LICENSETYPE_NON_COMMERCIAL, PRODUCTID_RubyMine, minorVersion, majorVersion, userName);
    }

    public String genericWebStormKey(int minorVersion, int majorVersion, String userName) {
        BigInteger pubKey = new BigInteger("BB62FBB57F105CD61B47AE2290FCB3CE1179942DE171BEDDF6BAA1A521B9368B735C7C931902EBA8DE6D160711A6ECC40F4A5E766E9FCDEE8A38715DB572AD3D", 16);
        BigInteger privKey = new BigInteger("7BFADCB153F59E86E69BC1820B4DB72573786E6B00CB824E57AD59BFE915231972746F47C6FBE0D8D88809DA313C1E4BEAD305AD8AFD31AE116ABCB181FF4F21", 16);

        return generateKey(privKey, pubKey, LICENSETYPE_NON_COMMERCIAL, PRODUCTID_WebStorm, minorVersion, majorVersion, userName);
    }

    public static void main(String[] args) {
        GenericKeyMaker keyMaker = new GenericKeyMaker();
//        System.out.println(keyMaker.genericPyCharmKey(1, 13, "Rover12421"));
//        System.out.println(keyMaker.genericPhpStormKey(1, 13, "Rover12421"));
//        System.out.println(keyMaker.genericRubyMineKey(1, 13, "Rover12421"));
        System.out.println(keyMaker.genericWebStormKey(1, 13, "Rover12421"));
    }
}

Update : http://www.rover12421.com/2015/04/07/jetbrains-product-patch-or-keygen.html


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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值