Myeclipse注册码(转)

本文仅供学习交流使用。

Subscriber:chiefleo
Subscription Code:pLR8ZC-855444-6850525653008304

Subscriber:scott
Subscription Code:fLR8ZC-855444-6850525396179836

 

1public class MyEclipseKeyGen {
2    private static final String LL = "Decompiling this copyrighted software is a violation of both your license agreement and the Digital Millenium Copyright Act of 1998 (http://www.loc.gov/copyright/legislation/dmca.pdf). Under section 1204 of the DMCA, penalties range up to a $500,000 fine or up to five years imprisonment for a first offense. Think about it; pay for a license, avoid prosecution, and feel better about yourself.";
3 
4    public String getSerial(String userId, String licenseNum) {
5        java.util.Calendar cal = java.util.Calendar.getInstance();
6        cal.add(1, 3);
7        cal.add(6, -1);
8        java.text.NumberFormat nf = new java.text.DecimalFormat("000");
9        licenseNum = nf.format(Integer.valueOf(licenseNum));
10        String verTime = new StringBuilder("-")
11            .append(new java.text.SimpleDateFormat("yyMMdd").format(cal.getTime())).append("0")
12            .toString();
13        String type = "YE3MP-";
14        String need = new StringBuilder(userId.substring(0, 1)).append(type).append("300")
15            .append(licenseNum).append(verTime).toString();
16        String dx = new StringBuilder(need).append(LL).append(userId).toString();
17        int suf = this.decode(dx);
18        String code = new StringBuilder(need).append(String.valueOf(suf)).toString();
19        return this.change(code);
20    }
21 
22    private int decode(String s) {
23        int i;
24        char[] ac;
25        int j;
26        int k;
27        i = 0;
28        ac = s.toCharArray();
29        j = 0;
30        k = ac.length;
31        while (j < k) {
32            i = (31 * i) + ac[j];
33            j++;
34        }
35        return Math.abs(i);
36    }
37 
38    private String change(String s) {
39        byte[] abyte0;
40        char[] ac;
41        int i;
42        int k;
43        int j;
44        abyte0 = s.getBytes();
45        ac = new char[s.length()];
46        i = 0;
47        k = abyte0.length;
48        while (i < k) {
49            j = abyte0[i];
50            if ((j > 48) && (j <= 57)) {
51                j = (((j - 48) + 5) % 10) + 48;
52            } else if ((j >= 65) && (j <= 90)) {
53                j = (((j - 65) + 13) % 26) + 65;
54            } else if ((j >= 97) && (j <= 122)) {
55                j = (((j - 97) + 13) % 26) + 97;
56            }
57            ac[i] = (char) j;
58            i++;
59        }
60        return String.valueOf(ac);
61    }
62 
63    public MyEclipseKeyGen() {
64        super();
65    }
66 
67    public static void main(String[] args) {
68        String userId = "scott";//用户名
69        int licenses = 999;
70        String subscriptionCode = new MyEclipseKeyGen().getSerial(userId, String.valueOf(licenses));
71        System.out.println("Subscriber:" + userId + "\nSubscription Code:" + subscriptionCode);
72    }
73}

原文链接:http://user.ccw.com.cn/ucHome/space.php?uid=1016&do=thread&id=859

http://xzh.i3geek.com