MyEclipse8.5破解方法

Step:

1、建立一个任意名称的Java Project

2、在该工程中建立一个名文MyEclipseGen的Java文件(MyEclipseGen.java)

3、运行下面的代码,会在控制台出现” please input register name:”,输入任意一个名字,回车后生成序列号

4、点击 MyEclipse菜单中Window→Preferences→MyEclipse→Subscription ,在右侧点击“Enter Subscription”

5、在弹出框中Subscriber中输入第3步的名字,在Subscription Code中输入第3步生成的序列号

Code:

 1 package com.qcf.test;

 2 

 3 import java.io.BufferedReader;

 4 import java.io.IOException;

 5 import java.io.InputStreamReader;

 6 public class MyEclipseGen {

 7  

 8     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.";

 9  

10     public String getSerial(String userId, String licenseNum) {

11  

12     java.util.Calendar cal = java.util.Calendar.getInstance();

13 cal.add(1, 3);

14  cal.add(6, -1);

15  java.text.NumberFormat nf = new java.text.DecimalFormat("000");

16  licenseNum = nf.format(Integer.valueOf(licenseNum));

17  String verTime = new StringBuilder("-").append(

18  new java.text.SimpleDateFormat("yyMMdd").format(cal.getTime()))

19  .append("0").toString();

20  String type = "YE3MP-";

21 String need = new StringBuilder(userId.substring(0, 1)).append(type)

22  .append("300").append(licenseNum).append(verTime).toString();

23  String dx = new StringBuilder(need).append(LL).append(userId)

24  .toString();

25  int suf = this.decode(dx);

26  String code = new StringBuilder(need).append(String.valueOf(suf))

27  .toString();

28  return this.change(code);

29  }

30  private int decode(String s) {

31  int i;

32  char[] ac;

33  int j;

34  int k;

35  i = 0;

36  ac = s.toCharArray();

37  j = 0;

38  k = ac.length;

39  while (j < k) {

40  i = (31 * i) + ac[j];

41  j++;

42  }

43  return Math.abs(i);

44  }

45  private String change(String s) {

46  byte[] abyte0;

47  char[] ac;

48  int i;

49  int k;

50  int j;

51  abyte0 = s.getBytes();

52  ac = new char[s.length()];

53  i = 0;

54  k = abyte0.length;

55  while (i < k) {

56  j = abyte0[i];

57  if ((j >= 48) && (j <= 57)) {

58  j = (((j - 48) + 5) % 10) + 48;

59  } else if ((j >= 65) && (j <= 90)) {

60  j = (((j - 65) + 13) % 26) + 65;

61  } else if ((j >= 97) && (j <= 122)) {

62  j = (((j - 97) + 13) % 26) + 97;

63  }

64  ac[i] = (char) j;

65  i++;

66  }

67  return String.valueOf(ac);

68  }

69  public MyEclipseGen() {

70  super();

71  }

72  public static void main(String[] args) {

73  try {

74  System.out.println("please input register name:");

75 BufferedReader reader = new BufferedReader(new InputStreamReader(

76  System.in));

77  String userId = null;

78  userId = reader.readLine();

79  MyEclipseGen myeclipsegen = new MyEclipseGen();

80  String res = myeclipsegen.getSerial(userId, "5");

81 System.out.println("Serial:" + res);

82  reader.readLine();

83  } catch (IOException ex) {

84  }

85  }

86  }
View Code

 

你可能感兴趣的:(MyEclipse)