MyEclipse6.0神key

來源:互聯網
上載者:User

標籤:style   c   class   blog   code   java   

1.建立MyEclipseGen.java檔案

2.添加如下代碼內容到MyEclipseGen.java檔案

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

3.編譯並運行MyEclipseGen.java檔案。

4.在運行時的命令視窗中按提示輸入“name”值,自動產生對應的註冊碼。

 

聲明:以上內容來自網路……

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.