码迷,mamicode.com
首页 > 系统相关 > 详细

MyEclipse6.5注册

时间:2014-10-30 22:10:30      阅读:222      评论:0      收藏:0      [点我收藏+]

标签:http   io   os   ar   java   for   sp   on   cti   

貌似现在用MyEclipse6.5的人已经不多了,网上的大部分也都已过期,怀旧的人如果想快速得到一个MyElicpse6.5的注册码

Subscriber: dw008

Subscription Code:qLR8ZO-655444-62657456926512327

过期时间:20171029

 

对于注册码的生成,给出例子,先新建一个类MyeclipseGen

代码如下:

import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
/*
* 用于MyEclipse注册码的生成,其中id即为Subscriber,可随意更改,运行,在控制台会给出一个注册码,
* 对于无时间限制的,其实一般有效期为注册之日期的三年内。
* 对于有时间限制的,是通过调用getSerial函数的selected参数传入false来控制有效时间。
*/

public class MyeclipseGen {

public static final void main(String[] args) {
String id = "dw008"; // 可更给为您的名字
String num = "999";// 许可证数量
System.out.println(getSerial(id, "100", num, false));
}
public static String getSerial(String userId, String version,
String licenseNum, boolean selected) {
Calendar cal = Calendar.getInstance();
cal.add(1, 3);
cal.add(6, -1);
NumberFormat nf = new 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 verTime = selected ? (new StringBuffer("-")).append(
(new SimpleDateFormat("yyMMdd")).format(cal.getTime())).append(
"0").toString() : "-1512310";*/

String type = "YE3MB-";
String need = (new StringBuffer(String.valueOf(userId.substring(0, 1))))
.append(type).append(version).append(licenseNum)
.append(verTime).toString();
String dx = (new StringBuffer(String.valueOf(need)))
.append(
"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.")
.append(userId).toString();
int suf = decode(dx);
String code = (new StringBuffer(String.valueOf(need))).append(
String.valueOf(suf)).toString();
return change(code);
}
private static int decode(String s) {
int i = 0;
char ac[] = s.toCharArray();
int j = 0;
for (int k = ac.length; j < k; j++)
i = 31 * i + ac[j];
return Math.abs(i);
}
private static String change(String s) {
byte abyte0[] = s.getBytes();
char ac[] = new char[s.length()];
int i = 0;
for (int k = abyte0.length; i < k; i++) {
int 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;
}
return String.valueOf(ac);
}
}

 

MyEclipse6.5注册

标签:http   io   os   ar   java   for   sp   on   cti   

原文地址:http://www.cnblogs.com/stevengerrard/p/4063592.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!