in the evening stroll csdn found that someone in Java wrote the code to generate MyEclipse registration code, so it was copied down. O (∩_∩) o haha
package gggg; 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 for a-a-a-imprisonment . 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 (); CA L.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 ("the"). 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 = (* 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 >= K) && (J <=)) {j = ((j-48) + 5) + +} else if ( J >=) && (J <=)) {j = ((j-65)%) + (+) (+)} else if ((J >=) && (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 Regis ter 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) {}}}
Also let the friends who visit my space look at this code AH. Haha technology is still quite fun drop.
I hope that I will work well in the new year, less overtime, and I would like all the programmers to pay more than the salary and good health.