myeclipse6.0.1注册源码(转自:http://blog.csdn.net/brucemiao/archive/2007/10/26/1844446.aspx)
2009-09-28 09:25
323 查看
事件起因:
由于myeclipse到期时间为2009年10月份左右.而原始框架中已经装了许多的插件,原以只能使用破解的方法实现变动最小.
以下代码可以获得破解的值:
package myeclipsegen;
import java.io.*;
public class MyEclipseGen {
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.";
public String getSerial(String userId, String licenseNum) {
java.util.Calendar cal = java.util.Calendar.getInstance();
cal.add(1, 3);
cal.add(6, -1);
java.text.NumberFormat nf = new java.text.DecimalFormat("000");
licenseNum = nf.format(Integer.valueOf(licenseNum));
String verTime = new StringBuilder("-").append(new java.text.
SimpleDateFormat("yyMMdd").format(cal.getTime())).append("0").
toString();
String type = "YE3MP-";
String need = new StringBuilder(userId.substring(0, 1)).append(type).
append("300").append(licenseNum).append(verTime).toString();
String dx = new StringBuilder(need).append(LL).append(userId).toString();
int suf = this.decode(dx);
String code = new StringBuilder(need).append(String.valueOf(suf)).
toString();
return this.change(code);
}
private int decode(String s) {
int i;
char[] ac;
int j;
int k;
i = 0;
ac = s.toCharArray();
j = 0;
k = ac.length;
while (j < k) {
i = (31 * i) + ac[j];
j++;
}
return Math.abs(i);
}
private String change(String s) {
byte[] abyte0;
char[] ac;
int i;
int k;
int j;
abyte0 = s.getBytes();
ac = new char[s.length()];
i = 0;
k = abyte0.length;
while (i < k){
j = abyte0[i];
if ((j >= 48) && (j <= 57)){
j = (((j - 48) + 5) % 10) + 48;
} else if ((j >= 65) && (j <= 90)) {
j = (((j - 65) + 13) % 26) + 65;
} else if ((j >= 97) && (j <= 122)) {
j = (((j - 97) + 13) % 26) + 97;
}
ac[i] = (char) j;
i++;
}
return String.valueOf(ac);
}
public MyEclipseGen(){
super();
}
public static void main(String[] args){
try{
System.out.println("please input register name:");
BufferedReader reader = new BufferedReader(new InputStreamReader(
System.in));
String userId = null;
userId = reader.readLine();
MyEclipseGen myeclipsegen = new MyEclipseGen();
String res = myeclipsegen.getSerial(userId, "20");
System.out.println("Serial:" + res);
reader.readLine();
} catch (IOException ex) {
}
}
}
由于myeclipse到期时间为2009年10月份左右.而原始框架中已经装了许多的插件,原以只能使用破解的方法实现变动最小.
以下代码可以获得破解的值:
package myeclipsegen;
import java.io.*;
public class MyEclipseGen {
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.";
public String getSerial(String userId, String licenseNum) {
java.util.Calendar cal = java.util.Calendar.getInstance();
cal.add(1, 3);
cal.add(6, -1);
java.text.NumberFormat nf = new java.text.DecimalFormat("000");
licenseNum = nf.format(Integer.valueOf(licenseNum));
String verTime = new StringBuilder("-").append(new java.text.
SimpleDateFormat("yyMMdd").format(cal.getTime())).append("0").
toString();
String type = "YE3MP-";
String need = new StringBuilder(userId.substring(0, 1)).append(type).
append("300").append(licenseNum).append(verTime).toString();
String dx = new StringBuilder(need).append(LL).append(userId).toString();
int suf = this.decode(dx);
String code = new StringBuilder(need).append(String.valueOf(suf)).
toString();
return this.change(code);
}
private int decode(String s) {
int i;
char[] ac;
int j;
int k;
i = 0;
ac = s.toCharArray();
j = 0;
k = ac.length;
while (j < k) {
i = (31 * i) + ac[j];
j++;
}
return Math.abs(i);
}
private String change(String s) {
byte[] abyte0;
char[] ac;
int i;
int k;
int j;
abyte0 = s.getBytes();
ac = new char[s.length()];
i = 0;
k = abyte0.length;
while (i < k){
j = abyte0[i];
if ((j >= 48) && (j <= 57)){
j = (((j - 48) + 5) % 10) + 48;
} else if ((j >= 65) && (j <= 90)) {
j = (((j - 65) + 13) % 26) + 65;
} else if ((j >= 97) && (j <= 122)) {
j = (((j - 97) + 13) % 26) + 97;
}
ac[i] = (char) j;
i++;
}
return String.valueOf(ac);
}
public MyEclipseGen(){
super();
}
public static void main(String[] args){
try{
System.out.println("please input register name:");
BufferedReader reader = new BufferedReader(new InputStreamReader(
System.in));
String userId = null;
userId = reader.readLine();
MyEclipseGen myeclipsegen = new MyEclipseGen();
String res = myeclipsegen.getSerial(userId, "20");
System.out.println("Serial:" + res);
reader.readLine();
} catch (IOException ex) {
}
}
}
相关文章推荐
- JFreeChart画雷达图、带刻度雷达图、蜘蛛网、带刻度蜘蛛网(转自:http://blog.csdn.net/guoquanyou/archive/2008/12/10/3488313.aspx)
- 用开源组件jcaptcha做jsp彩色验证码 ( 转http://blog.csdn.net/alexjjf/archive/2006/10/31/1359333.aspx)
- Android应用程序使用Google Map (转http://blog.csdn.net/iefreer/archive/2009/09/20/4572879.aspx)
- 摘自CSDNhttp://blog.csdn.net/gnuhpc/archive/2009/11/13/4808405.aspx
- [转] 一个分组查询的SQL 常用算法(附源码可直接执行) [来自--http://blog.csdn.net/rainbowsoftware/archive/2007/04/26/1585355.aspx]
- SQL Server临时表(转) (转自:http://blog.csdn.net/zh520/archive/2009/04/17/4087943.aspx)
- ASP.net输出JS脚步的类(无AJAX框架)(原作者发布地址http://blog.csdn.net/zhoufoxcn/archive/2008/04/21/2312440.aspx)
- Windows消息机制http://blog.csdn.net/weixu_2008/archive/2007/09/15/1785939.aspx
- c/c++编译器的内存分配模式 zz: http://blog.csdn.net/gukesdo/archive/2011/06/16/6548256.aspx
- http://blog.csdn.net/ol_beta/archive/2010/10/27/5968817.aspx
- window.event(转自:http://blog.csdn.net/cnkiminzhuhu/archive/2008/02/22/2112408.aspx)
- 面试题集锦(转自:http://blog.csdn.net/zhoufoxcn/archive/2006/09/26/1287159.aspx)
- IE和Firefox中Javascript和CSS的区别(轉:http://blog.csdn.net/superbeck/archive/2008/10/16/3082550.aspx)
- http://blog.csdn.net/CYRTSOFT/archive/2004/12.aspx
- sql里的exists与in、not exists与not in的区别(转:http://blog.csdn.net/jkptthui/archive/2009/12/17/5024779.aspx)
- ASP.net输出JS脚步的类(无AJAX框架)(原作者发布地址http://blog.csdn.net/zhoufoxcn/archive/2008/04/21/2312440.aspx)
- 使用CSS3构建Ajax加载动画(转http://blog.csdn.net/hfahe/archive/2011/02/10/6177825.aspx)
- 事务管理最佳实践全面解析(转)http://blog.csdn.net/shendl/archive/2006/11/27/1415958.aspx
- auto_ptr作用和用法(转:http://blog.csdn.net/danforn/archive/2008/06/30/2598413.aspx)
- http://blog.csdn.net/KBUG/archive/2006/10/30/1357009.aspx