Myeclipse6.5 Automatic Generation of serial number registration machine source code

Source: Internet
Author: User
Tags dmca

Import java. Text. decimalformat;
Import java. Text. numberformat;
Import java. Text. simpledateformat;
Import java. util. calendar;

Public class myeclipsecrack {
//
Public static final void main (string [] ARGs ){
String id = "javasunny"; // note that the ID here can be replaced with any combination of letters, for example, pinyin.
String num= "999 ";
System. Out. println ("subscriber:" + id );
System. Out. println ("subpartition Code :"
+ 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 (): "-0912310 ";
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 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-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;
}
Return string. valueof (AC );
}

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 );
}

}

 

----------------

OK. Run this Java class to generate the serial number.
NOTE: If it is easy to use, please leave your footprints. Thank you.

Reprinted please indicate Source Address: http://blog.csdn.net/zhangbo936/archive/2010/10/13/5939289.aspx

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.