EditPlus注册码生成器(js代码实现)


Posted in Javascript onMarch 25, 2013

今天同事惊奇的告诉我,说找到个在线的EditPlus注册码生成器,我赶紧去看了看,还真是,在这里。
exe的注册机病毒太多,纯js的在线注册机可就放心了。

作者是从别人的注册机反汇编然后找出算法的,更令我惊奇的是,这作者Demon竟然是搞法律的,才刚拿到法律职业资格证书,佩服。
EditPlus注册码生成器(js代码实现)

主要的一个js函数是这样的:

function generate_editplus_regcode(username){ 
var list = [0,49345,49537,320,49921,960,640,49729,50689,1728,1920,51009,1280,50625,50305,1088,52225,3264,3456,52545,3840,53185,52865,3648,2560,51905,52097,2880,51457,2496,2176,51265,55297,6336,6528,55617,6912,56257,55937,6720,7680,57025,57217,8000,56577,7616,7296,56385,5120,54465,54657,5440,55041,6080,5760,54849,53761,4800,4992,54081,4352,53697,53377,4160,61441,12480,12672,61761,13056,62401,62081,12864,13824,63169,63361,14144,62721,13760,13440,62529,15360,64705,64897,15680,65281,16320,16000,65089,64001,15040,15232,64321,14592,63937,63617,14400,10240,59585,59777,10560,60161,11200,10880,59969,60929,11968,12160,61249,11520,60865,60545,11328,58369,9408,9600,58689,9984,59329,59009,9792,8704,58049,58241,9024,57601,8640,8320,57409,40961,24768,24960,41281,25344,41921,41601,25152,26112,42689,42881,26432,42241,26048,25728,42049,27648,44225,44417,27968,44801,28608,28288,44609,43521,27328,27520,43841,26880,43457,43137,26688,30720,47297,47489,31040,47873,31680,31360,47681,48641,32448,32640,48961,32000,48577,48257,31808,46081,29888,30080,46401,30464,47041,46721,30272,29184,45761,45953,29504,45313,29120,28800,45121,20480,37057,37249,20800,37633,21440,21120,37441,38401,22208,22400,38721,21760,38337,38017,21568,39937,23744,23936,40257,24320,40897,40577,24128,23040,39617,39809,23360,39169,22976,22656,38977,34817,18624,18816,35137,19200,35777,35457,19008,19968,36545,36737,20288,36097,19904,19584,35905,17408,33985,34177,17728,34561,18368,18048,34369,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(""); 
}
Javascript 相关文章推荐
HTML页面如何象ASP一样接受参数
Feb 07 Javascript
js实现九宫格图片半透明渐显特效的方法
Feb 16 Javascript
js实现有时间限制消失的图片方法
Feb 27 Javascript
JavaScript+html5 canvas实现本地截图教程
Apr 16 Javascript
Angular2 环境配置详细介绍
Sep 21 Javascript
jQuery中弹出iframe内嵌页面元素到父页面并全屏化的实例代码
Dec 27 Javascript
Node.js通过身份证号验证年龄、出生日期与性别方法示例
Mar 09 Javascript
用户管理的设计_jquery的ajax实现二级联动效果
Jul 13 jQuery
JavaScript判断浏览器和hack滚动条的写法
Jul 23 Javascript
深入浅析Node.js 事件循环、定时器和process.nextTick()
Oct 22 Javascript
使用JavaScript实现网页秒表功能(含开始、暂停、继续、重置功能)
Jun 05 Javascript
Vue3.0的优化总结
Oct 16 Javascript
本地图片预览(支持IE6/IE7/IE8/Firefox3)经验总结
Mar 25 #Javascript
JS上传前预览图片实例
Mar 25 #Javascript
js实现杯子倒水问题自动求解程序
Mar 25 #Javascript
js实现上传图片之上传前预览图片
Mar 25 #Javascript
使用jQuery validate 验证注册表单实例演示
Mar 25 #Javascript
多个表单中如何获得这个文件上传的网址实现js代码
Mar 25 #Javascript
jquery中使用$(#form).submit()重写提交表单无效原因分析及解决
Mar 25 #Javascript
You might like
PHP5 面向对象(学习记录)
2009/12/02 PHP
PHP flock 文件锁详细介绍
2012/12/29 PHP
php实现按照权重随机排序数据的方法
2015/01/09 PHP
thinkPHP5.0框架整体架构总览【应用,模块,MVC,驱动,行为,命名空间等】
2017/03/25 PHP
关于Laravel参数验证的一些疑与惑
2019/11/19 PHP
Javascript Tab 导航插件 (23个)
2009/06/11 Javascript
来自国外的页面JavaScript文件优化
2010/12/08 Javascript
JavaScript版DateAdd和DateDiff函数代码
2012/03/01 Javascript
JavaScript关闭当前页面(窗口)不带任何提示
2014/03/26 Javascript
JS实现自动变换的菜单效果代码
2015/09/09 Javascript
Javascript实现的简单右键菜单类
2015/09/23 Javascript
分享自己用JS做的扫雷小游戏
2016/02/17 Javascript
jQuery soColorPacker 网页拾色器
2016/06/22 Javascript
NodeJS远程代码执行
2016/08/28 NodeJs
jquery-mobile基础属性与用法详解
2016/11/23 Javascript
jsonp跨域请求实现示例
2017/03/13 Javascript
微信小程序之蓝牙的链接
2017/09/26 Javascript
js实现左右两侧浮动广告
2018/07/09 Javascript
小程序怎样让wx.navigateBack更好用的方法实现
2019/11/01 Javascript
Node.js设置定时任务之node-schedule模块的使用详解
2020/04/28 Javascript
JS实现鼠标按下拖拽效果
2020/07/23 Javascript
Python实现利用163邮箱远程关电脑脚本
2018/02/22 Python
解决python给列表里添加字典时被最后一个覆盖的问题
2019/01/21 Python
python之列表推导式的用法
2019/11/29 Python
Python使用pdb调试代码的技巧
2020/05/03 Python
美国领先的个性化礼品商城:Personalization Mall
2019/07/27 全球购物
JSF面试题:Jsf中导航的标签是什么
2013/04/20 面试题
销售文员的岗位职责
2013/11/20 职场文书
行政人员工作职责
2013/12/05 职场文书
二年级体育教学反思
2014/01/15 职场文书
统计岗位职责
2014/02/21 职场文书
《彭德怀和他的大黑骡子》教学反思
2014/04/12 职场文书
业务内勤岗位职责
2014/04/30 职场文书
企业年度评优方案
2014/06/02 职场文书
结婚仪式主持词
2015/06/29 职场文书
详解Python小数据池和代码块缓存机制
2021/04/07 Python