把下面代码在eclipse中运行,就能得到注册码
import java.io.bufferedreader;
import java.io.ioexception;
import java.io.inputstreamreader;
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, "5");
system.out.println("serial:" res);
reader.readline();
} catch (ioexception ex) {
}
}
}
photoshop|
|
svg|
webgl|
visual studio|
powerdesigner|
eclipse|
git|
apache ant|
|
|
codesmith|
flex|
gradle|
maven|
sublime text3|
svn|
|
|
chrome开发者工具|
opengl|
unity|
direct3d|
用户登录
还没有账号?立即注册
用户注册
投稿取消
文章分类: |
|
还能输入300字
上传中....