找MyEclipse 6.5注冊(cè)碼時(shí)發(fā)現(xiàn)了一個(gè)MyEclipse 6.5注冊(cè)機(jī)的源程序,不過是源代碼,而且是在源代碼中修改了自己想要的注冊(cè)名后,才能編譯,同時(shí)在控制臺(tái)下生成一個(gè)相應(yīng)的注冊(cè)碼,感覺十分不方便,于是修改了一下,加了個(gè)gui界面,
可以輸入一個(gè)自己想要的注冊(cè)名后生成相應(yīng)的注冊(cè)碼,方便可許多。不敢獨(dú)有,發(fā)出來共享一下。不過不知道算法是否正確,還沒測(cè)試,嘿嘿,留待各位驗(yàn)證了。
我用eclipse寫得,如果高手修改算法之類的話,導(dǎo)入jar包就可以了。
源代碼來源地址:http://hi.baidu.com/imake/blog/item/4364a51eb0af1d1a40341715
//Myeclipse Blue6 .5 破解程序
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
public class Crack {
public static final void main(String[] args){
String id="iMake";//這里填你想注冊(cè)的名字------必須在源代碼里輸入自己想要的名字,不太方便
String num="3";//這里填你想注冊(cè)的使用年限,最大為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 = selected ? (new StringBuffer("-")).append(
(new SimpleDateFormat("yyMMdd")).format(cal.getTime())).append(
"0").toString() : "-0812310";
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 - 4 + 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);
}
}
============================
MyEclipse 6.5 注冊(cè)機(jī)早已經(jīng)出來了,有很多網(wǎng)友在找MyEclipse 6.5 注冊(cè)機(jī)的,我也找到了一些,但都是些控制臺(tái)輸入輸出的源代碼,本人想了想,做了一個(gè)MyEclipseGen 6.5 注冊(cè)機(jī)界面版的,下面是源碼提供給到家,只要將它復(fù)制過去打成jar包,可單擊運(yùn)行!
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JTextField;
public class MyEclipseGen extends JFrame implements ActionListener{
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 JLabel title,lkey,lvlues;
public JTextField keys,vlues;
public JButton enter,exit;
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("MyEclipseGen 6.5 注冊(cè)機(jī)");
this.setLayout(null);
title=new JLabel("MyEclipseGen 6.5 注冊(cè)機(jī)");//title 為MyEclipseGen 6.5 注冊(cè)機(jī)
title.setBounds(120, 20, 150, 30);
lkey=new JLabel("Key :");
lkey.setBounds(30,80, 50,30);
keys=new JTextField();
keys.setBounds(80, 80, 260, 30);
lvlues=new JLabel("Value :");
lvlues.setBounds(30, 130, 50, 30);
vlues=new JTextField();
vlues.setBounds(80, 130, 260, 30);
enter=new JButton(" 確 定 ");
enter.addActionListener(this);
exit=new JButton(" 退 出 ");
exit.addActionListener(this);
enter.setBounds(80, 180, 80, 30);
exit.setBounds(230, 180, 80, 30);
this.setDefaultCloseOperation(EXIT_ON_CLOSE);//關(guān)閉窗口
this.setResizable(false);//最大化
this.setLocationRelativeTo(null);//居中
this.add(title);
this.add(lkey);
this.add(keys);
this.add(lvlues);
this.add(vlues);
this.add(enter);
this.add(exit);
this.setSize(400, 300);
this.setVisible(true);
}
public static void main(String[] args) {
new MyEclipseGen();
}
@Override
public void actionPerformed(ActionEvent e) {
if (e.getSource()==enter) {
if(keys.getText()==null){
System.out.println("0--");
JOptionPane.showMessageDialog(null, "信息不能為空");
}else{
String res =this.getSerial(keys.getText(), "5");
vlues.setText(res);
}
}
if (e.getSource()==exit) {
int chose=JOptionPane.showConfirmDialog(null,"你真的要退出嗎","系統(tǒng)警告", JOptionPane.ERROR_MESSAGE);//兩個(gè)按鈕一個(gè)確定,一個(gè)取消
if(chose==JOptionPane.YES_OPTION){
System.exit(1);
}
}
}
}
聯(lián)系客服