myeclipse6.0注册码

来源:互联网 发布:mac贴膜会影响散热吗 编辑:程序博客网 时间:2024/05/18 01:56

原文出处不可考:转载地址:http://blog.csdn.net/yxl2005play/article/details/4592300

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

 

运行该代码,在控制台中会出现: 

please input register name: 
×××××(你的name) 

即生成序列号: 

please input register name: 
yan2009
Serial:lLR8ZC-855575-6754795661317731


原创粉丝点击
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 银行账户被锁定怎么办 淘宝卖家说退货不全怎么办 买家旺旺被限制怎么办 淘宝支付不了了怎么办 手机图标变黑了怎么办 商品没有支付宝怎么办 金立s8热点打不开怎么办 淘宝店铺异常2怎么办 付款付错了怎么办 手机淘宝太卡怎么办 卖家不同意退货怎么办 游戏退出无响应怎么办 手机淘宝购物车打不开怎么办 淘宝店铺没有访客怎么办 淘宝店铺0流量怎么办 微信经常封号怎么办 网上拍卖堂违约怎么办 dnf4开组队制裁怎么办 红酒木塞丢了怎么办 红酒塞子进去了怎么办 淘金币即将过期怎么办 淘金币过期怎么办2018 换详情排名下降怎么办 长城宽带不用了怎么办 快递到了想退货怎么办 淘宝退货商家拒收怎么办 淘宝运费险失败怎么办 忘记购买运费险怎么办 咸鱼买家申请退款怎么办 熟猪肉有点变味怎么办 和领导意见不一致怎么办 骑手提前点送达怎么办 ubuntu安装报错怎么办 液相色谱两峰分不开怎么办 液相色谱柱老堵怎么办? 没有装usb驱动怎么办 ipad速度越来越慢怎么办 美萍管理软件打不开怎么办 小米4开机黑屏怎么办 小米电脑死机了怎么办 小米8手机死机怎么办