[转]JetBrains IntelliJ IDEA 13 Keygen (Java Source Code)

时间:2023-03-09 08:45:37
[转]JetBrains IntelliJ IDEA 13 Keygen (Java Source Code)

转载:http://www.rover12421.com/2013/12/09/jetbrains-intellij-idea-13-keygen-java-source-code.html

JetBrains IntelliJ IDEA 13 Keygen :

import java.math.BigInteger;
import java.util.Date;
import java.util.Random;
import java.util.zip.CRC32; public class Keygen
{
/**
* @param s
* @param i
* @param bytes
* @return
*/
public static short getCRC(String s, int i, byte bytes[])
{
CRC32 crc32 = new CRC32();
if (s != null)
{
for (int j = ; j < s.length(); j++)
{
char c = s.charAt(j);
crc32.update(c);
}
}
crc32.update(i);
crc32.update(i >> );
crc32.update(i >> );
crc32.update(i >> );
for (int k = ; k < bytes.length - ; k++)
{
byte byte0 = bytes[k];
crc32.update(byte0);
}
return (short) (int) crc32.getValue();
} /**
* @param biginteger
* @return String
*/
public static String encodeGroups(BigInteger biginteger)
{
BigInteger beginner1 = BigInteger.valueOf(0x39aa400L);
StringBuilder sb = new StringBuilder();
for (int i = ; biginteger.compareTo(BigInteger.ZERO) != ; i++)
{
int j = biginteger.mod(beginner1).intValue();
String s1 = encodeGroup(j);
if (i > )
{
sb.append("-");
}
sb.append(s1);
biginteger = biginteger.divide(beginner1);
}
return sb.toString();
} /**
* @param i
* @return
*/
public static String encodeGroup(int i)
{
StringBuilder sb = new StringBuilder();
for (int j = ; j < ; j++)
{
int k = i % ;
char c;
if (k < )
{
c = (char) ( + k);
}
else
{
c = (char) (( + k) - );
}
sb.append(c);
i /= ;
}
return sb.toString();
} /**
* @param name
* @param days
* @param id
* @param prtype
* @return
*/
public static String MakeKey(String name, int days, int id)
{
id %= ;
byte bkey[] = new byte[];
bkey[] = (byte) ; // Product type: IntelliJ IDEA is 1
bkey[] = ; // version
Date d = new Date();
long ld = (d.getTime() >> );
bkey[] = (byte) (ld & );
bkey[] = (byte) ((ld >> ) & );
bkey[] = (byte) ((ld >> ) & );
bkey[] = (byte) ((ld >> ) & );
days &= 0xffff;
bkey[] = (byte) (days & );
bkey[] = (byte) ((days >> ) & );
bkey[] = ;
bkey[] = -;
bkey[] = ;
bkey[] = ;
int w = getCRC(name, id % , bkey);
bkey[] = (byte) (w & );
bkey[] = (byte) ((w >> ) & );
BigInteger pow = new BigInteger("", );
BigInteger mod = new BigInteger("86f71688cdd2612ca117d1f54bdae029", );
BigInteger k0 = new BigInteger(bkey);
BigInteger k1 = k0.modPow(pow, mod);
String s0 = Integer.toString(id);
String sz = "";
while (s0.length() != )
{
s0 = sz.concat(s0);
}
s0 = s0.concat("-");
String s1 = encodeGroups(k1);
s0 = s0.concat(s1);
return s0;
} public static void main(String[] args)
{
if (args.length == )
{
System.err.printf("*** Usage: %s name%n", Keygen.class.getCanonicalName());
System.exit();
}
Random r = new Random();
System.out.println(MakeKey(args[], , r.nextInt()));
}
}

如果不想输入参数则修改main函数:

public static void main(String[] args)
{
Random r = new Random();
System.out.println(MakeKey(“xxx”, , r.nextInt()));
}