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

生成MyEclipse6.5&7.5&8.5 注册机源码

时间:2014-12-19 07:02:00      阅读:284      评论:0      收藏:0      [点我收藏+]

标签:blog   http   ar   io   os   sp   for   java   strong   

 

 

分类: java技术

生成MyEclipse8.5注册码的java源码 生成MyEclipse8.5注册码的java源码 MyEclipseKeyGen MyEclipse8.5注册机 MyEclipse8.5注册码生成 MyEclipse8.5注册机源码

  1. import java.io.BufferedReader;  
  2. import java.io.IOException;  
  3. import java.io.InputStreamReader;  
  4.   
  5. public class MyEclipseKeyGen {  
  6.     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.";  
  7.   
  8.     public String getSerial(String userId, String licenseNum) {  
  9.         java.util.Calendar cal = java.util.Calendar.getInstance();  
  10.         cal.add(1, 3);  
  11.         cal.add(6, -1);  
  12.         java.text.NumberFormat nf = new java.text.DecimalFormat("000");  
  13.         licenseNum = nf.format(Integer.valueOf(licenseNum));  
  14.         String verTime = new StringBuilder("-").append(  
  15.                 new java.text.SimpleDateFormat("yyMMdd").format(cal.getTime()))  
  16.                 .append("0").toString();  
  17.         String type = "YE3MP-";  
  18.         String need = new StringBuilder(userId.substring(0, 1)).append(type)  
  19.                 .append("300").append(licenseNum).append(verTime).toString();  
  20.         String dx = new StringBuilder(need).append(LL).append(userId)  
  21.                 .toString();  
  22.         int suf = this.decode(dx);  
  23.         String code = new StringBuilder(need).append(String.valueOf(suf))  
  24.                 .toString();  
  25.         return this.change(code);  
  26.     }  
  27.   
  28.     private int decode(String s) {  
  29.         int i;  
  30.         char[] ac;  
  31.         int j;  
  32.         int k;  
  33.         i = 0;  
  34.         ac = s.toCharArray();  
  35.         j = 0;  
  36.         k = ac.length;  
  37.         while (j < k) {  
  38.             i = (31 * i) + ac[j];  
  39.             j++;  
  40.         }  
  41.         return Math.abs(i);  
  42.     }  
  43.   
  44.     private String change(String s) {  
  45.         byte[] abyte0;  
  46.         char[] ac;  
  47.         int i;  
  48.         int k;  
  49.         int j;  
  50.         abyte0 = s.getBytes();  
  51.         ac = new char[s.length()];  
  52.         i = 0;  
  53.         k = abyte0.length;  
  54.         while (i < k) {  
  55.             j = abyte0[i];  
  56.             if ((j >= 48) && (j <= 57)) {  
  57.                 j = (((j - 48) + 5) % 10) + 48;  
  58.             } else if ((j >= 65) && (j <= 90)) {  
  59.                 j = (((j - 65) + 13) % 26) + 65;  
  60.             } else if ((j >= 97) && (j <= 122)) {  
  61.                 j = (((j - 97) + 13) % 26) + 97;  
  62.             }  
  63.             ac[i] = (char) j;  
  64.             i++;  
  65.         }  
  66.         return String.valueOf(ac);  
  67.     }  
  68.   
  69.     public MyEclipseKeyGen() {  
  70.         super();  
  71.     }  
  72.   
  73.     public static void main(String[] args) {  
  74.         try {  
  75.             System.out.println("please input register name:");  
  76.             BufferedReader reader = new BufferedReader(new InputStreamReader(  
  77.                     System.in));  
  78.             String userId = null;  
  79.             userId = reader.readLine();  
  80.             MyEclipseKeyGen myeclipsekeygen = new MyEclipseKeyGen();  
  81.             String res = myeclipsekeygen.getSerial(userId, "5");  
  82.             System.out.println("Serial:" + res);  
  83.             reader.readLine();  
  84.         } catch (IOException ex) {  
  85.         }  
  86.     }  
  87. }  

 

 

生成MyEclipse6.5&7.5&8.5 注册机源码

标签:blog   http   ar   io   os   sp   for   java   strong   

原文地址:http://www.cnblogs.com/u0mo5/p/4173060.html

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