EditPlus registration code generator (js Code Implementation)

Source: Internet
Author: User

Today, my colleague was surprised to tell me that I had found an online EditPlus registration code generator and I had to check it out.
There are too many viruses on the exe registration machine, so the pure js online registration machine can be assured.

I found out the algorithm from the disassembly of another Registrar. what's even more surprising is that Demon, the author, had just obtained a legal professional qualification certificate and admired it.

The main js function is as follows:Copy codeThe Code is as follows: function generate_editplus_regcode (username ){
Var list = [0, 49345, 49537,320,499 rows, numbers, 1728,1920, numbers, 3264,3456, numbers, 53185, 52865, 3648,2560, 52.165, 52097, numbers, numbers, 6336,6528, numbers, 56257,55937, 6720,7680, large, small, medium, 56385, 5120, large, 5440,55041, 6080,5760, large, 4800,4992, large, large, 4160,61441, large, small, medium, small, listen, listen, 64705, 64897, listen, 16320,16000, listen 89,64001, 15040,15133, weight, 10560,60161, 11200,000080, weight, expires, 8640,8320, expires, 41921,41601, 25152,26112, expires 89,42881, expires 32,42241, expires, 28608, 28288, expires, expires, expires, expires, 47297,47489, expires, 48961,32000, expires, expires, 29888-30080, expires, 29504,13, 29120,28800, 45121,20133, expires, 20800,37633, clerk, clerk, clerk, 19904,19584, 35905,17408, 33985,34177, 17728,34561, 182.16,18048, 342.16,33281, 17088,17280, 33601,16640, 33217,32897, 16448];
Var hexchars = ['0', '1', '2', '3', '4', '5', '6', '7', '8 ', '9', 'A', 'B', 'C', 'D', 'E', 'F'];
Var regcode = new Array (29 );
Var I = 0, j = 0, k = 0;
Var len, temp, sum, result;
Username = usernamereplace (/^ \ s + | \ s + $/g ,"");
For (I = 0; I <5; I ++, k ++)
{
For (j = 0; j <5; j ++, k ++)
{
Regcode [k] = hexchars [parseInt (Mathrandom () * 16)];
}
If (k = 29) break;
Regcode [k] = '-';
}
Len = usernamelength;
Sum = 1;
For (I = 0; I <len; I ++ ){
Sum + = usernamecharCodeAt (I );
}
Temp = (parseInt (sum + 23)/6) + 3) * 7% 16;
Regcode [6] = hexchars [temp & 0xF];
Sum = 1;
For (I = 0; I <len; I ++ ){
Sum + = usernamecharCodeAt (I );
}
Temp = parseInt (3 * sum + 39)/8) % 16;
Regcode [9] = hexchars [temp & 0xF];
Sum = 1;
For (I = 0; I <len; I ++ ){
Sum + = usernamecharCodeAt (I );
}
Temp = parseInt (3 * sum + 19)/9) % 16;
Regcode [7] = hexchars [temp & 0xF];
Sum = 1;
For (I = 0; I <len; I ++ ){
Sum + = usernamecharCodeAt (I );
}
Temp = parseInt (sum + 10)/3) * 8% 16;
Regcode [10] = hexchars [temp & 0xF];
Sum = 1;
For (I = 0; I <len; I ++ ){
Sum + = usernamecharCodeAt (I );
}
Temp = (parseInt (9 * sum + 10)/3) + 36) % 16;
Regcode [4] = hexchars [temp & 0xF];
Sum = 1;
For (I = 0; I <len; I ++ ){
Sum + = usernamecharCodeAt (I );
}
Temp = parseInt (5 * sum + 11)/5) % 16;
Regcode [8] = hexchars [temp & 0xF];
Result = 0;
For (I = 0; I <len; I ++ ){
Result = (result> 8) & 0xFF) ^ list [usernamecharCodeAt (I) ^ (result & 0xFF)];
}
Result = resulttoString (16) toUpperCase ();
Regcode [2] = resultcharAt (0 );
Regcode [3] = resultcharAt (1 );
Len = regcodelength;
Result = 0;
For (I = 2; I <len; I ++ ){
Result = (result> 8) & 0xFF) ^ list [regcode [I] toString () charCodeAt (0) ^ (result & 0xFF)];
}
Result = resulttoString (16) toUpperCase ();
Regcode [0] = resultcharAt (0 );
Regcode [1] = resultcharAt (1 );
Return regcodejoin ("");
}

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.