├── 19-慕课网登陆破解 ├── imooc.html └── imooc.py ├── 21-大众点评登陆密码rsa破解 ├── ping.js └── ping.py ├── 31-国家食品安全抽样检验信息系统滑动验证码 ├── obj.png ├── orange.jpg ├── captcha.jpg ├── pro_img.jpg ├── subtract.jpg ├── src11_captcha.jpg ├── src33_captcha.jpg └── shipin.py ├── 00-CryptoJS加密库 ├── CryptoJS v3.1.2 │ ├── components │ │ ├── pad-nopadding-min.js │ │ ├── pad-nopadding.js │ │ ├── format-hex-min.js │ │ ├── pad-ansix923-min.js │ │ ├── pad-iso97971-min.js │ │ ├── pad-zeropadding-min.js │ │ ├── pad-iso10126-min.js │ │ ├── mode-ecb-min.js │ │ ├── mode-ofb-min.js │ │ ├── mode-ctr-min.js │ │ ├── sha224-min.js │ │ ├── mode-cfb-min.js │ │ ├── x64-core-min.js │ │ ├── evpkdf-min.js │ │ ├── mode-ecb.js │ │ ├── sha384-min.js │ │ ├── pad-iso97971.js │ │ ├── lib-typedarrays-min.js │ │ ├── pbkdf2-min.js │ │ ├── hmac-min.js │ │ ├── pad-zeropadding.js │ │ ├── mode-ctr-gladman-min.js │ │ ├── enc-base64-min.js │ │ ├── enc-utf16-min.js │ │ ├── rc4-min.js │ │ ├── pad-iso10126.js │ │ ├── pad-ansix923.js │ │ ├── sha1-min.js │ │ ├── mode-ofb.js │ │ ├── mode-ctr.js │ │ ├── sha256-min.js │ │ ├── format-hex.js │ │ ├── sha224.js │ │ ├── mode-cfb.js │ │ ├── aes-min.js │ │ ├── lib-typedarrays.js │ │ ├── sha384.js │ │ ├── rabbit-legacy-min.js │ │ ├── sha3-min.js │ │ ├── rabbit-min.js │ │ ├── mode-ctr-gladman.js │ │ ├── md5-min.js │ │ ├── core-min.js │ │ ├── rc4.js │ │ ├── ripemd160-min.js │ │ ├── enc-base64.js │ │ ├── cipher-core-min.js │ │ ├── evpkdf.js │ │ ├── hmac.js │ │ ├── sha1.js │ │ ├── enc-utf16.js │ │ ├── sha512-min.js │ │ ├── pbkdf2.js │ │ └── sha256.js │ └── rollups │ │ ├── sha1.js │ │ ├── sha256.js │ │ ├── hmac-sha1.js │ │ ├── sha224.js │ │ ├── hmac-sha256.js │ │ ├── pbkdf2.js │ │ ├── hmac-sha224.js │ │ ├── sha3.js │ │ ├── md5.js │ │ ├── hmac-sha3.js │ │ └── hmac-md5.js └── README.md ├── 11-爱奇艺JS破解 ├── README.md └── aiqiyi.py ├── 13-YY教育登陆JS破解 ├── README.md └── eduyy.py ├── 02-京东登陆JS解密 └── jdlogin.py ├── 01-58同城登陆JavaScript破解 └── tongcheng.py ├── 22-马蜂窝机票JS破解 ├── mafengwo.py └── mafengwo.js ├── 14-闲鱼翻页JS破解 ├── xianyu.py └── xianyu.js ├── 03-懒人听书JS登陆DES └── lanrentingshu.py ├── 08-首都航空机票desc值破解 ├── 2-首都航空官网招聘JS登陆破解DES │ ├── README.md │ └── hnagroup.py ├── 1-desc值的破解 │ ├── desc.py │ └── README.md ├── 0-fingerPrint值的破解 │ └── fingerPrint.py └── README.md ├── 20-T金所DES破解 └── T金所.py ├── 10-中国电信登录JS破解AES ├── 189.py └── README.md ├── 05-一品威客登陆JS破解MD5 └── epwk.py ├── 06-中国电信登录JS破解AES └── 189.py ├── 09-唯品会JS登陆破解MD5 └── weipinhui.py ├── 12-网易云课堂JS加密解密RSA └── wangyiyunketang.py ├── 18-中国联通JS破解AES └── 10086.py ├── 07-万创帮JS破解MD5 ├── wcbchina.py └── wcbchina.js ├── 17-宁波学院JS破解RSA └── key.py ├── 15-中国空气质量平台JS加密破解 └── aqistudy.py ├── 16-虾米音乐翻页JS破解 └── taoyizhu.py ├── 30-淘一兔数据查询JS破解 └── taoyizhu.py ├── 32-爱学习m3u8视频aes破解 ├── tmoockey.py └── tmoocm3u8.py ├── 04-有道翻译JS破解md5 └── youdao.py └── README.md /19-慕课网登陆破解/imooc.html: -------------------------------------------------------------------------------- 1 | {"status":10014,"msg":"\u975e\u6cd5\u8bf7\u6c42","data":""} -------------------------------------------------------------------------------- /21-大众点评登陆密码rsa破解/ping.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bytebuff/JSpider/HEAD/21-大众点评登陆密码rsa破解/ping.js -------------------------------------------------------------------------------- /31-国家食品安全抽样检验信息系统滑动验证码/obj.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bytebuff/JSpider/HEAD/31-国家食品安全抽样检验信息系统滑动验证码/obj.png -------------------------------------------------------------------------------- /31-国家食品安全抽样检验信息系统滑动验证码/orange.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bytebuff/JSpider/HEAD/31-国家食品安全抽样检验信息系统滑动验证码/orange.jpg -------------------------------------------------------------------------------- /31-国家食品安全抽样检验信息系统滑动验证码/captcha.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bytebuff/JSpider/HEAD/31-国家食品安全抽样检验信息系统滑动验证码/captcha.jpg -------------------------------------------------------------------------------- /31-国家食品安全抽样检验信息系统滑动验证码/pro_img.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bytebuff/JSpider/HEAD/31-国家食品安全抽样检验信息系统滑动验证码/pro_img.jpg -------------------------------------------------------------------------------- /31-国家食品安全抽样检验信息系统滑动验证码/subtract.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bytebuff/JSpider/HEAD/31-国家食品安全抽样检验信息系统滑动验证码/subtract.jpg -------------------------------------------------------------------------------- /31-国家食品安全抽样检验信息系统滑动验证码/src11_captcha.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bytebuff/JSpider/HEAD/31-国家食品安全抽样检验信息系统滑动验证码/src11_captcha.jpg -------------------------------------------------------------------------------- /31-国家食品安全抽样检验信息系统滑动验证码/src33_captcha.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bytebuff/JSpider/HEAD/31-国家食品安全抽样检验信息系统滑动验证码/src33_captcha.jpg -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/pad-nopadding-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | CryptoJS.pad.NoPadding={pad:function(){},unpad:function(){}}; 8 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/pad-nopadding.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | /** 8 | * A noop padding strategy. 9 | */ 10 | CryptoJS.pad.NoPadding = { 11 | pad: function () { 12 | }, 13 | 14 | unpad: function () { 15 | } 16 | }; 17 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/format-hex-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function(){var b=CryptoJS,d=b.lib.CipherParams,c=b.enc.Hex;b.format.Hex={stringify:function(a){return a.ciphertext.toString(c)},parse:function(a){a=c.parse(a);return d.create({ciphertext:a})}}})(); 8 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/pad-ansix923-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | CryptoJS.pad.AnsiX923={pad:function(a,d){var b=a.sigBytes,c=4*d,c=c-b%c,b=b+c-1;a.clamp();a.words[b>>>2]|=c<<24-8*(b%4);a.sigBytes+=c},unpad:function(a){a.sigBytes-=a.words[a.sigBytes-1>>>2]&255}}; 8 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/pad-iso97971-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | CryptoJS.pad.Iso97971={pad:function(a,b){a.concat(CryptoJS.lib.WordArray.create([2147483648],1));CryptoJS.pad.ZeroPadding.pad(a,b)},unpad:function(a){CryptoJS.pad.ZeroPadding.unpad(a);a.sigBytes--}}; 8 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/pad-zeropadding-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | CryptoJS.pad.ZeroPadding={pad:function(a,c){var b=4*c;a.clamp();a.sigBytes+=b-(a.sigBytes%b||b)},unpad:function(a){for(var c=a.words,b=a.sigBytes-1;!(c[b>>>2]>>>24-8*(b%4)&255);)b--;a.sigBytes=b+1}}; 8 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/pad-iso10126-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | CryptoJS.pad.Iso10126={pad:function(a,c){var b=4*c,b=b-a.sigBytes%b;a.concat(CryptoJS.lib.WordArray.random(b-1)).concat(CryptoJS.lib.WordArray.create([b<<24],1))},unpad:function(a){a.sigBytes-=a.words[a.sigBytes-1>>>2]&255}}; 8 | -------------------------------------------------------------------------------- /11-爱奇艺JS破解/README.md: -------------------------------------------------------------------------------- 1 | # 破解提示 2 | 3 | ## 破解目标 4 | 5 | - 爱奇艺登陆的过程 对密码加密进行破解 6 | - 爱奇艺登陆网站 7 | 8 | ## 破解参数 9 | 10 | - `password` 登陆过程的密码加密 11 | 12 | ## 破解提示 13 | 14 | 1. 打开开发者工具抓包 抓取在登陆过程中的资源包 POST请求 15 | 16 | 2. 加密参数是: password 17 | 18 | 3. 在开发者工具中搜索 password 找到 `js` 文件 19 | 20 | 4. 不断的断点调试 可以找到一个新的文件 找到加密的核心 加密库 21 | 22 | 5. 抠出需要加密的 `js` 代码即可。下面就是相关的代码。 23 | 24 | ## 破解时间 25 | 26 | - 2019年8月09日21:04:32 27 | 28 | ## 联系邮箱 29 | 30 | - scrapy@qq.com -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/mode-ecb-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | CryptoJS.mode.ECB=function(){var a=CryptoJS.lib.BlockCipherMode.extend();a.Encryptor=a.extend({processBlock:function(a,b){this._cipher.encryptBlock(a,b)}});a.Decryptor=a.extend({processBlock:function(a,b){this._cipher.decryptBlock(a,b)}});return a}(); 8 | -------------------------------------------------------------------------------- /13-YY教育登陆JS破解/README.md: -------------------------------------------------------------------------------- 1 | # 破解提示 2 | 3 | ## 破解目标 4 | 5 | - YY教育登陆的过程 对密码加密进行破解 [http://edu.yy.com](http://edu.yy.com/) 6 | - YY教育登陆网站 7 | 8 | ## 破解参数 9 | 10 | - `pwdencrypt` 登陆过程的密码加密 11 | 12 | ## 破解提示 13 | 14 | 1. 打开开发者工具抓包 抓取在登陆过程中的资源包 POST请求 15 | 16 | 2. 加密参数是: `pwdencrypt` 17 | 18 | 3. 在开发者工具中搜索 `pwdencrypt` 找到 `js` 文件 19 | 20 | 4. 不断的断点调试 可以找到一个新的文件 找到加密的核心 加密库 21 | 22 | 5. 抠出需要加密的 `js` 代码即可。下面就是相关的代码。 23 | 24 | ## 破解时间 25 | 26 | - 2019年8月28日18:11:37 27 | 28 | ## 联系邮箱 29 | 30 | - scrapy@qq.com -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/mode-ofb-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | CryptoJS.mode.OFB=function(){var b=CryptoJS.lib.BlockCipherMode.extend(),d=b.Encryptor=b.extend({processBlock:function(b,e){var a=this._cipher,d=a.blockSize,f=this._iv,c=this._keystream;f&&(c=this._keystream=f.slice(0),this._iv=void 0);a.encryptBlock(c,0);for(a=0;a coBPtm4BZy5Ly7E1arnljx2fxaOTQIVU/6HpTHGDpz0XYl/elXICeY115jwY6dt2 14 | ``` 15 | 16 | - 在抓取机票价格的时候会遇到这个加密字段 17 | 18 | ## 破解提示 19 | 20 | 1. 抓包 找到需要的请求 找到加密字段desc 21 | 2. 全局搜索 `desc` 参数 具体的代码在 `searchFlight.js` (544行左右) 22 | 3. 断点调试 不断找到加密的位置 在 `ex_mouse.js` 文件里面 23 | 4. 抠出相关代码 注意: document参数可以不要 `screen.colorDepth` 在我的电脑上是 24(直接写死) 不同电脑应该不一样 24 | 5. 添加 `windows` 和 `navigator` 以及 `Json` 对象 25 | 26 | ## 破解时间 27 | 28 | - 2019年8月16日16:40:41 29 | 30 | ## 联系邮箱 31 | 32 | - scrapy@qq.com -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/evpkdf-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function(){var b=CryptoJS,a=b.lib,f=a.Base,k=a.WordArray,a=b.algo,l=a.EvpKDF=f.extend({cfg:f.extend({keySize:4,hasher:a.MD5,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,d=c.hasher.create(),g=k.create(),f=g.words,h=c.keySize,c=c.iterations;f.length>>2]|=a[c]<< 8 | 24-8*(c%4);e.call(this,d,b)}else e.apply(this,arguments)}).prototype=b}})(); 9 | -------------------------------------------------------------------------------- /30-淘一兔数据查询JS破解/taoyizhu.py: -------------------------------------------------------------------------------- 1 | import execjs 2 | 3 | 4 | def get_js_function(js_path, func_name, *func_args): 5 | ''' 6 | 获取指定目录下的js代码, 并且指定js代码中函数的名字以及函数的参数。 7 | :param js_path: js代码的位置 8 | :param func_name: js代码中函数的名字 9 | :param func_args: js代码中函数的参数 10 | :return: 返回调用js函数的结果 11 | ''' 12 | 13 | with open(js_path, encoding='utf-8') as fp: 14 | js = fp.read() 15 | ctx = execjs.compile(js) 16 | return ctx.call(func_name, func_args[0], func_args[1]) 17 | 18 | if __name__ == '__main__': 19 | # 给个star吧 20 | passwd = get_js_function('taoyizhu.js', 'getToken', "2649A03F25BAB1FB0460F1B77F77DE60CB0C91241FC37F72", '汲冢涛') 21 | print('*'*80) 22 | print(passwd) 23 | print('*'*80) 24 | print('@欢迎Star!') 25 | print('@有问题请联系: scrapy@qq.com') -------------------------------------------------------------------------------- /08-首都航空机票desc值破解/README.md: -------------------------------------------------------------------------------- 1 | # 首都航空 2 | 3 | 北京首都航空前身为金鹿航空有限公司,成立于1998年,2010年北京市政府与海航集团共同出资重组并更名为北京首都航空有限公司。北京首都航空在确保安全平稳运营的基础上,机队规模持续扩大,运营品质稳步提升,经营业绩逐年增长,保持了健康快速的发展势头,现已发展成为年收入及品牌价值过百亿的大中型航空企业。 4 | 5 | 截至2019年6月,北京首都航空运营飞机84架,公司主运营基地为北京首都国际机场,已建立海口、杭州、西安、丽江、青岛、南京、广州、沈阳、重庆过夜基地,成立三亚分公司。北京首都航空前后共开通航线400余条,目前运营航线144条,其中国内航线129条,国际航线及港澳台地区航线15条。运营能力覆盖国内(含港澳台)、北美、欧洲、大洋洲、日韩、东南亚地区,空客A330宽体客机运营能力覆盖中远程洲际航线,“商务舱+经济舱”的两舱布局能满足所有客户出行需求。 6 | 7 | 北京首都航空始终贯彻“安全是生命线和高压线”的理念,荣获民航局颁发的“飞行安全一星奖”;2015年,北京首都航空首次通过国际航协IOSA审定,公司AirlineRatings安全评级由五星级提升至七星级。2017年顺利通过国际安全管理机构IOSA安全审定和复审,安全管理已全面对标国际标准。同时,打造4项CARE系列特色服务产品,提升特殊旅客服务质量,运行服务品质稳步提升,位于中国民航业中上游水平。 8 | 9 | 北京首都航空将于2019年10月转场北京新机场运行,未来,首航将对标国际航空企业一流品牌,同时,北京首都航空将在习近平总书记新时代中国特色社会主义思想指引下,以高度的社会责任感和历史使命感,正心正念,稳扎稳打,紧紧跟随“一带一路”发展步伐,投身北京市“四个中心”战略建设,推动京津冀协同发展不断取得新成效,为决胜全面建成小康社会、夺取新时代中国特色社会主义伟大胜利作出新的贡献。 -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/pbkdf2-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function(){var b=CryptoJS,a=b.lib,d=a.Base,m=a.WordArray,a=b.algo,q=a.HMAC,l=a.PBKDF2=d.extend({cfg:d.extend({keySize:4,hasher:a.SHA1,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,f=q.create(c.hasher,a),g=m.create(),d=m.create([1]),l=g.words,r=d.words,n=c.keySize,c=c.iterations;l.lengthe&&(b=a.finalize(b));b.clamp();for(var f=this._oKey=b.clone(),g=this._iKey=b.clone(),h=f.words,j=g.words,d=0;d>> 2] >>> (24 - (i % 4) * 8)) & 0xff)) { 27 | i--; 28 | } 29 | data.sigBytes = i + 1; 30 | } 31 | }; 32 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/mode-ctr-gladman-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | /* 8 | 9 | Counter block mode compatible with Dr Brian Gladman fileenc.c 10 | derived from CryptoJS.mode.CTR 11 | Jan Hruby jhruby.web@gmail.com 12 | */ 13 | CryptoJS.mode.CTRGladman=function(){function h(a){if(255===(a>>24&255)){var c=a>>16&255,b=a>>8&255,e=a&255;255===c?(c=0,255===b?(b=0,255===e?e=0:++e):++b):++c;a=0+(c<<16)+(b<<8);a+=e}else a+=16777216;return a}var g=CryptoJS.lib.BlockCipherMode.extend(),j=g.Encryptor=g.extend({processBlock:function(a,c){var b=this._cipher,e=b.blockSize,d=this._iv,f=this._counter;d&&(f=this._counter=d.slice(0),this._iv=void 0);d=f;if(0===(d[0]=h(d[0])))d[1]=h(d[1]);f=f.slice(0);b.encryptBlock(f,0);for(b=0;b>>2]>>>24-8*(a%4)&255)<<16|(e[a+1>>>2]>>>24-8*((a+1)%4)&255)<<8|e[a+2>>>2]>>>24-8*((a+2)%4)&255,g=0;4>g&&a+0.75*g>>6*(3-g)&63));if(e=c.charAt(64))for(;b.length%4;)b.push(e);return b.join("")},parse:function(b){var e=b.length,f=this._map,c=f.charAt(64);c&&(c=b.indexOf(c),-1!=c&&(e=c));for(var c=[],a=0,d=0;d< 8 | e;d++)if(d%4){var g=f.indexOf(b.charAt(d-1))<<2*(d%4),h=f.indexOf(b.charAt(d))>>>6-2*(d%4);c[a>>>2]|=(g|h)<<24-8*(a%4);a++}return j.create(c,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})(); 9 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/enc-utf16-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function(){var e=CryptoJS,f=e.lib.WordArray,e=e.enc;e.Utf16=e.Utf16BE={stringify:function(b){var d=b.words;b=b.sigBytes;for(var c=[],a=0;a>>2]>>>16-8*(a%4)&65535));return c.join("")},parse:function(b){for(var d=b.length,c=[],a=0;a>>1]|=b.charCodeAt(a)<<16-16*(a%2);return f.create(c,2*d)}};e.Utf16LE={stringify:function(b){var d=b.words;b=b.sigBytes;for(var c=[],a=0;a>>2]>>>16-8*(a%4)&65535)<<8&4278255360|(d[a>>> 8 | 2]>>>16-8*(a%4)&65535)>>>8&16711935));return c.join("")},parse:function(b){for(var d=b.length,c=[],a=0;a>>1,j=e[g],h=b.charCodeAt(a)<<16-16*(a%2);e[g]=j|h<<8&4278255360|h>>>8&16711935}return f.create(c,2*d)}}})(); 9 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/rc4-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function(){function l(){for(var a=this._S,d=this._i,c=this._j,b=0,e=0;4>e;e++){var d=(d+1)%256,c=(c+a[d])%256,f=a[d];a[d]=a[c];a[c]=f;b|=a[(a[d]+a[c])%256]<<24-8*e}this._i=d;this._j=c;return b}var g=CryptoJS,k=g.lib.StreamCipher,h=g.algo,j=h.RC4=k.extend({_doReset:function(){for(var a=this._key,d=a.words,a=a.sigBytes,c=this._S=[],b=0;256>b;b++)c[b]=b;for(var e=b=0;256>b;b++){var f=b%a,e=(e+c[b]+(d[f>>>2]>>>24-8*(f%4)&255))%256,f=c[b];c[b]=c[e];c[e]=f}this._i=this._j=0},_doProcessBlock:function(a, 8 | d){a[d]^=l.call(this)},keySize:8,ivSize:0});g.RC4=k._createHelper(j);h=h.RC4Drop=j.extend({cfg:j.cfg.extend({drop:192}),_doReset:function(){j._doReset.call(this);for(var a=this.cfg.drop;0 28 | js代码: 29 | var md5 = CryptoJS.MD5("你想加密的内容"); 30 | 31 | 2). 引用components下面的文件: 32 | 33 | 34 | js代码: 35 | var md5 = CryptoJS.MD5("你想加密的内容"); 36 | ``` 37 | 38 | 其实`rollups`下面的`md5.js` 就是整合了`components`文件夹下`core-min.js` 和`md5-min.js` 。这样方便只使用一种加密方式时,直接引用一个文件即可,如果你在一个页面中使用多个加密算法,则用第二种方式更好一些。 39 | 40 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/pad-iso10126.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | /** 8 | * ISO 10126 padding strategy. 9 | */ 10 | CryptoJS.pad.Iso10126 = { 11 | pad: function (data, blockSize) { 12 | // Shortcut 13 | var blockSizeBytes = blockSize * 4; 14 | 15 | // Count padding bytes 16 | var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; 17 | 18 | // Pad 19 | data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)). 20 | concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1)); 21 | }, 22 | 23 | unpad: function (data) { 24 | // Get number of padding bytes from last byte 25 | var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; 26 | 27 | // Remove padding 28 | data.sigBytes -= nPaddingBytes; 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/pad-ansix923.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | /** 8 | * ANSI X.923 padding strategy. 9 | */ 10 | CryptoJS.pad.AnsiX923 = { 11 | pad: function (data, blockSize) { 12 | // Shortcuts 13 | var dataSigBytes = data.sigBytes; 14 | var blockSizeBytes = blockSize * 4; 15 | 16 | // Count padding bytes 17 | var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes; 18 | 19 | // Compute last byte position 20 | var lastBytePos = dataSigBytes + nPaddingBytes - 1; 21 | 22 | // Pad 23 | data.clamp(); 24 | data.words[lastBytePos >>> 2] |= nPaddingBytes << (24 - (lastBytePos % 4) * 8); 25 | data.sigBytes += nPaddingBytes; 26 | }, 27 | 28 | unpad: function (data) { 29 | // Get number of padding bytes from last byte 30 | var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; 31 | 32 | // Remove padding 33 | data.sigBytes -= nPaddingBytes; 34 | } 35 | }; 36 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/sha1-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function(){var k=CryptoJS,b=k.lib,m=b.WordArray,l=b.Hasher,d=[],b=k.algo.SHA1=l.extend({_doReset:function(){this._hash=new m.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(n,p){for(var a=this._hash.words,e=a[0],f=a[1],h=a[2],j=a[3],b=a[4],c=0;80>c;c++){if(16>c)d[c]=n[p+c]|0;else{var g=d[c-3]^d[c-8]^d[c-14]^d[c-16];d[c]=g<<1|g>>>31}g=(e<<5|e>>>27)+b+d[c];g=20>c?g+((f&h|~f&j)+1518500249):40>c?g+((f^h^j)+1859775393):60>c?g+((f&h|f&j|h&j)-1894007588):g+((f^h^ 8 | j)-899497514);b=j;j=h;h=f<<30|f>>>2;f=e;e=g}a[0]=a[0]+e|0;a[1]=a[1]+f|0;a[2]=a[2]+h|0;a[3]=a[3]+j|0;a[4]=a[4]+b|0},_doFinalize:function(){var b=this._data,d=b.words,a=8*this._nDataBytes,e=8*b.sigBytes;d[e>>>5]|=128<<24-e%32;d[(e+64>>>9<<4)+14]=Math.floor(a/4294967296);d[(e+64>>>9<<4)+15]=a;b.sigBytes=4*d.length;this._process();return this._hash},clone:function(){var b=l.clone.call(this);b._hash=this._hash.clone();return b}});k.SHA1=l._createHelper(b);k.HmacSHA1=l._createHmacHelper(b)})(); 9 | -------------------------------------------------------------------------------- /32-爱学习m3u8视频aes破解/tmoockey.py: -------------------------------------------------------------------------------- 1 | import requests 2 | from Crypto.Cipher import AES 3 | 4 | 5 | HEADERS = { 6 | 'Origin': 'http://tts.tmooc.cn', 7 | 'Referer': 'http://tts.tmooc.cn/video/showVideo?menuId=582783&version=CGB_A_V02', 8 | 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36', 9 | } 10 | 11 | 12 | def download_key(url_key): 13 | 14 | response_key = requests.get(url_key, headers=HEADERS).content # 下载key 15 | return response_key 16 | 17 | 18 | def download_ts(url_ts): 19 | 20 | response_ts = requests.get(url_ts, headers=HEADERS).content # 下载key 21 | return response_ts 22 | 23 | def aes_key_and_ts(key, ts): 24 | 25 | data = AES.new(key, AES.MODE_CBC, ts[0:16]).decrypt(ts[16:]) 26 | return data 27 | 28 | def save_mp4(file_name, data): 29 | 30 | with open(file_name+'.mp4', 'ab') as fp: 31 | fp.write(data) 32 | 33 | if __name__ == '__main__': 34 | url_key = 'http://c.it211.com.cn/cgb19020226pm/static.key' 35 | key = download_key(url_key) 36 | for page in range(0, 199): 37 | url_ts = f'http://c.it211.com.cn/cgb19020226pm/cgb19020226pm-{page}.ts' 38 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/mode-ofb.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | /** 8 | * Output Feedback block mode. 9 | */ 10 | CryptoJS.mode.OFB = (function () { 11 | var OFB = CryptoJS.lib.BlockCipherMode.extend(); 12 | 13 | var Encryptor = OFB.Encryptor = OFB.extend({ 14 | processBlock: function (words, offset) { 15 | // Shortcuts 16 | var cipher = this._cipher 17 | var blockSize = cipher.blockSize; 18 | var iv = this._iv; 19 | var keystream = this._keystream; 20 | 21 | // Generate keystream 22 | if (iv) { 23 | keystream = this._keystream = iv.slice(0); 24 | 25 | // Remove IV for subsequent blocks 26 | this._iv = undefined; 27 | } 28 | cipher.encryptBlock(keystream, 0); 29 | 30 | // Encrypt 31 | for (var i = 0; i < blockSize; i++) { 32 | words[offset + i] ^= keystream[i]; 33 | } 34 | } 35 | }); 36 | 37 | OFB.Decryptor = Encryptor; 38 | 39 | return OFB; 40 | }()); 41 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/mode-ctr.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | /** 8 | * Counter block mode. 9 | */ 10 | CryptoJS.mode.CTR = (function () { 11 | var CTR = CryptoJS.lib.BlockCipherMode.extend(); 12 | 13 | var Encryptor = CTR.Encryptor = CTR.extend({ 14 | processBlock: function (words, offset) { 15 | // Shortcuts 16 | var cipher = this._cipher 17 | var blockSize = cipher.blockSize; 18 | var iv = this._iv; 19 | var counter = this._counter; 20 | 21 | // Generate keystream 22 | if (iv) { 23 | counter = this._counter = iv.slice(0); 24 | 25 | // Remove IV for subsequent blocks 26 | this._iv = undefined; 27 | } 28 | var keystream = counter.slice(0); 29 | cipher.encryptBlock(keystream, 0); 30 | 31 | // Increment counter 32 | counter[blockSize - 1] = (counter[blockSize - 1] + 1) | 0 33 | 34 | // Encrypt 35 | for (var i = 0; i < blockSize; i++) { 36 | words[offset + i] ^= keystream[i]; 37 | } 38 | } 39 | }); 40 | 41 | CTR.Decryptor = Encryptor; 42 | 43 | return CTR; 44 | }()); 45 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/sha256-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function(k){for(var g=CryptoJS,h=g.lib,v=h.WordArray,j=h.Hasher,h=g.algo,s=[],t=[],u=function(q){return 4294967296*(q-(q|0))|0},l=2,b=0;64>b;){var d;a:{d=l;for(var w=k.sqrt(d),r=2;r<=w;r++)if(!(d%r)){d=!1;break a}d=!0}d&&(8>b&&(s[b]=u(k.pow(l,0.5))),t[b]=u(k.pow(l,1/3)),b++);l++}var n=[],h=h.SHA256=j.extend({_doReset:function(){this._hash=new v.init(s.slice(0))},_doProcessBlock:function(q,h){for(var a=this._hash.words,c=a[0],d=a[1],b=a[2],k=a[3],f=a[4],g=a[5],j=a[6],l=a[7],e=0;64>e;e++){if(16>e)n[e]= 8 | q[h+e]|0;else{var m=n[e-15],p=n[e-2];n[e]=((m<<25|m>>>7)^(m<<14|m>>>18)^m>>>3)+n[e-7]+((p<<15|p>>>17)^(p<<13|p>>>19)^p>>>10)+n[e-16]}m=l+((f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25))+(f&g^~f&j)+t[e]+n[e];p=((c<<30|c>>>2)^(c<<19|c>>>13)^(c<<10|c>>>22))+(c&d^c&b^d&b);l=j;j=g;g=f;f=k+m|0;k=b;b=d;d=c;c=m+p|0}a[0]=a[0]+c|0;a[1]=a[1]+d|0;a[2]=a[2]+b|0;a[3]=a[3]+k|0;a[4]=a[4]+f|0;a[5]=a[5]+g|0;a[6]=a[6]+j|0;a[7]=a[7]+l|0},_doFinalize:function(){var d=this._data,b=d.words,a=8*this._nDataBytes,c=8*d.sigBytes; 9 | b[c>>>5]|=128<<24-c%32;b[(c+64>>>9<<4)+14]=k.floor(a/4294967296);b[(c+64>>>9<<4)+15]=a;d.sigBytes=4*b.length;this._process();return this._hash},clone:function(){var b=j.clone.call(this);b._hash=this._hash.clone();return b}});g.SHA256=j._createHelper(h);g.HmacSHA256=j._createHmacHelper(h)})(Math); 10 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/format-hex.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function (undefined) { 8 | // Shortcuts 9 | var C = CryptoJS; 10 | var C_lib = C.lib; 11 | var CipherParams = C_lib.CipherParams; 12 | var C_enc = C.enc; 13 | var Hex = C_enc.Hex; 14 | var C_format = C.format; 15 | 16 | var HexFormatter = C_format.Hex = { 17 | /** 18 | * Converts the ciphertext of a cipher params object to a hexadecimally encoded string. 19 | * 20 | * @param {CipherParams} cipherParams The cipher params object. 21 | * 22 | * @return {string} The hexadecimally encoded string. 23 | * 24 | * @static 25 | * 26 | * @example 27 | * 28 | * var hexString = CryptoJS.format.Hex.stringify(cipherParams); 29 | */ 30 | stringify: function (cipherParams) { 31 | return cipherParams.ciphertext.toString(Hex); 32 | }, 33 | 34 | /** 35 | * Converts a hexadecimally encoded ciphertext string to a cipher params object. 36 | * 37 | * @param {string} input The hexadecimally encoded string. 38 | * 39 | * @return {CipherParams} The cipher params object. 40 | * 41 | * @static 42 | * 43 | * @example 44 | * 45 | * var cipherParams = CryptoJS.format.Hex.parse(hexString); 46 | */ 47 | parse: function (input) { 48 | var ciphertext = Hex.parse(input); 49 | return CipherParams.create({ ciphertext: ciphertext }); 50 | } 51 | }; 52 | }()); 53 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/sha224.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function () { 8 | // Shortcuts 9 | var C = CryptoJS; 10 | var C_lib = C.lib; 11 | var WordArray = C_lib.WordArray; 12 | var C_algo = C.algo; 13 | var SHA256 = C_algo.SHA256; 14 | 15 | /** 16 | * SHA-224 hash algorithm. 17 | */ 18 | var SHA224 = C_algo.SHA224 = SHA256.extend({ 19 | _doReset: function () { 20 | this._hash = new WordArray.init([ 21 | 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, 22 | 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 23 | ]); 24 | }, 25 | 26 | _doFinalize: function () { 27 | var hash = SHA256._doFinalize.call(this); 28 | 29 | hash.sigBytes -= 4; 30 | 31 | return hash; 32 | } 33 | }); 34 | 35 | /** 36 | * Shortcut function to the hasher's object interface. 37 | * 38 | * @param {WordArray|string} message The message to hash. 39 | * 40 | * @return {WordArray} The hash. 41 | * 42 | * @static 43 | * 44 | * @example 45 | * 46 | * var hash = CryptoJS.SHA224('message'); 47 | * var hash = CryptoJS.SHA224(wordArray); 48 | */ 49 | C.SHA224 = SHA256._createHelper(SHA224); 50 | 51 | /** 52 | * Shortcut function to the HMAC's object interface. 53 | * 54 | * @param {WordArray|string} message The message to hash. 55 | * @param {WordArray|string} key The secret key. 56 | * 57 | * @return {WordArray} The HMAC. 58 | * 59 | * @static 60 | * 61 | * @example 62 | * 63 | * var hmac = CryptoJS.HmacSHA224(message, key); 64 | */ 65 | C.HmacSHA224 = SHA256._createHmacHelper(SHA224); 66 | }()); 67 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/mode-cfb.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | /** 8 | * Cipher Feedback block mode. 9 | */ 10 | CryptoJS.mode.CFB = (function () { 11 | var CFB = CryptoJS.lib.BlockCipherMode.extend(); 12 | 13 | CFB.Encryptor = CFB.extend({ 14 | processBlock: function (words, offset) { 15 | // Shortcuts 16 | var cipher = this._cipher; 17 | var blockSize = cipher.blockSize; 18 | 19 | generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); 20 | 21 | // Remember this block to use with next block 22 | this._prevBlock = words.slice(offset, offset + blockSize); 23 | } 24 | }); 25 | 26 | CFB.Decryptor = CFB.extend({ 27 | processBlock: function (words, offset) { 28 | // Shortcuts 29 | var cipher = this._cipher; 30 | var blockSize = cipher.blockSize; 31 | 32 | // Remember this block to use with next block 33 | var thisBlock = words.slice(offset, offset + blockSize); 34 | 35 | generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); 36 | 37 | // This block becomes the previous block 38 | this._prevBlock = thisBlock; 39 | } 40 | }); 41 | 42 | function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) { 43 | // Shortcut 44 | var iv = this._iv; 45 | 46 | // Generate keystream 47 | if (iv) { 48 | var keystream = iv.slice(0); 49 | 50 | // Remove IV for subsequent blocks 51 | this._iv = undefined; 52 | } else { 53 | var keystream = this._prevBlock; 54 | } 55 | cipher.encryptBlock(keystream, 0); 56 | 57 | // Encrypt 58 | for (var i = 0; i < blockSize; i++) { 59 | words[offset + i] ^= keystream[i]; 60 | } 61 | } 62 | 63 | return CFB; 64 | }()); 65 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/aes-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function(){for(var q=CryptoJS,x=q.lib.BlockCipher,r=q.algo,j=[],y=[],z=[],A=[],B=[],C=[],s=[],u=[],v=[],w=[],g=[],k=0;256>k;k++)g[k]=128>k?k<<1:k<<1^283;for(var n=0,l=0,k=0;256>k;k++){var f=l^l<<1^l<<2^l<<3^l<<4,f=f>>>8^f&255^99;j[n]=f;y[f]=n;var t=g[n],D=g[t],E=g[D],b=257*g[f]^16843008*f;z[n]=b<<24|b>>>8;A[n]=b<<16|b>>>16;B[n]=b<<8|b>>>24;C[n]=b;b=16843009*E^65537*D^257*t^16843008*n;s[f]=b<<24|b>>>8;u[f]=b<<16|b>>>16;v[f]=b<<8|b>>>24;w[f]=b;n?(n=t^g[g[g[E^t]]],l^=g[g[l]]):n=l=1}var F=[0,1,2,4,8, 8 | 16,32,64,128,27,54],r=r.AES=x.extend({_doReset:function(){for(var c=this._key,e=c.words,a=c.sigBytes/4,c=4*((this._nRounds=a+6)+1),b=this._keySchedule=[],h=0;h>>24]<<24|j[d>>>16&255]<<16|j[d>>>8&255]<<8|j[d&255]):(d=d<<8|d>>>24,d=j[d>>>24]<<24|j[d>>>16&255]<<16|j[d>>>8&255]<<8|j[d&255],d^=F[h/a|0]<<24);b[h]=b[h-a]^d}e=this._invKeySchedule=[];for(a=0;aa||4>=h?d:s[j[d>>>24]]^u[j[d>>>16&255]]^v[j[d>>> 9 | 8&255]]^w[j[d&255]]},encryptBlock:function(c,e){this._doCryptBlock(c,e,this._keySchedule,z,A,B,C,j)},decryptBlock:function(c,e){var a=c[e+1];c[e+1]=c[e+3];c[e+3]=a;this._doCryptBlock(c,e,this._invKeySchedule,s,u,v,w,y);a=c[e+1];c[e+1]=c[e+3];c[e+3]=a},_doCryptBlock:function(c,e,a,b,h,d,j,m){for(var n=this._nRounds,f=c[e]^a[0],g=c[e+1]^a[1],k=c[e+2]^a[2],p=c[e+3]^a[3],l=4,t=1;t>>24]^h[g>>>16&255]^d[k>>>8&255]^j[p&255]^a[l++],r=b[g>>>24]^h[k>>>16&255]^d[p>>>8&255]^j[f&255]^a[l++],s= 10 | b[k>>>24]^h[p>>>16&255]^d[f>>>8&255]^j[g&255]^a[l++],p=b[p>>>24]^h[f>>>16&255]^d[g>>>8&255]^j[k&255]^a[l++],f=q,g=r,k=s;q=(m[f>>>24]<<24|m[g>>>16&255]<<16|m[k>>>8&255]<<8|m[p&255])^a[l++];r=(m[g>>>24]<<24|m[k>>>16&255]<<16|m[p>>>8&255]<<8|m[f&255])^a[l++];s=(m[k>>>24]<<24|m[p>>>16&255]<<16|m[f>>>8&255]<<8|m[g&255])^a[l++];p=(m[p>>>24]<<24|m[f>>>16&255]<<16|m[g>>>8&255]<<8|m[k&255])^a[l++];c[e]=q;c[e+1]=r;c[e+2]=s;c[e+3]=p},keySize:8});q.AES=x._createHelper(r)})(); 11 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/lib-typedarrays.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function () { 8 | // Check if typed arrays are supported 9 | if (typeof ArrayBuffer != 'function') { 10 | return; 11 | } 12 | 13 | // Shortcuts 14 | var C = CryptoJS; 15 | var C_lib = C.lib; 16 | var WordArray = C_lib.WordArray; 17 | 18 | // Reference original init 19 | var superInit = WordArray.init; 20 | 21 | // Augment WordArray.init to handle typed arrays 22 | var subInit = WordArray.init = function (typedArray) { 23 | // Convert buffers to uint8 24 | if (typedArray instanceof ArrayBuffer) { 25 | typedArray = new Uint8Array(typedArray); 26 | } 27 | 28 | // Convert other array views to uint8 29 | if ( 30 | typedArray instanceof Int8Array || 31 | typedArray instanceof Uint8ClampedArray || 32 | typedArray instanceof Int16Array || 33 | typedArray instanceof Uint16Array || 34 | typedArray instanceof Int32Array || 35 | typedArray instanceof Uint32Array || 36 | typedArray instanceof Float32Array || 37 | typedArray instanceof Float64Array 38 | ) { 39 | typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength); 40 | } 41 | 42 | // Handle Uint8Array 43 | if (typedArray instanceof Uint8Array) { 44 | // Shortcut 45 | var typedArrayByteLength = typedArray.byteLength; 46 | 47 | // Extract bytes 48 | var words = []; 49 | for (var i = 0; i < typedArrayByteLength; i++) { 50 | words[i >>> 2] |= typedArray[i] << (24 - (i % 4) * 8); 51 | } 52 | 53 | // Initialize this word array 54 | superInit.call(this, words, typedArrayByteLength); 55 | } else { 56 | // Else call normal init 57 | superInit.apply(this, arguments); 58 | } 59 | }; 60 | 61 | subInit.prototype = WordArray; 62 | }()); 63 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/sha384.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function () { 8 | // Shortcuts 9 | var C = CryptoJS; 10 | var C_x64 = C.x64; 11 | var X64Word = C_x64.Word; 12 | var X64WordArray = C_x64.WordArray; 13 | var C_algo = C.algo; 14 | var SHA512 = C_algo.SHA512; 15 | 16 | /** 17 | * SHA-384 hash algorithm. 18 | */ 19 | var SHA384 = C_algo.SHA384 = SHA512.extend({ 20 | _doReset: function () { 21 | this._hash = new X64WordArray.init([ 22 | new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507), 23 | new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939), 24 | new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511), 25 | new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4) 26 | ]); 27 | }, 28 | 29 | _doFinalize: function () { 30 | var hash = SHA512._doFinalize.call(this); 31 | 32 | hash.sigBytes -= 16; 33 | 34 | return hash; 35 | } 36 | }); 37 | 38 | /** 39 | * Shortcut function to the hasher's object interface. 40 | * 41 | * @param {WordArray|string} message The message to hash. 42 | * 43 | * @return {WordArray} The hash. 44 | * 45 | * @static 46 | * 47 | * @example 48 | * 49 | * var hash = CryptoJS.SHA384('message'); 50 | * var hash = CryptoJS.SHA384(wordArray); 51 | */ 52 | C.SHA384 = SHA512._createHelper(SHA384); 53 | 54 | /** 55 | * Shortcut function to the HMAC's object interface. 56 | * 57 | * @param {WordArray|string} message The message to hash. 58 | * @param {WordArray|string} key The secret key. 59 | * 60 | * @return {WordArray} The HMAC. 61 | * 62 | * @static 63 | * 64 | * @example 65 | * 66 | * var hmac = CryptoJS.HmacSHA384(message, key); 67 | */ 68 | C.HmacSHA384 = SHA512._createHmacHelper(SHA384); 69 | }()); 70 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/rabbit-legacy-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function(){function g(){for(var a=this._X,d=this._C,c=0;8>c;c++)f[c]=d[c];d[0]=d[0]+1295307597+this._b|0;d[1]=d[1]+3545052371+(d[0]>>>0>>0?1:0)|0;d[2]=d[2]+886263092+(d[1]>>>0>>0?1:0)|0;d[3]=d[3]+1295307597+(d[2]>>>0>>0?1:0)|0;d[4]=d[4]+3545052371+(d[3]>>>0>>0?1:0)|0;d[5]=d[5]+886263092+(d[4]>>>0>>0?1:0)|0;d[6]=d[6]+1295307597+(d[5]>>>0>>0?1:0)|0;d[7]=d[7]+3545052371+(d[6]>>>0>>0?1:0)|0;this._b=d[7]>>>0>>0?1:0;for(c=0;8>c;c++){var h=a[c]+d[c],e=h&65535, 8 | g=h>>>16;b[c]=((e*e>>>17)+e*g>>>15)+g*g^((h&4294901760)*h|0)+((h&65535)*h|0)}a[0]=b[0]+(b[7]<<16|b[7]>>>16)+(b[6]<<16|b[6]>>>16)|0;a[1]=b[1]+(b[0]<<8|b[0]>>>24)+b[7]|0;a[2]=b[2]+(b[1]<<16|b[1]>>>16)+(b[0]<<16|b[0]>>>16)|0;a[3]=b[3]+(b[2]<<8|b[2]>>>24)+b[1]|0;a[4]=b[4]+(b[3]<<16|b[3]>>>16)+(b[2]<<16|b[2]>>>16)|0;a[5]=b[5]+(b[4]<<8|b[4]>>>24)+b[3]|0;a[6]=b[6]+(b[5]<<16|b[5]>>>16)+(b[4]<<16|b[4]>>>16)|0;a[7]=b[7]+(b[6]<<8|b[6]>>>24)+b[5]|0}var j=CryptoJS,k=j.lib.StreamCipher,e=[],f=[],b=[],l=j.algo.RabbitLegacy= 9 | k.extend({_doReset:function(){for(var a=this._key.words,d=this.cfg.iv,c=this._X=[a[0],a[3]<<16|a[2]>>>16,a[1],a[0]<<16|a[3]>>>16,a[2],a[1]<<16|a[0]>>>16,a[3],a[2]<<16|a[1]>>>16],a=this._C=[a[2]<<16|a[2]>>>16,a[0]&4294901760|a[1]&65535,a[3]<<16|a[3]>>>16,a[1]&4294901760|a[2]&65535,a[0]<<16|a[0]>>>16,a[2]&4294901760|a[3]&65535,a[1]<<16|a[1]>>>16,a[3]&4294901760|a[0]&65535],b=this._b=0;4>b;b++)g.call(this);for(b=0;8>b;b++)a[b]^=c[b+4&7];if(d){var c=d.words,d=c[0],c=c[1],d=(d<<8|d>>>24)&16711935|(d<< 10 | 24|d>>>8)&4278255360,c=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360,b=d>>>16|c&4294901760,e=c<<16|d&65535;a[0]^=d;a[1]^=b;a[2]^=c;a[3]^=e;a[4]^=d;a[5]^=b;a[6]^=c;a[7]^=e;for(b=0;4>b;b++)g.call(this)}},_doProcessBlock:function(a,b){var c=this._X;g.call(this);e[0]=c[0]^c[5]>>>16^c[3]<<16;e[1]=c[2]^c[7]>>>16^c[5]<<16;e[2]=c[4]^c[1]>>>16^c[7]<<16;e[3]=c[6]^c[3]>>>16^c[1]<<16;for(c=0;4>c;c++)e[c]=(e[c]<<8|e[c]>>>24)&16711935|(e[c]<<24|e[c]>>>8)&4278255360,a[b+c]^=e[c]},blockSize:4,ivSize:2});j.RabbitLegacy= 11 | k._createHelper(l)})(); 12 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/sha3-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function(y){for(var p=CryptoJS,m=p.lib,z=m.WordArray,q=m.Hasher,s=p.x64.Word,m=p.algo,v=[],w=[],x=[],c=1,d=0,l=0;24>l;l++){v[c+5*d]=(l+1)*(l+2)/2%64;var r=(2*c+3*d)%5,c=d%5,d=r}for(c=0;5>c;c++)for(d=0;5>d;d++)w[c+5*d]=d+5*((2*c+3*d)%5);c=1;for(d=0;24>d;d++){for(var t=r=l=0;7>t;t++){if(c&1){var u=(1<u?r^=1<c;c++)j[c]=s.create();m=m.SHA3=q.extend({cfg:q.cfg.extend({outputLength:512}),_doReset:function(){for(var c=this._state= 8 | [],n=0;25>n;n++)c[n]=new s.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(c,n){for(var h=this._state,d=this.blockSize/2,b=0;b>>24)&16711935|(e<<24|e>>>8)&4278255360,f=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360,a=h[b];a.high^=f;a.low^=e}for(d=0;24>d;d++){for(b=0;5>b;b++){for(var k=e=0,g=0;5>g;g++)a=h[b+5*g],e^=a.high,k^=a.low;a=j[b];a.high=e;a.low=k}for(b=0;5>b;b++){a=j[(b+4)%5];e=j[(b+1)%5];f=e.high;g=e.low;e=a.high^ 9 | (f<<1|g>>>31);k=a.low^(g<<1|f>>>31);for(g=0;5>g;g++)a=h[b+5*g],a.high^=e,a.low^=k}for(f=1;25>f;f++)a=h[f],b=a.high,a=a.low,g=v[f],32>g?(e=b<>>32-g,k=a<>>32-g):(e=a<>>64-g,k=b<>>64-g),a=j[w[f]],a.high=e,a.low=k;a=j[0];b=h[0];a.high=b.high;a.low=b.low;for(b=0;5>b;b++)for(g=0;5>g;g++)f=b+5*g,a=h[f],e=j[f],f=j[(b+1)%5+5*g],k=j[(b+2)%5+5*g],a.high=e.high^~f.high&k.high,a.low=e.low^~f.low&k.low;a=h[0];b=x[d];a.high^=b.high;a.low^=b.low}},_doFinalize:function(){var c=this._data, 10 | d=c.words,h=8*c.sigBytes,j=32*this.blockSize;d[h>>>5]|=1<<24-h%32;d[(y.ceil((h+1)/j)*j>>>5)-1]|=128;c.sigBytes=4*d.length;this._process();for(var c=this._state,d=this.cfg.outputLength/8,h=d/8,j=[],b=0;b>>24)&16711935|(f<<24|f>>>8)&4278255360,e=(e<<8|e>>>24)&16711935|(e<<24|e>>>8)&4278255360;j.push(e);j.push(f)}return new z.init(j,d)},clone:function(){for(var c=q.clone.call(this),d=c._state=this._state.slice(0),h=0;25>h;h++)d[h]=d[h].clone();return c}}); 11 | p.SHA3=q._createHelper(m);p.HmacSHA3=q._createHmacHelper(m)})(Math); 12 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/rabbit-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function(){function g(){for(var b=this._X,d=this._C,a=0;8>a;a++)f[a]=d[a];d[0]=d[0]+1295307597+this._b|0;d[1]=d[1]+3545052371+(d[0]>>>0>>0?1:0)|0;d[2]=d[2]+886263092+(d[1]>>>0>>0?1:0)|0;d[3]=d[3]+1295307597+(d[2]>>>0>>0?1:0)|0;d[4]=d[4]+3545052371+(d[3]>>>0>>0?1:0)|0;d[5]=d[5]+886263092+(d[4]>>>0>>0?1:0)|0;d[6]=d[6]+1295307597+(d[5]>>>0>>0?1:0)|0;d[7]=d[7]+3545052371+(d[6]>>>0>>0?1:0)|0;this._b=d[7]>>>0>>0?1:0;for(a=0;8>a;a++){var h=b[a]+d[a],e=h&65535, 8 | g=h>>>16;c[a]=((e*e>>>17)+e*g>>>15)+g*g^((h&4294901760)*h|0)+((h&65535)*h|0)}b[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0;b[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0;b[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0;b[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0;b[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0;b[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0;b[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0;b[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}var j=CryptoJS,k=j.lib.StreamCipher,e=[],f=[],c=[],l=j.algo.Rabbit= 9 | k.extend({_doReset:function(){for(var b=this._key.words,d=this.cfg.iv,a=0;4>a;a++)b[a]=(b[a]<<8|b[a]>>>24)&16711935|(b[a]<<24|b[a]>>>8)&4278255360;for(var c=this._X=[b[0],b[3]<<16|b[2]>>>16,b[1],b[0]<<16|b[3]>>>16,b[2],b[1]<<16|b[0]>>>16,b[3],b[2]<<16|b[1]>>>16],b=this._C=[b[2]<<16|b[2]>>>16,b[0]&4294901760|b[1]&65535,b[3]<<16|b[3]>>>16,b[1]&4294901760|b[2]&65535,b[0]<<16|b[0]>>>16,b[2]&4294901760|b[3]&65535,b[1]<<16|b[1]>>>16,b[3]&4294901760|b[0]&65535],a=this._b=0;4>a;a++)g.call(this);for(a=0;8> 10 | a;a++)b[a]^=c[a+4&7];if(d){var a=d.words,d=a[0],a=a[1],d=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360,a=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,c=d>>>16|a&4294901760,e=a<<16|d&65535;b[0]^=d;b[1]^=c;b[2]^=a;b[3]^=e;b[4]^=d;b[5]^=c;b[6]^=a;b[7]^=e;for(a=0;4>a;a++)g.call(this)}},_doProcessBlock:function(b,c){var a=this._X;g.call(this);e[0]=a[0]^a[5]>>>16^a[3]<<16;e[1]=a[2]^a[7]>>>16^a[5]<<16;e[2]=a[4]^a[1]>>>16^a[7]<<16;e[3]=a[6]^a[3]>>>16^a[1]<<16;for(a=0;4>a;a++)e[a]=(e[a]<<8|e[a]>>>24)& 11 | 16711935|(e[a]<<24|e[a]>>>8)&4278255360,b[c+a]^=e[a]},blockSize:4,ivSize:2});j.Rabbit=k._createHelper(l)})(); 12 | -------------------------------------------------------------------------------- /04-有道翻译JS破解md5/youdao.py: -------------------------------------------------------------------------------- 1 | import execjs 2 | import requests 3 | 4 | def get_js_function(js_path, func_name, func_args): 5 | ''' 6 | 获取指定目录下的js代码, 并且指定js代码中函数的名字以及函数的参数。 7 | :param js_path: js代码的位置 8 | :param func_name: js代码中函数的名字 9 | :param func_args: js代码中函数的参数 10 | :return: 返回调用js函数的结果 11 | ''' 12 | 13 | with open(js_path, encoding='utf-8') as fp: 14 | js = fp.read() 15 | ctx = execjs.compile(js) 16 | return ctx.call(func_name, func_args) 17 | 18 | 19 | def youdao(word): 20 | ''' 21 | 有道翻译 22 | :param word: 传入的待翻译的词汇 23 | :return: 返回的翻译后的内容 24 | ''' 25 | url = 'http://fanyi.youdao.com/translate_o?smartresult=dict&smartresult=rule' 26 | result = get_js_function('youdao.js', 'youdao', word) 27 | data = { 28 | 'i': word, 29 | 'from': 'AUTO', 30 | 'to': 'AUTO', 31 | 'smartresult': 'dict', 32 | 'client': 'fanyideskweb', 33 | 'salt': result['salt'], 34 | 'sign': result['sign'], 35 | 'ts': result['ts'], 36 | 'bv': result['bv'], 37 | 'doctype': 'json', 38 | 'version': '2.1', 39 | 'keyfrom': 'fanyi.web', 40 | 'action': 'FY_BY_CLICKBUTTION', 41 | } 42 | headers = { 43 | 'Accept': 'application/json, text/javascript, */*; q=0.01', 44 | 'Accept-Encoding': 'gzip, deflate', 45 | 'Accept-Language': 'zh-CN,zh;q=0.9', 46 | 'Cache-Control': 'no-cache', 47 | 'Connection': 'keep-alive', 48 | 'Content-Length': '242', 49 | 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', 50 | 'Cookie': 'OUTFOX_SEARCH_USER_ID=1726048911@10.169.0.84; OUTFOX_SEARCH_USER_ID_NCOO=998841688.7251934; _ntes_nnid=a31cda64b2586670bbfaa1138bf220fc,1554879349324; _ga=GA1.2.851305956.1555316006; JSESSIONID=abc-vREXHwVUd8GgTQ8Ww; ___rl__test__cookies=1564385974367', 51 | 'Host': 'fanyi.youdao.com', 52 | 'Origin': 'http://fanyi.youdao.com', 53 | 'Pragma': 'no-cache', 54 | 'Referer': 'http://fanyi.youdao.com/?keyfrom=fanyi.logo', 55 | 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36', 56 | 'X-Requested-With': 'XMLHttpRequest', 57 | } 58 | response = requests.post(url, data=data, headers=headers) 59 | return response.json() 60 | 61 | 62 | if __name__ == '__main__': 63 | result = youdao('鸡你太美') 64 | print(result) 65 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/mode-ctr-gladman.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | /** @preserve 8 | * Counter block mode compatible with Dr Brian Gladman fileenc.c 9 | * derived from CryptoJS.mode.CTR 10 | * Jan Hruby jhruby.web@gmail.com 11 | */ 12 | CryptoJS.mode.CTRGladman = (function () { 13 | var CTRGladman = CryptoJS.lib.BlockCipherMode.extend(); 14 | 15 | function incWord(word) 16 | { 17 | if (((word >> 24) & 0xff) === 0xff) { //overflow 18 | var b1 = (word >> 16)&0xff; 19 | var b2 = (word >> 8)&0xff; 20 | var b3 = word & 0xff; 21 | 22 | if (b1 === 0xff) // overflow b1 23 | { 24 | b1 = 0; 25 | if (b2 === 0xff) 26 | { 27 | b2 = 0; 28 | if (b3 === 0xff) 29 | { 30 | b3 = 0; 31 | } 32 | else 33 | { 34 | ++b3; 35 | } 36 | } 37 | else 38 | { 39 | ++b2; 40 | } 41 | } 42 | else 43 | { 44 | ++b1; 45 | } 46 | 47 | word = 0; 48 | word += (b1 << 16); 49 | word += (b2 << 8); 50 | word += b3; 51 | } 52 | else 53 | { 54 | word += (0x01 << 24); 55 | } 56 | return word; 57 | } 58 | 59 | function incCounter(counter) 60 | { 61 | if ((counter[0] = incWord(counter[0])) === 0) 62 | { 63 | // encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8 64 | counter[1] = incWord(counter[1]); 65 | } 66 | return counter; 67 | } 68 | 69 | var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({ 70 | processBlock: function (words, offset) { 71 | // Shortcuts 72 | var cipher = this._cipher 73 | var blockSize = cipher.blockSize; 74 | var iv = this._iv; 75 | var counter = this._counter; 76 | 77 | // Generate keystream 78 | if (iv) { 79 | counter = this._counter = iv.slice(0); 80 | 81 | // Remove IV for subsequent blocks 82 | this._iv = undefined; 83 | } 84 | 85 | incCounter(counter); 86 | 87 | var keystream = counter.slice(0); 88 | cipher.encryptBlock(keystream, 0); 89 | 90 | // Encrypt 91 | for (var i = 0; i < blockSize; i++) { 92 | words[offset + i] ^= keystream[i]; 93 | } 94 | } 95 | }); 96 | 97 | CTRGladman.Decryptor = Encryptor; 98 | 99 | return CTRGladman; 100 | }()); 101 | 102 | 103 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/md5-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function(E){function h(a,f,g,j,p,h,k){a=a+(f&g|~f&j)+p+k;return(a<>>32-h)+f}function k(a,f,g,j,p,h,k){a=a+(f&j|g&~j)+p+k;return(a<>>32-h)+f}function l(a,f,g,j,h,k,l){a=a+(f^g^j)+h+l;return(a<>>32-k)+f}function n(a,f,g,j,h,k,l){a=a+(g^(f|~j))+h+l;return(a<>>32-k)+f}for(var r=CryptoJS,q=r.lib,F=q.WordArray,s=q.Hasher,q=r.algo,a=[],t=0;64>t;t++)a[t]=4294967296*E.abs(E.sin(t+1))|0;q=q.MD5=s.extend({_doReset:function(){this._hash=new F.init([1732584193,4023233417,2562383102,271733878])}, 8 | _doProcessBlock:function(m,f){for(var g=0;16>g;g++){var j=f+g,p=m[j];m[j]=(p<<8|p>>>24)&16711935|(p<<24|p>>>8)&4278255360}var g=this._hash.words,j=m[f+0],p=m[f+1],q=m[f+2],r=m[f+3],s=m[f+4],t=m[f+5],u=m[f+6],v=m[f+7],w=m[f+8],x=m[f+9],y=m[f+10],z=m[f+11],A=m[f+12],B=m[f+13],C=m[f+14],D=m[f+15],b=g[0],c=g[1],d=g[2],e=g[3],b=h(b,c,d,e,j,7,a[0]),e=h(e,b,c,d,p,12,a[1]),d=h(d,e,b,c,q,17,a[2]),c=h(c,d,e,b,r,22,a[3]),b=h(b,c,d,e,s,7,a[4]),e=h(e,b,c,d,t,12,a[5]),d=h(d,e,b,c,u,17,a[6]),c=h(c,d,e,b,v,22,a[7]), 9 | b=h(b,c,d,e,w,7,a[8]),e=h(e,b,c,d,x,12,a[9]),d=h(d,e,b,c,y,17,a[10]),c=h(c,d,e,b,z,22,a[11]),b=h(b,c,d,e,A,7,a[12]),e=h(e,b,c,d,B,12,a[13]),d=h(d,e,b,c,C,17,a[14]),c=h(c,d,e,b,D,22,a[15]),b=k(b,c,d,e,p,5,a[16]),e=k(e,b,c,d,u,9,a[17]),d=k(d,e,b,c,z,14,a[18]),c=k(c,d,e,b,j,20,a[19]),b=k(b,c,d,e,t,5,a[20]),e=k(e,b,c,d,y,9,a[21]),d=k(d,e,b,c,D,14,a[22]),c=k(c,d,e,b,s,20,a[23]),b=k(b,c,d,e,x,5,a[24]),e=k(e,b,c,d,C,9,a[25]),d=k(d,e,b,c,r,14,a[26]),c=k(c,d,e,b,w,20,a[27]),b=k(b,c,d,e,B,5,a[28]),e=k(e,b, 10 | c,d,q,9,a[29]),d=k(d,e,b,c,v,14,a[30]),c=k(c,d,e,b,A,20,a[31]),b=l(b,c,d,e,t,4,a[32]),e=l(e,b,c,d,w,11,a[33]),d=l(d,e,b,c,z,16,a[34]),c=l(c,d,e,b,C,23,a[35]),b=l(b,c,d,e,p,4,a[36]),e=l(e,b,c,d,s,11,a[37]),d=l(d,e,b,c,v,16,a[38]),c=l(c,d,e,b,y,23,a[39]),b=l(b,c,d,e,B,4,a[40]),e=l(e,b,c,d,j,11,a[41]),d=l(d,e,b,c,r,16,a[42]),c=l(c,d,e,b,u,23,a[43]),b=l(b,c,d,e,x,4,a[44]),e=l(e,b,c,d,A,11,a[45]),d=l(d,e,b,c,D,16,a[46]),c=l(c,d,e,b,q,23,a[47]),b=n(b,c,d,e,j,6,a[48]),e=n(e,b,c,d,v,10,a[49]),d=n(d,e,b,c, 11 | C,15,a[50]),c=n(c,d,e,b,t,21,a[51]),b=n(b,c,d,e,A,6,a[52]),e=n(e,b,c,d,r,10,a[53]),d=n(d,e,b,c,y,15,a[54]),c=n(c,d,e,b,p,21,a[55]),b=n(b,c,d,e,w,6,a[56]),e=n(e,b,c,d,D,10,a[57]),d=n(d,e,b,c,u,15,a[58]),c=n(c,d,e,b,B,21,a[59]),b=n(b,c,d,e,s,6,a[60]),e=n(e,b,c,d,z,10,a[61]),d=n(d,e,b,c,q,15,a[62]),c=n(c,d,e,b,x,21,a[63]);g[0]=g[0]+b|0;g[1]=g[1]+c|0;g[2]=g[2]+d|0;g[3]=g[3]+e|0},_doFinalize:function(){var a=this._data,f=a.words,g=8*this._nDataBytes,j=8*a.sigBytes;f[j>>>5]|=128<<24-j%32;var h=E.floor(g/ 12 | 4294967296);f[(j+64>>>9<<4)+15]=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360;f[(j+64>>>9<<4)+14]=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360;a.sigBytes=4*(f.length+1);this._process();a=this._hash;f=a.words;for(g=0;4>g;g++)j=f[g],f[g]=(j<<8|j>>>24)&16711935|(j<<24|j>>>8)&4278255360;return a},clone:function(){var a=s.clone.call(this);a._hash=this._hash.clone();return a}});r.MD5=s._createHelper(q);r.HmacMD5=s._createHmacHelper(q)})(Math); 13 | -------------------------------------------------------------------------------- /32-爱学习m3u8视频aes破解/tmoocm3u8.py: -------------------------------------------------------------------------------- 1 | import re, os 2 | import requests 3 | from parsel import Selector 4 | from tmoockey import download_key, download_ts, aes_key_and_ts, save_mp4 5 | 6 | 7 | headers = { 8 | 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3', 9 | 'Accept-Encoding': 'gzip, deflate', 10 | 'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8', 11 | 'Cache-Control': 'max-age=0', 12 | 'Connection': 'keep-alive', 13 | 'Cookie': 'xxxxxxxxxxxxxxxxxxx', 14 | 'Host': 'tts.tmooc.cn', 15 | 'Referer': 'http://tts.tmooc.cn/studentCenter/toMyttsPage?versionCode=CGB_A_V02', 16 | 'Upgrade-Insecure-Requests': '1', 17 | 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36', 18 | } 19 | 20 | headers2 = { 21 | 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3', 22 | 'Accept-Encoding': 'gzip, deflate', 23 | 'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8', 24 | 'Cache-Control': 'max-age=0', 25 | 'Connection': 'keep-alive', 26 | 'Cookie': 'xxxxxxxxxxxx', 27 | 'Host': 'tts.tmooc.cn', 28 | 'Upgrade-Insecure-Requests': '1', 29 | 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36', 30 | 31 | } 32 | 33 | headers3 = { 34 | 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36', 35 | } 36 | 37 | def get_menuId(url): 38 | 39 | response = requests.get(url, headers=headers) 40 | selectors = Selector(text=response.text).xpath('//div[@class="course-menu"]/ul/li[@class="opened"]') 41 | for selector in selectors: 42 | video_name = selector.xpath('./p/text()').get().strip() 43 | video_href = selector.xpath('./ul/li[@class="sp"]/a/@href').get() 44 | video_name = ''.join(video_name.split()) 45 | video_href = video_href 46 | yield video_name, video_href 47 | 48 | 49 | def get_m3u8(m3u8_url): 50 | # m3u8_url = 'https://hls.videocc.net/01b768ec8c/0/01b768ec8c4739f79cec9964836b5800_2.m3u8?pid=1580626301758X1133587&device=desktop' 51 | # m3u8_url = 'https://hls.videocc.net/01b768ec8c/e/01b768ec8c3d4e068ad411ccc0b9342e_2.m3u8?pid=1580632138310X1619848&device=desktop' 52 | response_m3u8 = requests.get(m3u8_url, headers=headers3) 53 | print(response_m3u8.text) 54 | # 提取key的url 55 | url_key = re.search('URI="(.*?)"', response_m3u8.text).group(1) 56 | #'http://c.it211.com.cn/cgb19020226pm/static.key' 57 | key = download_key(url_key) 58 | url_ts = re.findall(r'https://.*?\.ts\?pid=.*?&device=desktop', response_m3u8.text) 59 | print(url_ts) 60 | for ts_url in url_ts: 61 | print(ts_url) 62 | ts = download_ts(ts_url) 63 | data = aes_key_and_ts(key, ts) 64 | video_path = '第6讲 【作】写人篇·我的好朋友' 65 | save_mp4(video_path, data) 66 | 67 | 68 | if __name__ == '__main__': 69 | m3u8_url = 'https://hls.videocc.net/01b768ec8c/7/01b768ec8c751c7b09232998c15b6837_2.m3u8?pid=1580646548553X1389651&device=desktop' 70 | get_m3u8(m3u8_url) 71 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/core-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | var CryptoJS=CryptoJS||function(h,r){var k={},l=k.lib={},n=function(){},f=l.Base={extend:function(a){n.prototype=this;var b=new n;a&&b.mixIn(a);b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)});b.init.prototype=b;b.$super=this;return b},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, 8 | j=l.WordArray=f.extend({init:function(a,b){a=this.words=a||[];this.sigBytes=b!=r?b:4*a.length},toString:function(a){return(a||s).stringify(this)},concat:function(a){var b=this.words,d=a.words,c=this.sigBytes;a=a.sigBytes;this.clamp();if(c%4)for(var e=0;e>>2]|=(d[e>>>2]>>>24-8*(e%4)&255)<<24-8*((c+e)%4);else if(65535>>2]=d[e>>>2];else b.push.apply(b,d);this.sigBytes+=a;return this},clamp:function(){var a=this.words,b=this.sigBytes;a[b>>>2]&=4294967295<< 9 | 32-8*(b%4);a.length=h.ceil(b/4)},clone:function(){var a=f.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var b=[],d=0;d>>2]>>>24-8*(c%4)&255;d.push((e>>>4).toString(16));d.push((e&15).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,d=[],c=0;c>>3]|=parseInt(a.substr(c, 10 | 2),16)<<24-4*(c%8);return new j.init(d,b/2)}},p=m.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var d=[],c=0;c>>2]>>>24-8*(c%4)&255));return d.join("")},parse:function(a){for(var b=a.length,d=[],c=0;c>>2]|=(a.charCodeAt(c)&255)<<24-8*(c%4);return new j.init(d,b)}},t=m.Utf8={stringify:function(a){try{return decodeURIComponent(escape(p.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return p.parse(unescape(encodeURIComponent(a)))}}, 11 | q=l.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new j.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=t.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var b=this._data,d=b.words,c=b.sigBytes,e=this.blockSize,f=c/(4*e),f=a?h.ceil(f):h.max((f|0)-this._minBufferSize,0);a=f*e;c=h.min(4*a,c);if(a){for(var g=0;g>> 2] >>> (24 - (keyByteIndex % 4) * 8)) & 0xff; 34 | 35 | j = (j + S[i] + keyByte) % 256; 36 | 37 | // Swap 38 | var t = S[i]; 39 | S[i] = S[j]; 40 | S[j] = t; 41 | } 42 | 43 | // Counters 44 | this._i = this._j = 0; 45 | }, 46 | 47 | _doProcessBlock: function (M, offset) { 48 | M[offset] ^= generateKeystreamWord.call(this); 49 | }, 50 | 51 | keySize: 256/32, 52 | 53 | ivSize: 0 54 | }); 55 | 56 | function generateKeystreamWord() { 57 | // Shortcuts 58 | var S = this._S; 59 | var i = this._i; 60 | var j = this._j; 61 | 62 | // Generate keystream word 63 | var keystreamWord = 0; 64 | for (var n = 0; n < 4; n++) { 65 | i = (i + 1) % 256; 66 | j = (j + S[i]) % 256; 67 | 68 | // Swap 69 | var t = S[i]; 70 | S[i] = S[j]; 71 | S[j] = t; 72 | 73 | keystreamWord |= S[(S[i] + S[j]) % 256] << (24 - n * 8); 74 | } 75 | 76 | // Update counters 77 | this._i = i; 78 | this._j = j; 79 | 80 | return keystreamWord; 81 | } 82 | 83 | /** 84 | * Shortcut functions to the cipher's object interface. 85 | * 86 | * @example 87 | * 88 | * var ciphertext = CryptoJS.RC4.encrypt(message, key, cfg); 89 | * var plaintext = CryptoJS.RC4.decrypt(ciphertext, key, cfg); 90 | */ 91 | C.RC4 = StreamCipher._createHelper(RC4); 92 | 93 | /** 94 | * Modified RC4 stream cipher algorithm. 95 | */ 96 | var RC4Drop = C_algo.RC4Drop = RC4.extend({ 97 | /** 98 | * Configuration options. 99 | * 100 | * @property {number} drop The number of keystream words to drop. Default 192 101 | */ 102 | cfg: RC4.cfg.extend({ 103 | drop: 192 104 | }), 105 | 106 | _doReset: function () { 107 | RC4._doReset.call(this); 108 | 109 | // Drop 110 | for (var i = this.cfg.drop; i > 0; i--) { 111 | generateKeystreamWord.call(this); 112 | } 113 | } 114 | }); 115 | 116 | /** 117 | * Shortcut functions to the cipher's object interface. 118 | * 119 | * @example 120 | * 121 | * var ciphertext = CryptoJS.RC4Drop.encrypt(message, key, cfg); 122 | * var plaintext = CryptoJS.RC4Drop.decrypt(ciphertext, key, cfg); 123 | */ 124 | C.RC4Drop = StreamCipher._createHelper(RC4Drop); 125 | }()); 126 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/ripemd160-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | /* 8 | 9 | (c) 2012 by C?dric Mesnil. All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 12 | 13 | - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 14 | - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 17 | */ 18 | (function(){var q=CryptoJS,d=q.lib,n=d.WordArray,p=d.Hasher,d=q.algo,x=n.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),y=n.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),z=n.create([11,14,15,12, 19 | 5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),A=n.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),B=n.create([0,1518500249,1859775393,2400959708,2840853838]),C=n.create([1352829926,1548603684,1836072691, 20 | 2053994217,0]),d=d.RIPEMD160=p.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,v){for(var b=0;16>b;b++){var c=v+b,f=e[c];e[c]=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360}var c=this._hash.words,f=B.words,d=C.words,n=x.words,q=y.words,p=z.words,w=A.words,t,g,h,j,r,u,k,l,m,s;u=t=c[0];k=g=c[1];l=h=c[2];m=j=c[3];s=r=c[4];for(var a,b=0;80>b;b+=1)a=t+e[v+n[b]]|0,a=16>b?a+((g^h^j)+f[0]):32>b?a+((g&h|~g&j)+f[1]):48>b? 21 | a+(((g|~h)^j)+f[2]):64>b?a+((g&j|h&~j)+f[3]):a+((g^(h|~j))+f[4]),a|=0,a=a<>>32-p[b],a=a+r|0,t=r,r=j,j=h<<10|h>>>22,h=g,g=a,a=u+e[v+q[b]]|0,a=16>b?a+((k^(l|~m))+d[0]):32>b?a+((k&m|l&~m)+d[1]):48>b?a+(((k|~l)^m)+d[2]):64>b?a+((k&l|~k&m)+d[3]):a+((k^l^m)+d[4]),a|=0,a=a<>>32-w[b],a=a+s|0,u=s,s=m,m=l<<10|l>>>22,l=k,k=a;a=c[1]+h+m|0;c[1]=c[2]+j+s|0;c[2]=c[3]+r+u|0;c[3]=c[4]+t+k|0;c[4]=c[0]+g+l|0;c[0]=a},_doFinalize:function(){var e=this._data,d=e.words,b=8*this._nDataBytes,c=8*e.sigBytes; 22 | d[c>>>5]|=128<<24-c%32;d[(c+64>>>9<<4)+14]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360;e.sigBytes=4*(d.length+1);this._process();e=this._hash;d=e.words;for(b=0;5>b;b++)c=d[b],d[b]=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360;return e},clone:function(){var d=p.clone.call(this);d._hash=this._hash.clone();return d}});q.RIPEMD160=p._createHelper(d);q.HmacRIPEMD160=p._createHmacHelper(d)})(Math); 23 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/enc-base64.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function () { 8 | // Shortcuts 9 | var C = CryptoJS; 10 | var C_lib = C.lib; 11 | var WordArray = C_lib.WordArray; 12 | var C_enc = C.enc; 13 | 14 | /** 15 | * Base64 encoding strategy. 16 | */ 17 | var Base64 = C_enc.Base64 = { 18 | /** 19 | * Converts a word array to a Base64 string. 20 | * 21 | * @param {WordArray} wordArray The word array. 22 | * 23 | * @return {string} The Base64 string. 24 | * 25 | * @static 26 | * 27 | * @example 28 | * 29 | * var base64String = CryptoJS.enc.Base64.stringify(wordArray); 30 | */ 31 | stringify: function (wordArray) { 32 | // Shortcuts 33 | var words = wordArray.words; 34 | var sigBytes = wordArray.sigBytes; 35 | var map = this._map; 36 | 37 | // Clamp excess bits 38 | wordArray.clamp(); 39 | 40 | // Convert 41 | var base64Chars = []; 42 | for (var i = 0; i < sigBytes; i += 3) { 43 | var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; 44 | var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff; 45 | var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff; 46 | 47 | var triplet = (byte1 << 16) | (byte2 << 8) | byte3; 48 | 49 | for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) { 50 | base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f)); 51 | } 52 | } 53 | 54 | // Add padding 55 | var paddingChar = map.charAt(64); 56 | if (paddingChar) { 57 | while (base64Chars.length % 4) { 58 | base64Chars.push(paddingChar); 59 | } 60 | } 61 | 62 | return base64Chars.join(''); 63 | }, 64 | 65 | /** 66 | * Converts a Base64 string to a word array. 67 | * 68 | * @param {string} base64Str The Base64 string. 69 | * 70 | * @return {WordArray} The word array. 71 | * 72 | * @static 73 | * 74 | * @example 75 | * 76 | * var wordArray = CryptoJS.enc.Base64.parse(base64String); 77 | */ 78 | parse: function (base64Str) { 79 | // Shortcuts 80 | var base64StrLength = base64Str.length; 81 | var map = this._map; 82 | 83 | // Ignore padding 84 | var paddingChar = map.charAt(64); 85 | if (paddingChar) { 86 | var paddingIndex = base64Str.indexOf(paddingChar); 87 | if (paddingIndex != -1) { 88 | base64StrLength = paddingIndex; 89 | } 90 | } 91 | 92 | // Convert 93 | var words = []; 94 | var nBytes = 0; 95 | for (var i = 0; i < base64StrLength; i++) { 96 | if (i % 4) { 97 | var bits1 = map.indexOf(base64Str.charAt(i - 1)) << ((i % 4) * 2); 98 | var bits2 = map.indexOf(base64Str.charAt(i)) >>> (6 - (i % 4) * 2); 99 | words[nBytes >>> 2] |= (bits1 | bits2) << (24 - (nBytes % 4) * 8); 100 | nBytes++; 101 | } 102 | } 103 | 104 | return WordArray.create(words, nBytes); 105 | }, 106 | 107 | _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=' 108 | }; 109 | }()); 110 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/cipher-core-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | CryptoJS.lib.Cipher||function(u){var g=CryptoJS,f=g.lib,k=f.Base,l=f.WordArray,q=f.BufferedBlockAlgorithm,r=g.enc.Base64,v=g.algo.EvpKDF,n=f.Cipher=q.extend({cfg:k.extend(),createEncryptor:function(a,b){return this.create(this._ENC_XFORM_MODE,a,b)},createDecryptor:function(a,b){return this.create(this._DEC_XFORM_MODE,a,b)},init:function(a,b,c){this.cfg=this.cfg.extend(c);this._xformMode=a;this._key=b;this.reset()},reset:function(){q.reset.call(this);this._doReset()},process:function(a){this._append(a); 8 | return this._process()},finalize:function(a){a&&this._append(a);return this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(a){return{encrypt:function(b,c,d){return("string"==typeof c?s:j).encrypt(a,b,c,d)},decrypt:function(b,c,d){return("string"==typeof c?s:j).decrypt(a,b,c,d)}}}});f.StreamCipher=n.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var m=g.mode={},t=function(a,b,c){var d=this._iv;d?this._iv=u:d=this._prevBlock;for(var e= 9 | 0;e>>2]&255}};f.BlockCipher=n.extend({cfg:n.cfg.extend({mode:m,padding:h}),reset:function(){n.reset.call(this);var a=this.cfg,b=a.iv,a=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var c=a.createEncryptor;else c=a.createDecryptor,this._minBufferSize=1; 11 | this._mode=c.call(a,this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else b=this._process(!0),a.unpad(b);return b},blockSize:4});var p=f.CipherParams=k.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}}),m=(g.format={}).OpenSSL={stringify:function(a){var b=a.ciphertext;a=a.salt; 12 | return(a?l.create([1398893684,1701076831]).concat(a).concat(b):b).toString(r)},parse:function(a){a=r.parse(a);var b=a.words;if(1398893684==b[0]&&1701076831==b[1]){var c=l.create(b.slice(2,4));b.splice(0,4);a.sigBytes-=16}return p.create({ciphertext:a,salt:c})}},j=f.SerializableCipher=k.extend({cfg:k.extend({format:m}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d);b=e.finalize(b);e=e.cfg;return p.create({ciphertext:b,key:c,iv:e.iv,algorithm:a,mode:e.mode,padding:e.padding, 13 | blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,b,c,d){d=this.cfg.extend(d);b=this._parse(b,d.format);return a.createDecryptor(c,d).finalize(b.ciphertext)},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),g=(g.kdf={}).OpenSSL={execute:function(a,b,c,d){d||(d=l.random(8));a=v.create({keySize:b+c}).compute(a,d);c=l.create(a.words.slice(b),4*c);a.sigBytes=4*b;return p.create({key:a,iv:c,salt:d})}},s=f.PasswordBasedCipher=j.extend({cfg:j.cfg.extend({kdf:g}),encrypt:function(a, 14 | b,c,d){d=this.cfg.extend(d);c=d.kdf.execute(c,a.keySize,a.ivSize);d.iv=c.iv;a=j.encrypt.call(this,a,b,c.key,d);a.mixIn(c);return a},decrypt:function(a,b,c,d){d=this.cfg.extend(d);b=this._parse(b,d.format);c=d.kdf.execute(c,a.keySize,a.ivSize,b.salt);d.iv=c.iv;return j.decrypt.call(this,a,b,c.key,d)}})}(); 15 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/evpkdf.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function () { 8 | // Shortcuts 9 | var C = CryptoJS; 10 | var C_lib = C.lib; 11 | var Base = C_lib.Base; 12 | var WordArray = C_lib.WordArray; 13 | var C_algo = C.algo; 14 | var MD5 = C_algo.MD5; 15 | 16 | /** 17 | * This key derivation function is meant to conform with EVP_BytesToKey. 18 | * www.openssl.org/docs/crypto/EVP_BytesToKey.html 19 | */ 20 | var EvpKDF = C_algo.EvpKDF = Base.extend({ 21 | /** 22 | * Configuration options. 23 | * 24 | * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) 25 | * @property {Hasher} hasher The hash algorithm to use. Default: MD5 26 | * @property {number} iterations The number of iterations to perform. Default: 1 27 | */ 28 | cfg: Base.extend({ 29 | keySize: 128/32, 30 | hasher: MD5, 31 | iterations: 1 32 | }), 33 | 34 | /** 35 | * Initializes a newly created key derivation function. 36 | * 37 | * @param {Object} cfg (Optional) The configuration options to use for the derivation. 38 | * 39 | * @example 40 | * 41 | * var kdf = CryptoJS.algo.EvpKDF.create(); 42 | * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 }); 43 | * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 }); 44 | */ 45 | init: function (cfg) { 46 | this.cfg = this.cfg.extend(cfg); 47 | }, 48 | 49 | /** 50 | * Derives a key from a password. 51 | * 52 | * @param {WordArray|string} password The password. 53 | * @param {WordArray|string} salt A salt. 54 | * 55 | * @return {WordArray} The derived key. 56 | * 57 | * @example 58 | * 59 | * var key = kdf.compute(password, salt); 60 | */ 61 | compute: function (password, salt) { 62 | // Shortcut 63 | var cfg = this.cfg; 64 | 65 | // Init hasher 66 | var hasher = cfg.hasher.create(); 67 | 68 | // Initial values 69 | var derivedKey = WordArray.create(); 70 | 71 | // Shortcuts 72 | var derivedKeyWords = derivedKey.words; 73 | var keySize = cfg.keySize; 74 | var iterations = cfg.iterations; 75 | 76 | // Generate key 77 | while (derivedKeyWords.length < keySize) { 78 | if (block) { 79 | hasher.update(block); 80 | } 81 | var block = hasher.update(password).finalize(salt); 82 | hasher.reset(); 83 | 84 | // Iterations 85 | for (var i = 1; i < iterations; i++) { 86 | block = hasher.finalize(block); 87 | hasher.reset(); 88 | } 89 | 90 | derivedKey.concat(block); 91 | } 92 | derivedKey.sigBytes = keySize * 4; 93 | 94 | return derivedKey; 95 | } 96 | }); 97 | 98 | /** 99 | * Derives a key from a password. 100 | * 101 | * @param {WordArray|string} password The password. 102 | * @param {WordArray|string} salt A salt. 103 | * @param {Object} cfg (Optional) The configuration options to use for this computation. 104 | * 105 | * @return {WordArray} The derived key. 106 | * 107 | * @static 108 | * 109 | * @example 110 | * 111 | * var key = CryptoJS.EvpKDF(password, salt); 112 | * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 }); 113 | * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 }); 114 | */ 115 | C.EvpKDF = function (password, salt, cfg) { 116 | return EvpKDF.create(cfg).compute(password, salt); 117 | }; 118 | }()); 119 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/rollups/sha1.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | var CryptoJS=CryptoJS||function(e,m){var p={},j=p.lib={},l=function(){},f=j.Base={extend:function(a){l.prototype=this;var c=new l;a&&c.mixIn(a);c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$super=this;return c},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, 8 | n=j.WordArray=f.extend({init:function(a,c){a=this.words=a||[];this.sigBytes=c!=m?c:4*a.length},toString:function(a){return(a||h).stringify(this)},concat:function(a){var c=this.words,q=a.words,d=this.sigBytes;a=a.sigBytes;this.clamp();if(d%4)for(var b=0;b>>2]|=(q[b>>>2]>>>24-8*(b%4)&255)<<24-8*((d+b)%4);else if(65535>>2]=q[b>>>2];else c.push.apply(c,q);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<< 9 | 32-8*(c%4);a.length=e.ceil(c/4)},clone:function(){var a=f.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],b=0;b>>2]>>>24-8*(d%4)&255;b.push((f>>>4).toString(16));b.push((f&15).toString(16))}return b.join("")},parse:function(a){for(var c=a.length,b=[],d=0;d>>3]|=parseInt(a.substr(d, 10 | 2),16)<<24-4*(d%8);return new n.init(b,c/2)}},g=b.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var b=[],d=0;d>>2]>>>24-8*(d%4)&255));return b.join("")},parse:function(a){for(var c=a.length,b=[],d=0;d>>2]|=(a.charCodeAt(d)&255)<<24-8*(d%4);return new n.init(b,c)}},r=b.Utf8={stringify:function(a){try{return decodeURIComponent(escape(g.stringify(a)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(a){return g.parse(unescape(encodeURIComponent(a)))}}, 11 | k=j.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new n.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=r.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,b=c.words,d=c.sigBytes,f=this.blockSize,h=d/(4*f),h=a?e.ceil(h):e.max((h|0)-this._minBufferSize,0);a=h*f;d=e.min(4*a,d);if(a){for(var g=0;ga;a++){if(16>a)l[a]=f[n+a]|0;else{var c=l[a-3]^l[a-8]^l[a-14]^l[a-16];l[a]=c<<1|c>>>31}c=(h<<5|h>>>27)+j+l[a];c=20>a?c+((g&e|~g&k)+1518500249):40>a?c+((g^e^k)+1859775393):60>a?c+((g&e|g&k|e&k)-1894007588):c+((g^e^ 15 | k)-899497514);j=k;k=e;e=g<<30|g>>>2;g=h;h=c}b[0]=b[0]+h|0;b[1]=b[1]+g|0;b[2]=b[2]+e|0;b[3]=b[3]+k|0;b[4]=b[4]+j|0},_doFinalize:function(){var f=this._data,e=f.words,b=8*this._nDataBytes,h=8*f.sigBytes;e[h>>>5]|=128<<24-h%32;e[(h+64>>>9<<4)+14]=Math.floor(b/4294967296);e[(h+64>>>9<<4)+15]=b;f.sigBytes=4*e.length;this._process();return this._hash},clone:function(){var e=j.clone.call(this);e._hash=this._hash.clone();return e}});e.SHA1=j._createHelper(m);e.HmacSHA1=j._createHmacHelper(m)})(); 16 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/hmac.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function () { 8 | // Shortcuts 9 | var C = CryptoJS; 10 | var C_lib = C.lib; 11 | var Base = C_lib.Base; 12 | var C_enc = C.enc; 13 | var Utf8 = C_enc.Utf8; 14 | var C_algo = C.algo; 15 | 16 | /** 17 | * HMAC algorithm. 18 | */ 19 | var HMAC = C_algo.HMAC = Base.extend({ 20 | /** 21 | * Initializes a newly created HMAC. 22 | * 23 | * @param {Hasher} hasher The hash algorithm to use. 24 | * @param {WordArray|string} key The secret key. 25 | * 26 | * @example 27 | * 28 | * var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key); 29 | */ 30 | init: function (hasher, key) { 31 | // Init hasher 32 | hasher = this._hasher = new hasher.init(); 33 | 34 | // Convert string to WordArray, else assume WordArray already 35 | if (typeof key == 'string') { 36 | key = Utf8.parse(key); 37 | } 38 | 39 | // Shortcuts 40 | var hasherBlockSize = hasher.blockSize; 41 | var hasherBlockSizeBytes = hasherBlockSize * 4; 42 | 43 | // Allow arbitrary length keys 44 | if (key.sigBytes > hasherBlockSizeBytes) { 45 | key = hasher.finalize(key); 46 | } 47 | 48 | // Clamp excess bits 49 | key.clamp(); 50 | 51 | // Clone key for inner and outer pads 52 | var oKey = this._oKey = key.clone(); 53 | var iKey = this._iKey = key.clone(); 54 | 55 | // Shortcuts 56 | var oKeyWords = oKey.words; 57 | var iKeyWords = iKey.words; 58 | 59 | // XOR keys with pad constants 60 | for (var i = 0; i < hasherBlockSize; i++) { 61 | oKeyWords[i] ^= 0x5c5c5c5c; 62 | iKeyWords[i] ^= 0x36363636; 63 | } 64 | oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes; 65 | 66 | // Set initial values 67 | this.reset(); 68 | }, 69 | 70 | /** 71 | * Resets this HMAC to its initial state. 72 | * 73 | * @example 74 | * 75 | * hmacHasher.reset(); 76 | */ 77 | reset: function () { 78 | // Shortcut 79 | var hasher = this._hasher; 80 | 81 | // Reset 82 | hasher.reset(); 83 | hasher.update(this._iKey); 84 | }, 85 | 86 | /** 87 | * Updates this HMAC with a message. 88 | * 89 | * @param {WordArray|string} messageUpdate The message to append. 90 | * 91 | * @return {HMAC} This HMAC instance. 92 | * 93 | * @example 94 | * 95 | * hmacHasher.update('message'); 96 | * hmacHasher.update(wordArray); 97 | */ 98 | update: function (messageUpdate) { 99 | this._hasher.update(messageUpdate); 100 | 101 | // Chainable 102 | return this; 103 | }, 104 | 105 | /** 106 | * Finalizes the HMAC computation. 107 | * Note that the finalize operation is effectively a destructive, read-once operation. 108 | * 109 | * @param {WordArray|string} messageUpdate (Optional) A final message update. 110 | * 111 | * @return {WordArray} The HMAC. 112 | * 113 | * @example 114 | * 115 | * var hmac = hmacHasher.finalize(); 116 | * var hmac = hmacHasher.finalize('message'); 117 | * var hmac = hmacHasher.finalize(wordArray); 118 | */ 119 | finalize: function (messageUpdate) { 120 | // Shortcut 121 | var hasher = this._hasher; 122 | 123 | // Compute HMAC 124 | var innerHash = hasher.finalize(messageUpdate); 125 | hasher.reset(); 126 | var hmac = hasher.finalize(this._oKey.clone().concat(innerHash)); 127 | 128 | return hmac; 129 | } 130 | }); 131 | }()); 132 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/sha1.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function () { 8 | // Shortcuts 9 | var C = CryptoJS; 10 | var C_lib = C.lib; 11 | var WordArray = C_lib.WordArray; 12 | var Hasher = C_lib.Hasher; 13 | var C_algo = C.algo; 14 | 15 | // Reusable object 16 | var W = []; 17 | 18 | /** 19 | * SHA-1 hash algorithm. 20 | */ 21 | var SHA1 = C_algo.SHA1 = Hasher.extend({ 22 | _doReset: function () { 23 | this._hash = new WordArray.init([ 24 | 0x67452301, 0xefcdab89, 25 | 0x98badcfe, 0x10325476, 26 | 0xc3d2e1f0 27 | ]); 28 | }, 29 | 30 | _doProcessBlock: function (M, offset) { 31 | // Shortcut 32 | var H = this._hash.words; 33 | 34 | // Working variables 35 | var a = H[0]; 36 | var b = H[1]; 37 | var c = H[2]; 38 | var d = H[3]; 39 | var e = H[4]; 40 | 41 | // Computation 42 | for (var i = 0; i < 80; i++) { 43 | if (i < 16) { 44 | W[i] = M[offset + i] | 0; 45 | } else { 46 | var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]; 47 | W[i] = (n << 1) | (n >>> 31); 48 | } 49 | 50 | var t = ((a << 5) | (a >>> 27)) + e + W[i]; 51 | if (i < 20) { 52 | t += ((b & c) | (~b & d)) + 0x5a827999; 53 | } else if (i < 40) { 54 | t += (b ^ c ^ d) + 0x6ed9eba1; 55 | } else if (i < 60) { 56 | t += ((b & c) | (b & d) | (c & d)) - 0x70e44324; 57 | } else /* if (i < 80) */ { 58 | t += (b ^ c ^ d) - 0x359d3e2a; 59 | } 60 | 61 | e = d; 62 | d = c; 63 | c = (b << 30) | (b >>> 2); 64 | b = a; 65 | a = t; 66 | } 67 | 68 | // Intermediate hash value 69 | H[0] = (H[0] + a) | 0; 70 | H[1] = (H[1] + b) | 0; 71 | H[2] = (H[2] + c) | 0; 72 | H[3] = (H[3] + d) | 0; 73 | H[4] = (H[4] + e) | 0; 74 | }, 75 | 76 | _doFinalize: function () { 77 | // Shortcuts 78 | var data = this._data; 79 | var dataWords = data.words; 80 | 81 | var nBitsTotal = this._nDataBytes * 8; 82 | var nBitsLeft = data.sigBytes * 8; 83 | 84 | // Add padding 85 | dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); 86 | dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); 87 | dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; 88 | data.sigBytes = dataWords.length * 4; 89 | 90 | // Hash final blocks 91 | this._process(); 92 | 93 | // Return final computed hash 94 | return this._hash; 95 | }, 96 | 97 | clone: function () { 98 | var clone = Hasher.clone.call(this); 99 | clone._hash = this._hash.clone(); 100 | 101 | return clone; 102 | } 103 | }); 104 | 105 | /** 106 | * Shortcut function to the hasher's object interface. 107 | * 108 | * @param {WordArray|string} message The message to hash. 109 | * 110 | * @return {WordArray} The hash. 111 | * 112 | * @static 113 | * 114 | * @example 115 | * 116 | * var hash = CryptoJS.SHA1('message'); 117 | * var hash = CryptoJS.SHA1(wordArray); 118 | */ 119 | C.SHA1 = Hasher._createHelper(SHA1); 120 | 121 | /** 122 | * Shortcut function to the HMAC's object interface. 123 | * 124 | * @param {WordArray|string} message The message to hash. 125 | * @param {WordArray|string} key The secret key. 126 | * 127 | * @return {WordArray} The HMAC. 128 | * 129 | * @static 130 | * 131 | * @example 132 | * 133 | * var hmac = CryptoJS.HmacSHA1(message, key); 134 | */ 135 | C.HmacSHA1 = Hasher._createHmacHelper(SHA1); 136 | }()); 137 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/enc-utf16.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function () { 8 | // Shortcuts 9 | var C = CryptoJS; 10 | var C_lib = C.lib; 11 | var WordArray = C_lib.WordArray; 12 | var C_enc = C.enc; 13 | 14 | /** 15 | * UTF-16 BE encoding strategy. 16 | */ 17 | var Utf16BE = C_enc.Utf16 = C_enc.Utf16BE = { 18 | /** 19 | * Converts a word array to a UTF-16 BE string. 20 | * 21 | * @param {WordArray} wordArray The word array. 22 | * 23 | * @return {string} The UTF-16 BE string. 24 | * 25 | * @static 26 | * 27 | * @example 28 | * 29 | * var utf16String = CryptoJS.enc.Utf16.stringify(wordArray); 30 | */ 31 | stringify: function (wordArray) { 32 | // Shortcuts 33 | var words = wordArray.words; 34 | var sigBytes = wordArray.sigBytes; 35 | 36 | // Convert 37 | var utf16Chars = []; 38 | for (var i = 0; i < sigBytes; i += 2) { 39 | var codePoint = (words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff; 40 | utf16Chars.push(String.fromCharCode(codePoint)); 41 | } 42 | 43 | return utf16Chars.join(''); 44 | }, 45 | 46 | /** 47 | * Converts a UTF-16 BE string to a word array. 48 | * 49 | * @param {string} utf16Str The UTF-16 BE string. 50 | * 51 | * @return {WordArray} The word array. 52 | * 53 | * @static 54 | * 55 | * @example 56 | * 57 | * var wordArray = CryptoJS.enc.Utf16.parse(utf16String); 58 | */ 59 | parse: function (utf16Str) { 60 | // Shortcut 61 | var utf16StrLength = utf16Str.length; 62 | 63 | // Convert 64 | var words = []; 65 | for (var i = 0; i < utf16StrLength; i++) { 66 | words[i >>> 1] |= utf16Str.charCodeAt(i) << (16 - (i % 2) * 16); 67 | } 68 | 69 | return WordArray.create(words, utf16StrLength * 2); 70 | } 71 | }; 72 | 73 | /** 74 | * UTF-16 LE encoding strategy. 75 | */ 76 | C_enc.Utf16LE = { 77 | /** 78 | * Converts a word array to a UTF-16 LE string. 79 | * 80 | * @param {WordArray} wordArray The word array. 81 | * 82 | * @return {string} The UTF-16 LE string. 83 | * 84 | * @static 85 | * 86 | * @example 87 | * 88 | * var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray); 89 | */ 90 | stringify: function (wordArray) { 91 | // Shortcuts 92 | var words = wordArray.words; 93 | var sigBytes = wordArray.sigBytes; 94 | 95 | // Convert 96 | var utf16Chars = []; 97 | for (var i = 0; i < sigBytes; i += 2) { 98 | var codePoint = swapEndian((words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff); 99 | utf16Chars.push(String.fromCharCode(codePoint)); 100 | } 101 | 102 | return utf16Chars.join(''); 103 | }, 104 | 105 | /** 106 | * Converts a UTF-16 LE string to a word array. 107 | * 108 | * @param {string} utf16Str The UTF-16 LE string. 109 | * 110 | * @return {WordArray} The word array. 111 | * 112 | * @static 113 | * 114 | * @example 115 | * 116 | * var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str); 117 | */ 118 | parse: function (utf16Str) { 119 | // Shortcut 120 | var utf16StrLength = utf16Str.length; 121 | 122 | // Convert 123 | var words = []; 124 | for (var i = 0; i < utf16StrLength; i++) { 125 | words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << (16 - (i % 2) * 16)); 126 | } 127 | 128 | return WordArray.create(words, utf16StrLength * 2); 129 | } 130 | }; 131 | 132 | function swapEndian(word) { 133 | return ((word << 8) & 0xff00ff00) | ((word >>> 8) & 0x00ff00ff); 134 | } 135 | }()); 136 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/rollups/sha256.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | var CryptoJS=CryptoJS||function(h,s){var f={},t=f.lib={},g=function(){},j=t.Base={extend:function(a){g.prototype=this;var c=new g;a&&c.mixIn(a);c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$super=this;return c},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, 8 | q=t.WordArray=j.extend({init:function(a,c){a=this.words=a||[];this.sigBytes=c!=s?c:4*a.length},toString:function(a){return(a||u).stringify(this)},concat:function(a){var c=this.words,d=a.words,b=this.sigBytes;a=a.sigBytes;this.clamp();if(b%4)for(var e=0;e>>2]|=(d[e>>>2]>>>24-8*(e%4)&255)<<24-8*((b+e)%4);else if(65535>>2]=d[e>>>2];else c.push.apply(c,d);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<< 9 | 32-8*(c%4);a.length=h.ceil(c/4)},clone:function(){var a=j.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],d=0;d>>2]>>>24-8*(b%4)&255;d.push((e>>>4).toString(16));d.push((e&15).toString(16))}return d.join("")},parse:function(a){for(var c=a.length,d=[],b=0;b>>3]|=parseInt(a.substr(b, 10 | 2),16)<<24-4*(b%8);return new q.init(d,c/2)}},k=v.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var d=[],b=0;b>>2]>>>24-8*(b%4)&255));return d.join("")},parse:function(a){for(var c=a.length,d=[],b=0;b>>2]|=(a.charCodeAt(b)&255)<<24-8*(b%4);return new q.init(d,c)}},l=v.Utf8={stringify:function(a){try{return decodeURIComponent(escape(k.stringify(a)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(a){return k.parse(unescape(encodeURIComponent(a)))}}, 11 | x=t.BufferedBlockAlgorithm=j.extend({reset:function(){this._data=new q.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=l.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,d=c.words,b=c.sigBytes,e=this.blockSize,f=b/(4*e),f=a?h.ceil(f):h.max((f|0)-this._minBufferSize,0);a=f*e;b=h.min(4*a,b);if(a){for(var m=0;mk;){var l;a:{l=u;for(var x=h.sqrt(l),w=2;w<=x;w++)if(!(l%w)){l=!1;break a}l=!0}l&&(8>k&&(j[k]=v(h.pow(u,0.5))),q[k]=v(h.pow(u,1/3)),k++);u++}var a=[],f=f.SHA256=g.extend({_doReset:function(){this._hash=new t.init(j.slice(0))},_doProcessBlock:function(c,d){for(var b=this._hash.words,e=b[0],f=b[1],m=b[2],h=b[3],p=b[4],j=b[5],k=b[6],l=b[7],n=0;64>n;n++){if(16>n)a[n]= 15 | c[d+n]|0;else{var r=a[n-15],g=a[n-2];a[n]=((r<<25|r>>>7)^(r<<14|r>>>18)^r>>>3)+a[n-7]+((g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10)+a[n-16]}r=l+((p<<26|p>>>6)^(p<<21|p>>>11)^(p<<7|p>>>25))+(p&j^~p&k)+q[n]+a[n];g=((e<<30|e>>>2)^(e<<19|e>>>13)^(e<<10|e>>>22))+(e&f^e&m^f&m);l=k;k=j;j=p;p=h+r|0;h=m;m=f;f=e;e=r+g|0}b[0]=b[0]+e|0;b[1]=b[1]+f|0;b[2]=b[2]+m|0;b[3]=b[3]+h|0;b[4]=b[4]+p|0;b[5]=b[5]+j|0;b[6]=b[6]+k|0;b[7]=b[7]+l|0},_doFinalize:function(){var a=this._data,d=a.words,b=8*this._nDataBytes,e=8*a.sigBytes; 16 | d[e>>>5]|=128<<24-e%32;d[(e+64>>>9<<4)+14]=h.floor(b/4294967296);d[(e+64>>>9<<4)+15]=b;a.sigBytes=4*d.length;this._process();return this._hash},clone:function(){var a=g.clone.call(this);a._hash=this._hash.clone();return a}});s.SHA256=g._createHelper(f);s.HmacSHA256=g._createHmacHelper(f)})(Math); 17 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/sha512-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function(){function a(){return d.create.apply(d,arguments)}for(var n=CryptoJS,r=n.lib.Hasher,e=n.x64,d=e.Word,T=e.WordArray,e=n.algo,ea=[a(1116352408,3609767458),a(1899447441,602891725),a(3049323471,3964484399),a(3921009573,2173295548),a(961987163,4081628472),a(1508970993,3053834265),a(2453635748,2937671579),a(2870763221,3664609560),a(3624381080,2734883394),a(310598401,1164996542),a(607225278,1323610764),a(1426881987,3590304994),a(1925078388,4068182383),a(2162078206,991336113),a(2614888103,633803317), 8 | a(3248222580,3479774868),a(3835390401,2666613458),a(4022224774,944711139),a(264347078,2341262773),a(604807628,2007800933),a(770255983,1495990901),a(1249150122,1856431235),a(1555081692,3175218132),a(1996064986,2198950837),a(2554220882,3999719339),a(2821834349,766784016),a(2952996808,2566594879),a(3210313671,3203337956),a(3336571891,1034457026),a(3584528711,2466948901),a(113926993,3758326383),a(338241895,168717936),a(666307205,1188179964),a(773529912,1546045734),a(1294757372,1522805485),a(1396182291, 9 | 2643833823),a(1695183700,2343527390),a(1986661051,1014477480),a(2177026350,1206759142),a(2456956037,344077627),a(2730485921,1290863460),a(2820302411,3158454273),a(3259730800,3505952657),a(3345764771,106217008),a(3516065817,3606008344),a(3600352804,1432725776),a(4094571909,1467031594),a(275423344,851169720),a(430227734,3100823752),a(506948616,1363258195),a(659060556,3750685593),a(883997877,3785050280),a(958139571,3318307427),a(1322822218,3812723403),a(1537002063,2003034995),a(1747873779,3602036899), 10 | a(1955562222,1575990012),a(2024104815,1125592928),a(2227730452,2716904306),a(2361852424,442776044),a(2428436474,593698344),a(2756734187,3733110249),a(3204031479,2999351573),a(3329325298,3815920427),a(3391569614,3928383900),a(3515267271,566280711),a(3940187606,3454069534),a(4118630271,4000239992),a(116418474,1914138554),a(174292421,2731055270),a(289380356,3203993006),a(460393269,320620315),a(685471733,587496836),a(852142971,1086792851),a(1017036298,365543100),a(1126000580,2618297676),a(1288033470, 11 | 3409855158),a(1501505948,4234509866),a(1607167915,987167468),a(1816402316,1246189591)],v=[],w=0;80>w;w++)v[w]=a();e=e.SHA512=r.extend({_doReset:function(){this._hash=new T.init([new d.init(1779033703,4089235720),new d.init(3144134277,2227873595),new d.init(1013904242,4271175723),new d.init(2773480762,1595750129),new d.init(1359893119,2917565137),new d.init(2600822924,725511199),new d.init(528734635,4215389547),new d.init(1541459225,327033209)])},_doProcessBlock:function(a,d){for(var f=this._hash.words, 12 | F=f[0],e=f[1],n=f[2],r=f[3],G=f[4],H=f[5],I=f[6],f=f[7],w=F.high,J=F.low,X=e.high,K=e.low,Y=n.high,L=n.low,Z=r.high,M=r.low,$=G.high,N=G.low,aa=H.high,O=H.low,ba=I.high,P=I.low,ca=f.high,Q=f.low,k=w,g=J,z=X,x=K,A=Y,y=L,U=Z,B=M,l=$,h=N,R=aa,C=O,S=ba,D=P,V=ca,E=Q,m=0;80>m;m++){var s=v[m];if(16>m)var j=s.high=a[d+2*m]|0,b=s.low=a[d+2*m+1]|0;else{var j=v[m-15],b=j.high,p=j.low,j=(b>>>1|p<<31)^(b>>>8|p<<24)^b>>>7,p=(p>>>1|b<<31)^(p>>>8|b<<24)^(p>>>7|b<<25),u=v[m-2],b=u.high,c=u.low,u=(b>>>19|c<<13)^(b<< 13 | 3|c>>>29)^b>>>6,c=(c>>>19|b<<13)^(c<<3|b>>>29)^(c>>>6|b<<26),b=v[m-7],W=b.high,t=v[m-16],q=t.high,t=t.low,b=p+b.low,j=j+W+(b>>>0

>>0?1:0),b=b+c,j=j+u+(b>>>0>>0?1:0),b=b+t,j=j+q+(b>>>0>>0?1:0);s.high=j;s.low=b}var W=l&R^~l&S,t=h&C^~h&D,s=k&z^k&A^z&A,T=g&x^g&y^x&y,p=(k>>>28|g<<4)^(k<<30|g>>>2)^(k<<25|g>>>7),u=(g>>>28|k<<4)^(g<<30|k>>>2)^(g<<25|k>>>7),c=ea[m],fa=c.high,da=c.low,c=E+((h>>>14|l<<18)^(h>>>18|l<<14)^(h<<23|l>>>9)),q=V+((l>>>14|h<<18)^(l>>>18|h<<14)^(l<<23|h>>>9))+(c>>>0>>0?1: 14 | 0),c=c+t,q=q+W+(c>>>0>>0?1:0),c=c+da,q=q+fa+(c>>>0>>0?1:0),c=c+b,q=q+j+(c>>>0>>0?1:0),b=u+T,s=p+s+(b>>>0>>0?1:0),V=S,E=D,S=R,D=C,R=l,C=h,h=B+c|0,l=U+q+(h>>>0>>0?1:0)|0,U=A,B=y,A=z,y=x,z=k,x=g,g=c+b|0,k=q+s+(g>>>0>>0?1:0)|0}J=F.low=J+g;F.high=w+k+(J>>>0>>0?1:0);K=e.low=K+x;e.high=X+z+(K>>>0>>0?1:0);L=n.low=L+y;n.high=Y+A+(L>>>0>>0?1:0);M=r.low=M+B;r.high=Z+U+(M>>>0>>0?1:0);N=G.low=N+h;G.high=$+l+(N>>>0>>0?1:0);O=H.low=O+C;H.high=aa+R+(O>>>0>>0?1:0);P=I.low=P+D; 15 | I.high=ba+S+(P>>>0>>0?1:0);Q=f.low=Q+E;f.high=ca+V+(Q>>>0>>0?1:0)},_doFinalize:function(){var a=this._data,d=a.words,f=8*this._nDataBytes,e=8*a.sigBytes;d[e>>>5]|=128<<24-e%32;d[(e+128>>>10<<5)+30]=Math.floor(f/4294967296);d[(e+128>>>10<<5)+31]=f;a.sigBytes=4*d.length;this._process();return this._hash.toX32()},clone:function(){var a=r.clone.call(this);a._hash=this._hash.clone();return a},blockSize:32});n.SHA512=r._createHelper(e);n.HmacSHA512=r._createHmacHelper(e)})(); 16 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/pbkdf2.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function () { 8 | // Shortcuts 9 | var C = CryptoJS; 10 | var C_lib = C.lib; 11 | var Base = C_lib.Base; 12 | var WordArray = C_lib.WordArray; 13 | var C_algo = C.algo; 14 | var SHA1 = C_algo.SHA1; 15 | var HMAC = C_algo.HMAC; 16 | 17 | /** 18 | * Password-Based Key Derivation Function 2 algorithm. 19 | */ 20 | var PBKDF2 = C_algo.PBKDF2 = Base.extend({ 21 | /** 22 | * Configuration options. 23 | * 24 | * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) 25 | * @property {Hasher} hasher The hasher to use. Default: SHA1 26 | * @property {number} iterations The number of iterations to perform. Default: 1 27 | */ 28 | cfg: Base.extend({ 29 | keySize: 128/32, 30 | hasher: SHA1, 31 | iterations: 1 32 | }), 33 | 34 | /** 35 | * Initializes a newly created key derivation function. 36 | * 37 | * @param {Object} cfg (Optional) The configuration options to use for the derivation. 38 | * 39 | * @example 40 | * 41 | * var kdf = CryptoJS.algo.PBKDF2.create(); 42 | * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 }); 43 | * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 }); 44 | */ 45 | init: function (cfg) { 46 | this.cfg = this.cfg.extend(cfg); 47 | }, 48 | 49 | /** 50 | * Computes the Password-Based Key Derivation Function 2. 51 | * 52 | * @param {WordArray|string} password The password. 53 | * @param {WordArray|string} salt A salt. 54 | * 55 | * @return {WordArray} The derived key. 56 | * 57 | * @example 58 | * 59 | * var key = kdf.compute(password, salt); 60 | */ 61 | compute: function (password, salt) { 62 | // Shortcut 63 | var cfg = this.cfg; 64 | 65 | // Init HMAC 66 | var hmac = HMAC.create(cfg.hasher, password); 67 | 68 | // Initial values 69 | var derivedKey = WordArray.create(); 70 | var blockIndex = WordArray.create([0x00000001]); 71 | 72 | // Shortcuts 73 | var derivedKeyWords = derivedKey.words; 74 | var blockIndexWords = blockIndex.words; 75 | var keySize = cfg.keySize; 76 | var iterations = cfg.iterations; 77 | 78 | // Generate key 79 | while (derivedKeyWords.length < keySize) { 80 | var block = hmac.update(salt).finalize(blockIndex); 81 | hmac.reset(); 82 | 83 | // Shortcuts 84 | var blockWords = block.words; 85 | var blockWordsLength = blockWords.length; 86 | 87 | // Iterations 88 | var intermediate = block; 89 | for (var i = 1; i < iterations; i++) { 90 | intermediate = hmac.finalize(intermediate); 91 | hmac.reset(); 92 | 93 | // Shortcut 94 | var intermediateWords = intermediate.words; 95 | 96 | // XOR intermediate with block 97 | for (var j = 0; j < blockWordsLength; j++) { 98 | blockWords[j] ^= intermediateWords[j]; 99 | } 100 | } 101 | 102 | derivedKey.concat(block); 103 | blockIndexWords[0]++; 104 | } 105 | derivedKey.sigBytes = keySize * 4; 106 | 107 | return derivedKey; 108 | } 109 | }); 110 | 111 | /** 112 | * Computes the Password-Based Key Derivation Function 2. 113 | * 114 | * @param {WordArray|string} password The password. 115 | * @param {WordArray|string} salt A salt. 116 | * @param {Object} cfg (Optional) The configuration options to use for this computation. 117 | * 118 | * @return {WordArray} The derived key. 119 | * 120 | * @static 121 | * 122 | * @example 123 | * 124 | * var key = CryptoJS.PBKDF2(password, salt); 125 | * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8 }); 126 | * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8, iterations: 1000 }); 127 | */ 128 | C.PBKDF2 = function (password, salt, cfg) { 129 | return PBKDF2.create(cfg).compute(password, salt); 130 | }; 131 | }()); 132 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/rollups/hmac-sha1.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | var CryptoJS=CryptoJS||function(g,l){var e={},d=e.lib={},m=function(){},k=d.Base={extend:function(a){m.prototype=this;var c=new m;a&&c.mixIn(a);c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$super=this;return c},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, 8 | p=d.WordArray=k.extend({init:function(a,c){a=this.words=a||[];this.sigBytes=c!=l?c:4*a.length},toString:function(a){return(a||n).stringify(this)},concat:function(a){var c=this.words,q=a.words,f=this.sigBytes;a=a.sigBytes;this.clamp();if(f%4)for(var b=0;b>>2]|=(q[b>>>2]>>>24-8*(b%4)&255)<<24-8*((f+b)%4);else if(65535>>2]=q[b>>>2];else c.push.apply(c,q);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<< 9 | 32-8*(c%4);a.length=g.ceil(c/4)},clone:function(){var a=k.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],b=0;b>>2]>>>24-8*(f%4)&255;b.push((d>>>4).toString(16));b.push((d&15).toString(16))}return b.join("")},parse:function(a){for(var c=a.length,b=[],f=0;f>>3]|=parseInt(a.substr(f, 10 | 2),16)<<24-4*(f%8);return new p.init(b,c/2)}},j=b.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var b=[],f=0;f>>2]>>>24-8*(f%4)&255));return b.join("")},parse:function(a){for(var c=a.length,b=[],f=0;f>>2]|=(a.charCodeAt(f)&255)<<24-8*(f%4);return new p.init(b,c)}},h=b.Utf8={stringify:function(a){try{return decodeURIComponent(escape(j.stringify(a)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(a){return j.parse(unescape(encodeURIComponent(a)))}}, 11 | r=d.BufferedBlockAlgorithm=k.extend({reset:function(){this._data=new p.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=h.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,b=c.words,f=c.sigBytes,d=this.blockSize,e=f/(4*d),e=a?g.ceil(e):g.max((e|0)-this._minBufferSize,0);a=e*d;f=g.min(4*a,f);if(a){for(var k=0;ka;a++){if(16>a)m[a]=d[e+a]|0;else{var c=m[a-3]^m[a-8]^m[a-14]^m[a-16];m[a]=c<<1|c>>>31}c=(n<<5|n>>>27)+l+m[a];c=20>a?c+((j&h|~j&g)+1518500249):40>a?c+((j^h^g)+1859775393):60>a?c+((j&h|j&g|h&g)-1894007588):c+((j^h^ 15 | g)-899497514);l=g;g=h;h=j<<30|j>>>2;j=n;n=c}b[0]=b[0]+n|0;b[1]=b[1]+j|0;b[2]=b[2]+h|0;b[3]=b[3]+g|0;b[4]=b[4]+l|0},_doFinalize:function(){var d=this._data,e=d.words,b=8*this._nDataBytes,g=8*d.sigBytes;e[g>>>5]|=128<<24-g%32;e[(g+64>>>9<<4)+14]=Math.floor(b/4294967296);e[(g+64>>>9<<4)+15]=b;d.sigBytes=4*e.length;this._process();return this._hash},clone:function(){var e=d.clone.call(this);e._hash=this._hash.clone();return e}});g.SHA1=d._createHelper(l);g.HmacSHA1=d._createHmacHelper(l)})(); 16 | (function(){var g=CryptoJS,l=g.enc.Utf8;g.algo.HMAC=g.lib.Base.extend({init:function(e,d){e=this._hasher=new e.init;"string"==typeof d&&(d=l.parse(d));var g=e.blockSize,k=4*g;d.sigBytes>k&&(d=e.finalize(d));d.clamp();for(var p=this._oKey=d.clone(),b=this._iKey=d.clone(),n=p.words,j=b.words,h=0;h>>2]|=(d[e>>>2]>>>24-8*(e%4)&255)<<24-8*((b+e)%4);else if(65535>>2]=d[e>>>2];else c.push.apply(c,d);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<< 9 | 32-8*(c%4);a.length=g.ceil(c/4)},clone:function(){var a=m.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],d=0;d>>2]>>>24-8*(b%4)&255;d.push((e>>>4).toString(16));d.push((e&15).toString(16))}return d.join("")},parse:function(a){for(var c=a.length,d=[],b=0;b>>3]|=parseInt(a.substr(b, 10 | 2),16)<<24-4*(b%8);return new q.init(d,c/2)}},n=t.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var d=[],b=0;b>>2]>>>24-8*(b%4)&255));return d.join("")},parse:function(a){for(var c=a.length,d=[],b=0;b>>2]|=(a.charCodeAt(b)&255)<<24-8*(b%4);return new q.init(d,c)}},j=t.Utf8={stringify:function(a){try{return decodeURIComponent(escape(n.stringify(a)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(a){return n.parse(unescape(encodeURIComponent(a)))}}, 11 | w=k.BufferedBlockAlgorithm=m.extend({reset:function(){this._data=new q.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=j.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,d=c.words,b=c.sigBytes,e=this.blockSize,f=b/(4*e),f=a?g.ceil(f):g.max((f|0)-this._minBufferSize,0);a=f*e;b=g.min(4*a,b);if(a){for(var u=0;un;){var j;a:{j=s;for(var w=g.sqrt(j),v=2;v<=w;v++)if(!(j%v)){j=!1;break a}j=!0}j&&(8>n&&(m[n]=t(g.pow(s,0.5))),q[n]=t(g.pow(s,1/3)),n++);s++}var a=[],f=f.SHA256=h.extend({_doReset:function(){this._hash=new k.init(m.slice(0))},_doProcessBlock:function(c,d){for(var b=this._hash.words,e=b[0],f=b[1],g=b[2],k=b[3],h=b[4],l=b[5],m=b[6],n=b[7],p=0;64>p;p++){if(16>p)a[p]= 15 | c[d+p]|0;else{var j=a[p-15],r=a[p-2];a[p]=((j<<25|j>>>7)^(j<<14|j>>>18)^j>>>3)+a[p-7]+((r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10)+a[p-16]}j=n+((h<<26|h>>>6)^(h<<21|h>>>11)^(h<<7|h>>>25))+(h&l^~h&m)+q[p]+a[p];r=((e<<30|e>>>2)^(e<<19|e>>>13)^(e<<10|e>>>22))+(e&f^e&g^f&g);n=m;m=l;l=h;h=k+j|0;k=g;g=f;f=e;e=j+r|0}b[0]=b[0]+e|0;b[1]=b[1]+f|0;b[2]=b[2]+g|0;b[3]=b[3]+k|0;b[4]=b[4]+h|0;b[5]=b[5]+l|0;b[6]=b[6]+m|0;b[7]=b[7]+n|0},_doFinalize:function(){var a=this._data,d=a.words,b=8*this._nDataBytes,e=8*a.sigBytes; 16 | d[e>>>5]|=128<<24-e%32;d[(e+64>>>9<<4)+14]=g.floor(b/4294967296);d[(e+64>>>9<<4)+15]=b;a.sigBytes=4*d.length;this._process();return this._hash},clone:function(){var a=h.clone.call(this);a._hash=this._hash.clone();return a}});l.SHA256=h._createHelper(f);l.HmacSHA256=h._createHmacHelper(f)})(Math); 17 | (function(){var g=CryptoJS,l=g.lib.WordArray,f=g.algo,k=f.SHA256,f=f.SHA224=k.extend({_doReset:function(){this._hash=new l.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var f=k._doFinalize.call(this);f.sigBytes-=4;return f}});g.SHA224=k._createHelper(f);g.HmacSHA224=k._createHmacHelper(f)})(); 18 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/rollups/hmac-sha256.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | var CryptoJS=CryptoJS||function(h,s){var f={},g=f.lib={},q=function(){},m=g.Base={extend:function(a){q.prototype=this;var c=new q;a&&c.mixIn(a);c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$super=this;return c},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, 8 | r=g.WordArray=m.extend({init:function(a,c){a=this.words=a||[];this.sigBytes=c!=s?c:4*a.length},toString:function(a){return(a||k).stringify(this)},concat:function(a){var c=this.words,d=a.words,b=this.sigBytes;a=a.sigBytes;this.clamp();if(b%4)for(var e=0;e>>2]|=(d[e>>>2]>>>24-8*(e%4)&255)<<24-8*((b+e)%4);else if(65535>>2]=d[e>>>2];else c.push.apply(c,d);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<< 9 | 32-8*(c%4);a.length=h.ceil(c/4)},clone:function(){var a=m.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],d=0;d>>2]>>>24-8*(b%4)&255;d.push((e>>>4).toString(16));d.push((e&15).toString(16))}return d.join("")},parse:function(a){for(var c=a.length,d=[],b=0;b>>3]|=parseInt(a.substr(b, 10 | 2),16)<<24-4*(b%8);return new r.init(d,c/2)}},n=l.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var d=[],b=0;b>>2]>>>24-8*(b%4)&255));return d.join("")},parse:function(a){for(var c=a.length,d=[],b=0;b>>2]|=(a.charCodeAt(b)&255)<<24-8*(b%4);return new r.init(d,c)}},j=l.Utf8={stringify:function(a){try{return decodeURIComponent(escape(n.stringify(a)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(a){return n.parse(unescape(encodeURIComponent(a)))}}, 11 | u=g.BufferedBlockAlgorithm=m.extend({reset:function(){this._data=new r.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=j.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,d=c.words,b=c.sigBytes,e=this.blockSize,f=b/(4*e),f=a?h.ceil(f):h.max((f|0)-this._minBufferSize,0);a=f*e;b=h.min(4*a,b);if(a){for(var g=0;gn;){var j;a:{j=k;for(var u=h.sqrt(j),t=2;t<=u;t++)if(!(j%t)){j=!1;break a}j=!0}j&&(8>n&&(m[n]=l(h.pow(k,0.5))),r[n]=l(h.pow(k,1/3)),n++);k++}var a=[],f=f.SHA256=q.extend({_doReset:function(){this._hash=new g.init(m.slice(0))},_doProcessBlock:function(c,d){for(var b=this._hash.words,e=b[0],f=b[1],g=b[2],j=b[3],h=b[4],m=b[5],n=b[6],q=b[7],p=0;64>p;p++){if(16>p)a[p]= 15 | c[d+p]|0;else{var k=a[p-15],l=a[p-2];a[p]=((k<<25|k>>>7)^(k<<14|k>>>18)^k>>>3)+a[p-7]+((l<<15|l>>>17)^(l<<13|l>>>19)^l>>>10)+a[p-16]}k=q+((h<<26|h>>>6)^(h<<21|h>>>11)^(h<<7|h>>>25))+(h&m^~h&n)+r[p]+a[p];l=((e<<30|e>>>2)^(e<<19|e>>>13)^(e<<10|e>>>22))+(e&f^e&g^f&g);q=n;n=m;m=h;h=j+k|0;j=g;g=f;f=e;e=k+l|0}b[0]=b[0]+e|0;b[1]=b[1]+f|0;b[2]=b[2]+g|0;b[3]=b[3]+j|0;b[4]=b[4]+h|0;b[5]=b[5]+m|0;b[6]=b[6]+n|0;b[7]=b[7]+q|0},_doFinalize:function(){var a=this._data,d=a.words,b=8*this._nDataBytes,e=8*a.sigBytes; 16 | d[e>>>5]|=128<<24-e%32;d[(e+64>>>9<<4)+14]=h.floor(b/4294967296);d[(e+64>>>9<<4)+15]=b;a.sigBytes=4*d.length;this._process();return this._hash},clone:function(){var a=q.clone.call(this);a._hash=this._hash.clone();return a}});s.SHA256=q._createHelper(f);s.HmacSHA256=q._createHmacHelper(f)})(Math); 17 | (function(){var h=CryptoJS,s=h.enc.Utf8;h.algo.HMAC=h.lib.Base.extend({init:function(f,g){f=this._hasher=new f.init;"string"==typeof g&&(g=s.parse(g));var h=f.blockSize,m=4*h;g.sigBytes>m&&(g=f.finalize(g));g.clamp();for(var r=this._oKey=g.clone(),l=this._iKey=g.clone(),k=r.words,n=l.words,j=0;j>>2]|=(p[b>>>2]>>>24-8*(b%4)&255)<<24-8*((f+b)%4);else if(65535>>2]=p[b>>>2];else c.push.apply(c,p);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<< 9 | 32-8*(c%4);a.length=g.ceil(c/4)},clone:function(){var a=n.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],b=0;b>>2]>>>24-8*(f%4)&255;b.push((d>>>4).toString(16));b.push((d&15).toString(16))}return b.join("")},parse:function(a){for(var c=a.length,b=[],f=0;f>>3]|=parseInt(a.substr(f, 10 | 2),16)<<24-4*(f%8);return new q.init(b,c/2)}},k=b.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var b=[],f=0;f>>2]>>>24-8*(f%4)&255));return b.join("")},parse:function(a){for(var c=a.length,b=[],f=0;f>>2]|=(a.charCodeAt(f)&255)<<24-8*(f%4);return new q.init(b,c)}},h=b.Utf8={stringify:function(a){try{return decodeURIComponent(escape(k.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return k.parse(unescape(encodeURIComponent(a)))}}, 11 | u=d.BufferedBlockAlgorithm=n.extend({reset:function(){this._data=new q.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=h.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var b=this._data,d=b.words,f=b.sigBytes,l=this.blockSize,e=f/(4*l),e=a?g.ceil(e):g.max((e|0)-this._minBufferSize,0);a=e*l;f=g.min(4*a,f);if(a){for(var h=0;ha;a++){if(16>a)m[a]=d[e+a]|0;else{var c=m[a-3]^m[a-8]^m[a-14]^m[a-16];m[a]=c<<1|c>>>31}c=(l<<5|l>>>27)+j+m[a];c=20>a?c+((k&h|~k&g)+1518500249):40>a?c+((k^h^g)+1859775393):60>a?c+((k&h|k&g|h&g)-1894007588):c+((k^h^ 15 | g)-899497514);j=g;g=h;h=k<<30|k>>>2;k=l;l=c}b[0]=b[0]+l|0;b[1]=b[1]+k|0;b[2]=b[2]+h|0;b[3]=b[3]+g|0;b[4]=b[4]+j|0},_doFinalize:function(){var d=this._data,e=d.words,b=8*this._nDataBytes,l=8*d.sigBytes;e[l>>>5]|=128<<24-l%32;e[(l+64>>>9<<4)+14]=Math.floor(b/4294967296);e[(l+64>>>9<<4)+15]=b;d.sigBytes=4*e.length;this._process();return this._hash},clone:function(){var e=d.clone.call(this);e._hash=this._hash.clone();return e}});g.SHA1=d._createHelper(j);g.HmacSHA1=d._createHmacHelper(j)})(); 16 | (function(){var g=CryptoJS,j=g.enc.Utf8;g.algo.HMAC=g.lib.Base.extend({init:function(e,d){e=this._hasher=new e.init;"string"==typeof d&&(d=j.parse(d));var g=e.blockSize,n=4*g;d.sigBytes>n&&(d=e.finalize(d));d.clamp();for(var q=this._oKey=d.clone(),b=this._iKey=d.clone(),l=q.words,k=b.words,h=0;h>>2]|=(f[g>>>2]>>>24-8*(g%4)&255)<<24-8*((b+g)%4);else if(65535>>2]=f[g>>>2];else d.push.apply(d,f);this.sigBytes+=a;return this},clamp:function(){var a=this.words,d=this.sigBytes;a[d>>>2]&=4294967295<< 9 | 32-8*(d%4);a.length=j.ceil(d/4)},clone:function(){var a=m.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var d=[],f=0;f>>2]>>>24-8*(b%4)&255;f.push((g>>>4).toString(16));f.push((g&15).toString(16))}return f.join("")},parse:function(a){for(var d=a.length,f=[],b=0;b>>3]|=parseInt(a.substr(b, 10 | 2),16)<<24-4*(b%8);return new r.init(f,d/2)}},n=s.Latin1={stringify:function(a){var d=a.words;a=a.sigBytes;for(var f=[],b=0;b>>2]>>>24-8*(b%4)&255));return f.join("")},parse:function(a){for(var d=a.length,f=[],b=0;b>>2]|=(a.charCodeAt(b)&255)<<24-8*(b%4);return new r.init(f,d)}},h=s.Utf8={stringify:function(a){try{return decodeURIComponent(escape(n.stringify(a)))}catch(d){throw Error("Malformed UTF-8 data");}},parse:function(a){return n.parse(unescape(encodeURIComponent(a)))}}, 11 | u=e.BufferedBlockAlgorithm=m.extend({reset:function(){this._data=new r.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=h.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var d=this._data,f=d.words,b=d.sigBytes,g=this.blockSize,c=b/(4*g),c=a?j.ceil(c):j.max((c|0)-this._minBufferSize,0);a=c*g;b=j.min(4*a,b);if(a){for(var e=0;en;){var h;a:{h=l;for(var u=j.sqrt(h),t=2;t<=u;t++)if(!(h%t)){h=!1;break a}h=!0}h&&(8>n&&(m[n]=s(j.pow(l,0.5))),r[n]=s(j.pow(l,1/3)),n++);l++}var a=[],c=c.SHA256=p.extend({_doReset:function(){this._hash=new e.init(m.slice(0))},_doProcessBlock:function(d,f){for(var b=this._hash.words,g=b[0],c=b[1],e=b[2],j=b[3],h=b[4],p=b[5],m=b[6],n=b[7],q=0;64>q;q++){if(16>q)a[q]= 15 | d[f+q]|0;else{var k=a[q-15],l=a[q-2];a[q]=((k<<25|k>>>7)^(k<<14|k>>>18)^k>>>3)+a[q-7]+((l<<15|l>>>17)^(l<<13|l>>>19)^l>>>10)+a[q-16]}k=n+((h<<26|h>>>6)^(h<<21|h>>>11)^(h<<7|h>>>25))+(h&p^~h&m)+r[q]+a[q];l=((g<<30|g>>>2)^(g<<19|g>>>13)^(g<<10|g>>>22))+(g&c^g&e^c&e);n=m;m=p;p=h;h=j+k|0;j=e;e=c;c=g;g=k+l|0}b[0]=b[0]+g|0;b[1]=b[1]+c|0;b[2]=b[2]+e|0;b[3]=b[3]+j|0;b[4]=b[4]+h|0;b[5]=b[5]+p|0;b[6]=b[6]+m|0;b[7]=b[7]+n|0},_doFinalize:function(){var a=this._data,c=a.words,b=8*this._nDataBytes,e=8*a.sigBytes; 16 | c[e>>>5]|=128<<24-e%32;c[(e+64>>>9<<4)+14]=j.floor(b/4294967296);c[(e+64>>>9<<4)+15]=b;a.sigBytes=4*c.length;this._process();return this._hash},clone:function(){var a=p.clone.call(this);a._hash=this._hash.clone();return a}});k.SHA256=p._createHelper(c);k.HmacSHA256=p._createHmacHelper(c)})(Math); 17 | (function(){var j=CryptoJS,k=j.lib.WordArray,c=j.algo,e=c.SHA256,c=c.SHA224=e.extend({_doReset:function(){this._hash=new k.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var c=e._doFinalize.call(this);c.sigBytes-=4;return c}});j.SHA224=e._createHelper(c);j.HmacSHA224=e._createHmacHelper(c)})(); 18 | (function(){var j=CryptoJS,k=j.enc.Utf8;j.algo.HMAC=j.lib.Base.extend({init:function(c,e){c=this._hasher=new c.init;"string"==typeof e&&(e=k.parse(e));var j=c.blockSize,m=4*j;e.sigBytes>m&&(e=c.finalize(e));e.clamp();for(var r=this._oKey=e.clone(),s=this._iKey=e.clone(),l=r.words,n=s.words,h=0;h> %.2f%%' % (success / test_num * 100)) 188 | 189 | 190 | if __name__ == '__main__': 191 | main() 192 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/rollups/sha3.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | var CryptoJS=CryptoJS||function(v,p){var d={},u=d.lib={},r=function(){},f=u.Base={extend:function(a){r.prototype=this;var b=new r;a&&b.mixIn(a);b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)});b.init.prototype=b;b.$super=this;return b},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, 8 | s=u.WordArray=f.extend({init:function(a,b){a=this.words=a||[];this.sigBytes=b!=p?b:4*a.length},toString:function(a){return(a||y).stringify(this)},concat:function(a){var b=this.words,c=a.words,j=this.sigBytes;a=a.sigBytes;this.clamp();if(j%4)for(var n=0;n>>2]|=(c[n>>>2]>>>24-8*(n%4)&255)<<24-8*((j+n)%4);else if(65535>>2]=c[n>>>2];else b.push.apply(b,c);this.sigBytes+=a;return this},clamp:function(){var a=this.words,b=this.sigBytes;a[b>>>2]&=4294967295<< 9 | 32-8*(b%4);a.length=v.ceil(b/4)},clone:function(){var a=f.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var b=[],c=0;c>>2]>>>24-8*(j%4)&255;c.push((n>>>4).toString(16));c.push((n&15).toString(16))}return c.join("")},parse:function(a){for(var b=a.length,c=[],j=0;j>>3]|=parseInt(a.substr(j, 10 | 2),16)<<24-4*(j%8);return new s.init(c,b/2)}},e=x.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],j=0;j>>2]>>>24-8*(j%4)&255));return c.join("")},parse:function(a){for(var b=a.length,c=[],j=0;j>>2]|=(a.charCodeAt(j)&255)<<24-8*(j%4);return new s.init(c,b)}},q=x.Utf8={stringify:function(a){try{return decodeURIComponent(escape(e.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return e.parse(unescape(encodeURIComponent(a)))}}, 11 | t=u.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new s.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=q.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var b=this._data,c=b.words,j=b.sigBytes,n=this.blockSize,e=j/(4*n),e=a?v.ceil(e):v.max((e|0)-this._minBufferSize,0);a=e*n;j=v.min(4*a,j);if(a){for(var f=0;ft;t++){s[e+5*q]=(t+1)*(t+2)/2%64;var w=(2*e+3*q)%5,e=q%5,q=w}for(e=0;5>e;e++)for(q=0;5>q;q++)x[e+5*q]=q+5*((2*e+3*q)%5);e=1;for(q=0;24>q;q++){for(var a=w=t=0;7>a;a++){if(e&1){var b=(1<b?w^=1<e;e++)c[e]=f.create();d=d.SHA3=r.extend({cfg:r.cfg.extend({outputLength:512}),_doReset:function(){for(var a=this._state= 16 | [],b=0;25>b;b++)a[b]=new f.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(a,b){for(var e=this._state,f=this.blockSize/2,h=0;h>>24)&16711935|(l<<24|l>>>8)&4278255360,m=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360,g=e[h];g.high^=m;g.low^=l}for(f=0;24>f;f++){for(h=0;5>h;h++){for(var d=l=0,k=0;5>k;k++)g=e[h+5*k],l^=g.high,d^=g.low;g=c[h];g.high=l;g.low=d}for(h=0;5>h;h++){g=c[(h+4)%5];l=c[(h+1)%5];m=l.high;k=l.low;l=g.high^ 17 | (m<<1|k>>>31);d=g.low^(k<<1|m>>>31);for(k=0;5>k;k++)g=e[h+5*k],g.high^=l,g.low^=d}for(m=1;25>m;m++)g=e[m],h=g.high,g=g.low,k=s[m],32>k?(l=h<>>32-k,d=g<>>32-k):(l=g<>>64-k,d=h<>>64-k),g=c[x[m]],g.high=l,g.low=d;g=c[0];h=e[0];g.high=h.high;g.low=h.low;for(h=0;5>h;h++)for(k=0;5>k;k++)m=h+5*k,g=e[m],l=c[m],m=c[(h+1)%5+5*k],d=c[(h+2)%5+5*k],g.high=l.high^~m.high&d.high,g.low=l.low^~m.low&d.low;g=e[0];h=y[f];g.high^=h.high;g.low^=h.low}},_doFinalize:function(){var a=this._data, 18 | b=a.words,c=8*a.sigBytes,e=32*this.blockSize;b[c>>>5]|=1<<24-c%32;b[(v.ceil((c+1)/e)*e>>>5)-1]|=128;a.sigBytes=4*b.length;this._process();for(var a=this._state,b=this.cfg.outputLength/8,c=b/8,e=[],h=0;h>>24)&16711935|(f<<24|f>>>8)&4278255360,d=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360;e.push(d);e.push(f)}return new u.init(e,b)},clone:function(){for(var a=r.clone.call(this),b=a._state=this._state.slice(0),c=0;25>c;c++)b[c]=b[c].clone();return a}}); 19 | p.SHA3=r._createHelper(d);p.HmacSHA3=r._createHmacHelper(d)})(Math); 20 | -------------------------------------------------------------------------------- /14-闲鱼翻页JS破解/xianyu.js: -------------------------------------------------------------------------------- 1 | /* 2 | 闲鱼JS加密 实现翻页的破解 https://2.taobao.com/ 3 | 这个JS主要实现的是sign值的破解 4 | 下面的sign函数的参数是这样的: 5 | 'fdfc06fe9f241b4ef50ca6d6a3f836ff&1564497138768&12574478&{"spmPrefix":"a2170.7897990.6803272.","catId":"50025386","recTab":"shouji","trackName":"Feed3","abtag":"style_masonryLayouts_1.0_mamaAD","pageNumber":4}' 6 | */ 7 | 8 | function sign(e) { 9 | function t(e, t) { 10 | return e << t | e >>> 32 - t 11 | } 12 | 13 | function n(e, t) { 14 | var n, i, r, o, s; 15 | return r = 2147483648 & e, 16 | o = 2147483648 & t, 17 | s = (1073741823 & e) + (1073741823 & t), (n = 1073741824 & e) & (i = 1073741824 & t) ? 2147483648 ^ s ^ r ^ o : n | i ? 1073741824 & s ? 3221225472 ^ s ^ r ^ o : 1073741824 ^ s ^ r ^ o : s ^ r ^ o 18 | } 19 | 20 | function i(e, i, r, o, s, a, l) { 21 | return n(t(e = n(e, n(n(function (e, t, n) { 22 | return e & t | ~e & n 23 | }(i, r, o), s), l)), a), i) 24 | } 25 | 26 | function r(e, i, r, o, s, a, l) { 27 | return n(t(e = n(e, n(n(function (e, t, n) { 28 | return e & n | t & ~n 29 | }(i, r, o), s), l)), a), i) 30 | } 31 | 32 | function o(e, i, r, o, s, a, l) { 33 | return n(t(e = n(e, n(n(function (e, t, n) { 34 | return e ^ t ^ n 35 | }(i, r, o), s), l)), a), i) 36 | } 37 | 38 | function s(e, i, r, o, s, a, l) { 39 | return n(t(e = n(e, n(n(function (e, t, n) { 40 | return t ^ (e | ~n) 41 | }(i, r, o), s), l)), a), i) 42 | } 43 | 44 | function a(e) { 45 | var t, n = "", 46 | i = ""; 47 | for (t = 0; 3 >= t; t++) 48 | n += (i = "0" + (e >>> 8 * t & 255).toString(16)).substr(i.length - 2, 2); 49 | return n 50 | } 51 | var l, u, c, d, h, f, p, m, v, g; 52 | for (g = function (e) { 53 | for (var t, n = e.length, i = n + 8, r = 16 * ((i - i % 64) / 64 + 1), o = new Array(r - 1), s = 0, a = 0; n > a;) 54 | s = a % 4 * 8, 55 | o[t = (a - a % 4) / 4] = o[t] | e.charCodeAt(a) << s, 56 | a++; 57 | return s = a % 4 * 8, 58 | o[t = (a - a % 4) / 4] = o[t] | 128 << s, 59 | o[r - 2] = n << 3, 60 | o[r - 1] = n >>> 29, 61 | o 62 | }(e = function (e) { 63 | e = e.replace(/\r\n/g, "\n"); 64 | for (var t = "", n = 0; n < e.length; n++) { 65 | var i = e.charCodeAt(n); 66 | 128 > i ? t += String.fromCharCode(i) : i > 127 && 2048 > i ? (t += String.fromCharCode(i >> 6 | 192), 67 | t += String.fromCharCode(63 & i | 128)) : (t += String.fromCharCode(i >> 12 | 224), 68 | t += String.fromCharCode(i >> 6 & 63 | 128), 69 | t += String.fromCharCode(63 & i | 128)) 70 | } 71 | return t 72 | }(e)), 73 | f = 1732584193, 74 | p = 4023233417, 75 | m = 2562383102, 76 | v = 271733878, 77 | l = 0; l < g.length; l += 16) 78 | u = f, 79 | c = p, 80 | d = m, 81 | h = v, 82 | p = s(p = s(p = s(p = s(p = o(p = o(p = o(p = o(p = r(p = r(p = r(p = r(p = i(p = i(p = i(p = i(p, m = i(m, v = i(v, f = i(f, p, m, v, g[l + 0], 7, 3614090360), p, m, g[l + 1], 12, 3905402710), f, p, g[l + 2], 17, 606105819), v, f, g[l + 3], 22, 3250441966), m = i(m, v = i(v, f = i(f, p, m, v, g[l + 4], 7, 4118548399), p, m, g[l + 5], 12, 1200080426), f, p, g[l + 6], 17, 2821735955), v, f, g[l + 7], 22, 4249261313), m = i(m, v = i(v, f = i(f, p, m, v, g[l + 8], 7, 1770035416), p, m, g[l + 9], 12, 2336552879), f, p, g[l + 10], 17, 4294925233), v, f, g[l + 11], 22, 2304563134), m = i(m, v = i(v, f = i(f, p, m, v, g[l + 12], 7, 1804603682), p, m, g[l + 13], 12, 4254626195), f, p, g[l + 14], 17, 2792965006), v, f, g[l + 15], 22, 1236535329), m = r(m, v = r(v, f = r(f, p, m, v, g[l + 1], 5, 4129170786), p, m, g[l + 6], 9, 3225465664), f, p, g[l + 11], 14, 643717713), v, f, g[l + 0], 20, 3921069994), m = r(m, v = r(v, f = r(f, p, m, v, g[l + 5], 5, 3593408605), p, m, g[l + 10], 9, 38016083), f, p, g[l + 15], 14, 3634488961), v, f, g[l + 4], 20, 3889429448), m = r(m, v = r(v, f = r(f, p, m, v, g[l + 9], 5, 568446438), p, m, g[l + 14], 9, 3275163606), f, p, g[l + 3], 14, 4107603335), v, f, g[l + 8], 20, 1163531501), m = r(m, v = r(v, f = r(f, p, m, v, g[l + 13], 5, 2850285829), p, m, g[l + 2], 9, 4243563512), f, p, g[l + 7], 14, 1735328473), v, f, g[l + 12], 20, 2368359562), m = o(m, v = o(v, f = o(f, p, m, v, g[l + 5], 4, 4294588738), p, m, g[l + 8], 11, 2272392833), f, p, g[l + 11], 16, 1839030562), v, f, g[l + 14], 23, 4259657740), m = o(m, v = o(v, f = o(f, p, m, v, g[l + 1], 4, 2763975236), p, m, g[l + 4], 11, 1272893353), f, p, g[l + 7], 16, 4139469664), v, f, g[l + 10], 23, 3200236656), m = o(m, v = o(v, f = o(f, p, m, v, g[l + 13], 4, 681279174), p, m, g[l + 0], 11, 3936430074), f, p, g[l + 3], 16, 3572445317), v, f, g[l + 6], 23, 76029189), m = o(m, v = o(v, f = o(f, p, m, v, g[l + 9], 4, 3654602809), p, m, g[l + 12], 11, 3873151461), f, p, g[l + 15], 16, 530742520), v, f, g[l + 2], 23, 3299628645), m = s(m, v = s(v, f = s(f, p, m, v, g[l + 0], 6, 4096336452), p, m, g[l + 7], 10, 1126891415), f, p, g[l + 14], 15, 2878612391), v, f, g[l + 5], 21, 4237533241), m = s(m, v = s(v, f = s(f, p, m, v, g[l + 12], 6, 1700485571), p, m, g[l + 3], 10, 2399980690), f, p, g[l + 10], 15, 4293915773), v, f, g[l + 1], 21, 2240044497), m = s(m, v = s(v, f = s(f, p, m, v, g[l + 8], 6, 1873313359), p, m, g[l + 15], 10, 4264355552), f, p, g[l + 6], 15, 2734768916), v, f, g[l + 13], 21, 1309151649), m = s(m, v = s(v, f = s(f, p, m, v, g[l + 4], 6, 4149444226), p, m, g[l + 11], 10, 3174756917), f, p, g[l + 2], 15, 718787259), v, f, g[l + 9], 21, 3951481745), 83 | f = n(f, u), 84 | p = n(p, c), 85 | m = n(m, d), 86 | v = n(v, h); 87 | return (a(f) + a(p) + a(m) + a(v)).toLowerCase() 88 | } -------------------------------------------------------------------------------- /07-万创帮JS破解MD5/wcbchina.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @破解网站: https://www.wcbchina.com/login/login.html 3 | * @破解目标: 万创帮登陆过程 4 | * @破解提示: 5 | * 1. 抓包找到加密的字段 6 | * 2. 搜索字段属于的文件 7 | * 3. 找到加密的位置 打上断点 进行断点调试 8 | * 4。 找到js的核心加密的位置 然后将代码抠出来进行调试 9 | * 10 | */ 11 | 12 | 13 | 14 | function c(s) { 15 | return D(a(B(s), s.length * F)).toUpperCase() 16 | } 17 | function a(x, c) { 18 | x[c >> 5] |= 128 << c % 32, 19 | x[(c + 64 >>> 9 << 4) + 14] = c; 20 | for (var a = 1732584193, h = -271733879, b = -1732584194, d = 271733878, i = 0; i < x.length; i += 16) { 21 | var B = a 22 | , D = h 23 | , E = b 24 | , F = d; 25 | a = v(a, h, b, d, x[i + 0], 7, -680876936), 26 | d = v(d, a, h, b, x[i + 1], 12, -389564586), 27 | b = v(b, d, a, h, x[i + 2], 17, 606105819), 28 | h = v(h, b, d, a, x[i + 3], 22, -1044525330), 29 | a = v(a, h, b, d, x[i + 4], 7, -176418897), 30 | d = v(d, a, h, b, x[i + 5], 12, 1200080426), 31 | b = v(b, d, a, h, x[i + 6], 17, -1473231341), 32 | h = v(h, b, d, a, x[i + 7], 22, -45705983), 33 | a = v(a, h, b, d, x[i + 8], 7, 1770035416), 34 | d = v(d, a, h, b, x[i + 9], 12, -1958414417), 35 | b = v(b, d, a, h, x[i + 10], 17, -42063), 36 | h = v(h, b, d, a, x[i + 11], 22, -1990404162), 37 | a = v(a, h, b, d, x[i + 12], 7, 1804603682), 38 | d = v(d, a, h, b, x[i + 13], 12, -40341101), 39 | b = v(b, d, a, h, x[i + 14], 17, -1502002290), 40 | h = v(h, b, d, a, x[i + 15], 22, 1236535329), 41 | a = A(a, h, b, d, x[i + 1], 5, -165796510), 42 | d = A(d, a, h, b, x[i + 6], 9, -1069501632), 43 | b = A(b, d, a, h, x[i + 11], 14, 643717713), 44 | h = A(h, b, d, a, x[i + 0], 20, -373897302), 45 | a = A(a, h, b, d, x[i + 5], 5, -701558691), 46 | d = A(d, a, h, b, x[i + 10], 9, 38016083), 47 | b = A(b, d, a, h, x[i + 15], 14, -660478335), 48 | h = A(h, b, d, a, x[i + 4], 20, -405537848), 49 | a = A(a, h, b, d, x[i + 9], 5, 568446438), 50 | d = A(d, a, h, b, x[i + 14], 9, -1019803690), 51 | b = A(b, d, a, h, x[i + 3], 14, -187363961), 52 | h = A(h, b, d, a, x[i + 8], 20, 1163531501), 53 | a = A(a, h, b, d, x[i + 13], 5, -1444681467), 54 | d = A(d, a, h, b, x[i + 2], 9, -51403784), 55 | b = A(b, d, a, h, x[i + 7], 14, 1735328473), 56 | h = A(h, b, d, a, x[i + 12], 20, -1926607734), 57 | a = g(a, h, b, d, x[i + 5], 4, -378558), 58 | d = g(d, a, h, b, x[i + 8], 11, -2022574463), 59 | b = g(b, d, a, h, x[i + 11], 16, 1839030562), 60 | h = g(h, b, d, a, x[i + 14], 23, -35309556), 61 | a = g(a, h, b, d, x[i + 1], 4, -1530992060), 62 | d = g(d, a, h, b, x[i + 4], 11, 1272893353), 63 | b = g(b, d, a, h, x[i + 7], 16, -155497632), 64 | h = g(h, b, d, a, x[i + 10], 23, -1094730640), 65 | a = g(a, h, b, d, x[i + 13], 4, 681279174), 66 | d = g(d, a, h, b, x[i + 0], 11, -358537222), 67 | b = g(b, d, a, h, x[i + 3], 16, -722521979), 68 | h = g(h, b, d, a, x[i + 6], 23, 76029189), 69 | a = g(a, h, b, d, x[i + 9], 4, -640364487), 70 | d = g(d, a, h, b, x[i + 12], 11, -421815835), 71 | b = g(b, d, a, h, x[i + 15], 16, 530742520), 72 | h = g(h, b, d, a, x[i + 2], 23, -995338651), 73 | a = C(a, h, b, d, x[i + 0], 6, -198630844), 74 | d = C(d, a, h, b, x[i + 7], 10, 1126891415), 75 | b = C(b, d, a, h, x[i + 14], 15, -1416354905), 76 | h = C(h, b, d, a, x[i + 5], 21, -57434055), 77 | a = C(a, h, b, d, x[i + 12], 6, 1700485571), 78 | d = C(d, a, h, b, x[i + 3], 10, -1894986606), 79 | b = C(b, d, a, h, x[i + 10], 15, -1051523), 80 | h = C(h, b, d, a, x[i + 1], 21, -2054922799), 81 | a = C(a, h, b, d, x[i + 8], 6, 1873313359), 82 | d = C(d, a, h, b, x[i + 15], 10, -30611744), 83 | b = C(b, d, a, h, x[i + 6], 15, -1560198380), 84 | h = C(h, b, d, a, x[i + 13], 21, 1309151649), 85 | a = C(a, h, b, d, x[i + 4], 6, -145523070), 86 | d = C(d, a, h, b, x[i + 11], 10, -1120210379), 87 | b = C(b, d, a, h, x[i + 2], 15, 718787259), 88 | h = C(h, b, d, a, x[i + 9], 21, -343485551), 89 | a = y(a, B), 90 | h = y(h, D), 91 | b = y(b, E), 92 | d = y(d, F) 93 | } 94 | return Array(a, h, b, d) 95 | } 96 | function h(q, c, a, x, s, t) { 97 | return y(b(y(y(c, q), y(x, t)), s), a) 98 | } 99 | function v(c, a, v, d, x, s, t) { 100 | return h(a & v | ~a & d, c, a, x, s, t) 101 | } 102 | function A(c, a, v, d, x, s, t) { 103 | return h(a & d | v & ~d, c, a, x, s, t) 104 | } 105 | function g(c, a, v, d, x, s, t) { 106 | return h(a ^ v ^ d, c, a, x, s, t) 107 | } 108 | function C(c, a, v, d, x, s, t) { 109 | return h(v ^ (a | ~d), c, a, x, s, t) 110 | } 111 | function y(x, c) { 112 | var a = (65535 & x) + (65535 & c) 113 | , h = (x >> 16) + (c >> 16) + (a >> 16); 114 | return h << 16 | 65535 & a 115 | } 116 | function b(c, a) { 117 | return c << a | c >>> 32 - a 118 | } 119 | function B(c) { 120 | for (var a = Array(), h = (1 << F) - 1, i = 0; i < c.length * F; i += F) 121 | a[i >> 5] |= (c.charCodeAt(i / F) & h) << i % 32; 122 | return a 123 | } 124 | function D(c) { 125 | for (var a = E ? "0123456789ABCDEF" : "0123456789abcdef", h = "", i = 0; i < 4 * c.length; i++) 126 | h += a.charAt(c[i >> 2] >> i % 4 * 8 + 4 & 15) + a.charAt(c[i >> 2] >> i % 4 * 8 & 15); 127 | return h 128 | } 129 | var E = 0 130 | , F = 8; 131 | 132 | 133 | 134 | 135 | function hex_md5(pwd){ 136 | /** 137 | * c 函数是产生加密的函数 直接调用即可 138 | */ 139 | 140 | return c(pwd) 141 | } 142 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/sha256.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function (Math) { 8 | // Shortcuts 9 | var C = CryptoJS; 10 | var C_lib = C.lib; 11 | var WordArray = C_lib.WordArray; 12 | var Hasher = C_lib.Hasher; 13 | var C_algo = C.algo; 14 | 15 | // Initialization and round constants tables 16 | var H = []; 17 | var K = []; 18 | 19 | // Compute constants 20 | (function () { 21 | function isPrime(n) { 22 | var sqrtN = Math.sqrt(n); 23 | for (var factor = 2; factor <= sqrtN; factor++) { 24 | if (!(n % factor)) { 25 | return false; 26 | } 27 | } 28 | 29 | return true; 30 | } 31 | 32 | function getFractionalBits(n) { 33 | return ((n - (n | 0)) * 0x100000000) | 0; 34 | } 35 | 36 | var n = 2; 37 | var nPrime = 0; 38 | while (nPrime < 64) { 39 | if (isPrime(n)) { 40 | if (nPrime < 8) { 41 | H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2)); 42 | } 43 | K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3)); 44 | 45 | nPrime++; 46 | } 47 | 48 | n++; 49 | } 50 | }()); 51 | 52 | // Reusable object 53 | var W = []; 54 | 55 | /** 56 | * SHA-256 hash algorithm. 57 | */ 58 | var SHA256 = C_algo.SHA256 = Hasher.extend({ 59 | _doReset: function () { 60 | this._hash = new WordArray.init(H.slice(0)); 61 | }, 62 | 63 | _doProcessBlock: function (M, offset) { 64 | // Shortcut 65 | var H = this._hash.words; 66 | 67 | // Working variables 68 | var a = H[0]; 69 | var b = H[1]; 70 | var c = H[2]; 71 | var d = H[3]; 72 | var e = H[4]; 73 | var f = H[5]; 74 | var g = H[6]; 75 | var h = H[7]; 76 | 77 | // Computation 78 | for (var i = 0; i < 64; i++) { 79 | if (i < 16) { 80 | W[i] = M[offset + i] | 0; 81 | } else { 82 | var gamma0x = W[i - 15]; 83 | var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^ 84 | ((gamma0x << 14) | (gamma0x >>> 18)) ^ 85 | (gamma0x >>> 3); 86 | 87 | var gamma1x = W[i - 2]; 88 | var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^ 89 | ((gamma1x << 13) | (gamma1x >>> 19)) ^ 90 | (gamma1x >>> 10); 91 | 92 | W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]; 93 | } 94 | 95 | var ch = (e & f) ^ (~e & g); 96 | var maj = (a & b) ^ (a & c) ^ (b & c); 97 | 98 | var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22)); 99 | var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7) | (e >>> 25)); 100 | 101 | var t1 = h + sigma1 + ch + K[i] + W[i]; 102 | var t2 = sigma0 + maj; 103 | 104 | h = g; 105 | g = f; 106 | f = e; 107 | e = (d + t1) | 0; 108 | d = c; 109 | c = b; 110 | b = a; 111 | a = (t1 + t2) | 0; 112 | } 113 | 114 | // Intermediate hash value 115 | H[0] = (H[0] + a) | 0; 116 | H[1] = (H[1] + b) | 0; 117 | H[2] = (H[2] + c) | 0; 118 | H[3] = (H[3] + d) | 0; 119 | H[4] = (H[4] + e) | 0; 120 | H[5] = (H[5] + f) | 0; 121 | H[6] = (H[6] + g) | 0; 122 | H[7] = (H[7] + h) | 0; 123 | }, 124 | 125 | _doFinalize: function () { 126 | // Shortcuts 127 | var data = this._data; 128 | var dataWords = data.words; 129 | 130 | var nBitsTotal = this._nDataBytes * 8; 131 | var nBitsLeft = data.sigBytes * 8; 132 | 133 | // Add padding 134 | dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); 135 | dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); 136 | dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; 137 | data.sigBytes = dataWords.length * 4; 138 | 139 | // Hash final blocks 140 | this._process(); 141 | 142 | // Return final computed hash 143 | return this._hash; 144 | }, 145 | 146 | clone: function () { 147 | var clone = Hasher.clone.call(this); 148 | clone._hash = this._hash.clone(); 149 | 150 | return clone; 151 | } 152 | }); 153 | 154 | /** 155 | * Shortcut function to the hasher's object interface. 156 | * 157 | * @param {WordArray|string} message The message to hash. 158 | * 159 | * @return {WordArray} The hash. 160 | * 161 | * @static 162 | * 163 | * @example 164 | * 165 | * var hash = CryptoJS.SHA256('message'); 166 | * var hash = CryptoJS.SHA256(wordArray); 167 | */ 168 | C.SHA256 = Hasher._createHelper(SHA256); 169 | 170 | /** 171 | * Shortcut function to the HMAC's object interface. 172 | * 173 | * @param {WordArray|string} message The message to hash. 174 | * @param {WordArray|string} key The secret key. 175 | * 176 | * @return {WordArray} The HMAC. 177 | * 178 | * @static 179 | * 180 | * @example 181 | * 182 | * var hmac = CryptoJS.HmacSHA256(message, key); 183 | */ 184 | C.HmacSHA256 = Hasher._createHmacHelper(SHA256); 185 | }(Math)); 186 | -------------------------------------------------------------------------------- /22-马蜂窝机票JS破解/mafengwo.js: -------------------------------------------------------------------------------- 1 | function s(t, e) { 2 | var i = (65535 & t) + (65535 & e); 3 | return (t >> 16) + (e >> 16) + (i >> 16) << 16 | 65535 & i 4 | } 5 | 6 | function r(t, e, i, a, r, n) { 7 | return s(function (t, e) { 8 | return t << e | t >>> 32 - e 9 | }(s(s(e, t), s(a, n)), r), i) 10 | } 11 | 12 | function n(t, e, i, a, s, n, o) { 13 | return r(e & i | ~e & a, t, e, s, n, o) 14 | } 15 | 16 | function o(t, e, i, a, s, n, o) { 17 | return r(e & a | i & ~a, t, e, s, n, o) 18 | } 19 | 20 | function c(t, e, i, a, s, n, o) { 21 | return r(e ^ i ^ a, t, e, s, n, o) 22 | } 23 | 24 | function l(t, e, i, a, s, n, o) { 25 | return r(i ^ (e | ~a), t, e, s, n, o) 26 | } 27 | 28 | function d(t, e) { 29 | var i, a, r, d, u; 30 | t[e >> 5] |= 128 << e % 32, 31 | t[14 + (e + 64 >>> 9 << 4)] = e; 32 | var p = 1732584193, 33 | f = -271733879, 34 | h = -1732584194, 35 | m = 271733878; 36 | for (i = 0; i < t.length; i += 16) 37 | a = p, 38 | r = f, 39 | d = h, 40 | u = m, 41 | f = l(f = l(f = l(f = l(f = c(f = c(f = c(f = c(f = o(f = o(f = o(f = o(f = n(f = n(f = n(f = n(f, h = n(h, m = n(m, p = n(p, f, h, m, t[i], 7, -680876936), f, h, t[i + 1], 12, -389564586), p, f, t[i + 2], 17, 606105819), m, p, t[i + 3], 22, -1044525330), h = n(h, m = n(m, p = n(p, f, h, m, t[i + 4], 7, -176418897), f, h, t[i + 5], 12, 1200080426), p, f, t[i + 6], 17, -1473231341), m, p, t[i + 7], 22, -45705983), h = n(h, m = n(m, p = n(p, f, h, m, t[i + 8], 7, 1770035416), f, h, t[i + 9], 12, -1958414417), p, f, t[i + 10], 17, -42063), m, p, t[i + 11], 22, -1990404162), h = n(h, m = n(m, p = n(p, f, h, m, t[i + 12], 7, 1804603682), f, h, t[i + 13], 12, -40341101), p, f, t[i + 14], 17, -1502002290), m, p, t[i + 15], 22, 1236535329), h = o(h, m = o(m, p = o(p, f, h, m, t[i + 1], 5, -165796510), f, h, t[i + 6], 9, -1069501632), p, f, t[i + 11], 14, 643717713), m, p, t[i], 20, -373897302), h = o(h, m = o(m, p = o(p, f, h, m, t[i + 5], 5, -701558691), f, h, t[i + 10], 9, 38016083), p, f, t[i + 15], 14, -660478335), m, p, t[i + 4], 20, -405537848), h = o(h, m = o(m, p = o(p, f, h, m, t[i + 9], 5, 568446438), f, h, t[i + 14], 9, -1019803690), p, f, t[i + 3], 14, -187363961), m, p, t[i + 8], 20, 1163531501), h = o(h, m = o(m, p = o(p, f, h, m, t[i + 13], 5, -1444681467), f, h, t[i + 2], 9, -51403784), p, f, t[i + 7], 14, 1735328473), m, p, t[i + 12], 20, -1926607734), h = c(h, m = c(m, p = c(p, f, h, m, t[i + 5], 4, -378558), f, h, t[i + 8], 11, -2022574463), p, f, t[i + 11], 16, 1839030562), m, p, t[i + 14], 23, -35309556), h = c(h, m = c(m, p = c(p, f, h, m, t[i + 1], 4, -1530992060), f, h, t[i + 4], 11, 1272893353), p, f, t[i + 7], 16, -155497632), m, p, t[i + 10], 23, -1094730640), h = c(h, m = c(m, p = c(p, f, h, m, t[i + 13], 4, 681279174), f, h, t[i], 11, -358537222), p, f, t[i + 3], 16, -722521979), m, p, t[i + 6], 23, 76029189), h = c(h, m = c(m, p = c(p, f, h, m, t[i + 9], 4, -640364487), f, h, t[i + 12], 11, -421815835), p, f, t[i + 15], 16, 530742520), m, p, t[i + 2], 23, -995338651), h = l(h, m = l(m, p = l(p, f, h, m, t[i], 6, -198630844), f, h, t[i + 7], 10, 1126891415), p, f, t[i + 14], 15, -1416354905), m, p, t[i + 5], 21, -57434055), h = l(h, m = l(m, p = l(p, f, h, m, t[i + 12], 6, 1700485571), f, h, t[i + 3], 10, -1894986606), p, f, t[i + 10], 15, -1051523), m, p, t[i + 1], 21, -2054922799), h = l(h, m = l(m, p = l(p, f, h, m, t[i + 8], 6, 1873313359), f, h, t[i + 15], 10, -30611744), p, f, t[i + 6], 15, -1560198380), m, p, t[i + 13], 21, 1309151649), h = l(h, m = l(m, p = l(p, f, h, m, t[i + 4], 6, -145523070), f, h, t[i + 11], 10, -1120210379), p, f, t[i + 2], 15, 718787259), m, p, t[i + 9], 21, -343485551), 42 | p = s(p, a), 43 | f = s(f, r), 44 | h = s(h, d), 45 | m = s(m, u); 46 | return [p, f, h, m] 47 | } 48 | 49 | function u(t) { 50 | var e, i = "", 51 | a = 32 * t.length; 52 | for (e = 0; e < a; e += 8) 53 | i += String.fromCharCode(t[e >> 5] >>> e % 32 & 255); 54 | return i 55 | } 56 | 57 | function p(t) { 58 | var e, i = []; 59 | for (i[(t.length >> 2) - 1] = void 0, 60 | e = 0; e < i.length; e += 1) 61 | i[e] = 0; 62 | var a = 8 * t.length; 63 | for (e = 0; e < a; e += 8) 64 | i[e >> 5] |= (255 & t.charCodeAt(e / 8)) << e % 32; 65 | return i 66 | } 67 | 68 | function f(t) { 69 | var e, i, a = ""; 70 | for (i = 0; i < t.length; i += 1) 71 | e = t.charCodeAt(i), 72 | a += "0123456789abcdef".charAt(e >>> 4 & 15) + "0123456789abcdef".charAt(15 & e); 73 | return a 74 | } 75 | 76 | function h(t) { 77 | return unescape(encodeURIComponent(t)) 78 | } 79 | 80 | function m(t) { 81 | return function (t) { 82 | return u(d(p(t), 8 * t.length)) 83 | }(h(t)) 84 | } 85 | 86 | function v(t, e) { 87 | return function (t, e) { 88 | var i, a, s = p(t), 89 | r = [], 90 | n = []; 91 | for (r[15] = n[15] = void 0, 92 | s.length > 16 && (s = d(s, 8 * t.length)), 93 | i = 0; i < 16; i += 1) 94 | r[i] = 909522486 ^ s[i], 95 | n[i] = 1549556828 ^ s[i]; 96 | return a = d(r.concat(p(e)), 512 + 8 * e.length), 97 | u(d(n.concat(a), 640)) 98 | }(h(t), h(e)) 99 | } 100 | 101 | function sign(t) { 102 | 103 | return f(m(t)) 104 | 105 | } 106 | 107 | function rkey(t) { 108 | var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "-", 109 | n = (Math.random().toString(16) + "000000000").substr(2, 8); 110 | return t ? e + n.substr(0, 4) + e + n.substr(4, 4) : n 111 | } 112 | 113 | function signKey() { 114 | var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "-"; 115 | return rkey(!1, t) + rkey(!0, t) + rkey(!0, t) + rkey(!1, t) 116 | } 117 | 118 | function sign_signkey_tfb_req_id(){ 119 | var s = '' 120 | return { 121 | sign: sign("BJSCAN19bcd8102e70f596a367cb29deeec2a72019-11-0319bcd8102e70f596a367cb29deeec2a7"), 122 | signkey: signKey(""), 123 | tfb_req_id: signKey("") 124 | } 125 | } -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/rollups/md5.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | var CryptoJS=CryptoJS||function(s,p){var m={},l=m.lib={},n=function(){},r=l.Base={extend:function(b){n.prototype=this;var h=new n;b&&h.mixIn(b);h.hasOwnProperty("init")||(h.init=function(){h.$super.init.apply(this,arguments)});h.init.prototype=h;h.$super=this;return h},create:function(){var b=this.extend();b.init.apply(b,arguments);return b},init:function(){},mixIn:function(b){for(var h in b)b.hasOwnProperty(h)&&(this[h]=b[h]);b.hasOwnProperty("toString")&&(this.toString=b.toString)},clone:function(){return this.init.prototype.extend(this)}}, 8 | q=l.WordArray=r.extend({init:function(b,h){b=this.words=b||[];this.sigBytes=h!=p?h:4*b.length},toString:function(b){return(b||t).stringify(this)},concat:function(b){var h=this.words,a=b.words,j=this.sigBytes;b=b.sigBytes;this.clamp();if(j%4)for(var g=0;g>>2]|=(a[g>>>2]>>>24-8*(g%4)&255)<<24-8*((j+g)%4);else if(65535>>2]=a[g>>>2];else h.push.apply(h,a);this.sigBytes+=b;return this},clamp:function(){var b=this.words,h=this.sigBytes;b[h>>>2]&=4294967295<< 9 | 32-8*(h%4);b.length=s.ceil(h/4)},clone:function(){var b=r.clone.call(this);b.words=this.words.slice(0);return b},random:function(b){for(var h=[],a=0;a>>2]>>>24-8*(j%4)&255;g.push((k>>>4).toString(16));g.push((k&15).toString(16))}return g.join("")},parse:function(b){for(var a=b.length,g=[],j=0;j>>3]|=parseInt(b.substr(j, 10 | 2),16)<<24-4*(j%8);return new q.init(g,a/2)}},a=v.Latin1={stringify:function(b){var a=b.words;b=b.sigBytes;for(var g=[],j=0;j>>2]>>>24-8*(j%4)&255));return g.join("")},parse:function(b){for(var a=b.length,g=[],j=0;j>>2]|=(b.charCodeAt(j)&255)<<24-8*(j%4);return new q.init(g,a)}},u=v.Utf8={stringify:function(b){try{return decodeURIComponent(escape(a.stringify(b)))}catch(g){throw Error("Malformed UTF-8 data");}},parse:function(b){return a.parse(unescape(encodeURIComponent(b)))}}, 11 | g=l.BufferedBlockAlgorithm=r.extend({reset:function(){this._data=new q.init;this._nDataBytes=0},_append:function(b){"string"==typeof b&&(b=u.parse(b));this._data.concat(b);this._nDataBytes+=b.sigBytes},_process:function(b){var a=this._data,g=a.words,j=a.sigBytes,k=this.blockSize,m=j/(4*k),m=b?s.ceil(m):s.max((m|0)-this._minBufferSize,0);b=m*k;j=s.min(4*b,j);if(b){for(var l=0;l>>32-j)+k}function m(a,k,b,h,l,j,m){a=a+(k&h|b&~h)+l+m;return(a<>>32-j)+k}function l(a,k,b,h,l,j,m){a=a+(k^b^h)+l+m;return(a<>>32-j)+k}function n(a,k,b,h,l,j,m){a=a+(b^(k|~h))+l+m;return(a<>>32-j)+k}for(var r=CryptoJS,q=r.lib,v=q.WordArray,t=q.Hasher,q=r.algo,a=[],u=0;64>u;u++)a[u]=4294967296*s.abs(s.sin(u+1))|0;q=q.MD5=t.extend({_doReset:function(){this._hash=new v.init([1732584193,4023233417,2562383102,271733878])}, 15 | _doProcessBlock:function(g,k){for(var b=0;16>b;b++){var h=k+b,w=g[h];g[h]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360}var b=this._hash.words,h=g[k+0],w=g[k+1],j=g[k+2],q=g[k+3],r=g[k+4],s=g[k+5],t=g[k+6],u=g[k+7],v=g[k+8],x=g[k+9],y=g[k+10],z=g[k+11],A=g[k+12],B=g[k+13],C=g[k+14],D=g[k+15],c=b[0],d=b[1],e=b[2],f=b[3],c=p(c,d,e,f,h,7,a[0]),f=p(f,c,d,e,w,12,a[1]),e=p(e,f,c,d,j,17,a[2]),d=p(d,e,f,c,q,22,a[3]),c=p(c,d,e,f,r,7,a[4]),f=p(f,c,d,e,s,12,a[5]),e=p(e,f,c,d,t,17,a[6]),d=p(d,e,f,c,u,22,a[7]), 16 | c=p(c,d,e,f,v,7,a[8]),f=p(f,c,d,e,x,12,a[9]),e=p(e,f,c,d,y,17,a[10]),d=p(d,e,f,c,z,22,a[11]),c=p(c,d,e,f,A,7,a[12]),f=p(f,c,d,e,B,12,a[13]),e=p(e,f,c,d,C,17,a[14]),d=p(d,e,f,c,D,22,a[15]),c=m(c,d,e,f,w,5,a[16]),f=m(f,c,d,e,t,9,a[17]),e=m(e,f,c,d,z,14,a[18]),d=m(d,e,f,c,h,20,a[19]),c=m(c,d,e,f,s,5,a[20]),f=m(f,c,d,e,y,9,a[21]),e=m(e,f,c,d,D,14,a[22]),d=m(d,e,f,c,r,20,a[23]),c=m(c,d,e,f,x,5,a[24]),f=m(f,c,d,e,C,9,a[25]),e=m(e,f,c,d,q,14,a[26]),d=m(d,e,f,c,v,20,a[27]),c=m(c,d,e,f,B,5,a[28]),f=m(f,c, 17 | d,e,j,9,a[29]),e=m(e,f,c,d,u,14,a[30]),d=m(d,e,f,c,A,20,a[31]),c=l(c,d,e,f,s,4,a[32]),f=l(f,c,d,e,v,11,a[33]),e=l(e,f,c,d,z,16,a[34]),d=l(d,e,f,c,C,23,a[35]),c=l(c,d,e,f,w,4,a[36]),f=l(f,c,d,e,r,11,a[37]),e=l(e,f,c,d,u,16,a[38]),d=l(d,e,f,c,y,23,a[39]),c=l(c,d,e,f,B,4,a[40]),f=l(f,c,d,e,h,11,a[41]),e=l(e,f,c,d,q,16,a[42]),d=l(d,e,f,c,t,23,a[43]),c=l(c,d,e,f,x,4,a[44]),f=l(f,c,d,e,A,11,a[45]),e=l(e,f,c,d,D,16,a[46]),d=l(d,e,f,c,j,23,a[47]),c=n(c,d,e,f,h,6,a[48]),f=n(f,c,d,e,u,10,a[49]),e=n(e,f,c,d, 18 | C,15,a[50]),d=n(d,e,f,c,s,21,a[51]),c=n(c,d,e,f,A,6,a[52]),f=n(f,c,d,e,q,10,a[53]),e=n(e,f,c,d,y,15,a[54]),d=n(d,e,f,c,w,21,a[55]),c=n(c,d,e,f,v,6,a[56]),f=n(f,c,d,e,D,10,a[57]),e=n(e,f,c,d,t,15,a[58]),d=n(d,e,f,c,B,21,a[59]),c=n(c,d,e,f,r,6,a[60]),f=n(f,c,d,e,z,10,a[61]),e=n(e,f,c,d,j,15,a[62]),d=n(d,e,f,c,x,21,a[63]);b[0]=b[0]+c|0;b[1]=b[1]+d|0;b[2]=b[2]+e|0;b[3]=b[3]+f|0},_doFinalize:function(){var a=this._data,k=a.words,b=8*this._nDataBytes,h=8*a.sigBytes;k[h>>>5]|=128<<24-h%32;var l=s.floor(b/ 19 | 4294967296);k[(h+64>>>9<<4)+15]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360;k[(h+64>>>9<<4)+14]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360;a.sigBytes=4*(k.length+1);this._process();a=this._hash;k=a.words;for(b=0;4>b;b++)h=k[b],k[b]=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360;return a},clone:function(){var a=t.clone.call(this);a._hash=this._hash.clone();return a}});r.MD5=t._createHelper(q);r.HmacMD5=t._createHmacHelper(q)})(Math); 20 | 21 | 22 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/rollups/hmac-sha3.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | var CryptoJS=CryptoJS||function(q,f){var c={},d=c.lib={},v=function(){},s=d.Base={extend:function(a){v.prototype=this;var b=new v;a&&b.mixIn(a);b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)});b.init.prototype=b;b.$super=this;return b},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, 8 | t=d.WordArray=s.extend({init:function(a,b){a=this.words=a||[];this.sigBytes=b!=f?b:4*a.length},toString:function(a){return(a||r).stringify(this)},concat:function(a){var b=this.words,e=a.words,j=this.sigBytes;a=a.sigBytes;this.clamp();if(j%4)for(var p=0;p>>2]|=(e[p>>>2]>>>24-8*(p%4)&255)<<24-8*((j+p)%4);else if(65535>>2]=e[p>>>2];else b.push.apply(b,e);this.sigBytes+=a;return this},clamp:function(){var a=this.words,b=this.sigBytes;a[b>>>2]&=4294967295<< 9 | 32-8*(b%4);a.length=q.ceil(b/4)},clone:function(){var a=s.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var b=[],e=0;e>>2]>>>24-8*(j%4)&255;e.push((p>>>4).toString(16));e.push((p&15).toString(16))}return e.join("")},parse:function(a){for(var b=a.length,e=[],j=0;j>>3]|=parseInt(a.substr(j, 10 | 2),16)<<24-4*(j%8);return new t.init(e,b/2)}},g=w.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var e=[],j=0;j>>2]>>>24-8*(j%4)&255));return e.join("")},parse:function(a){for(var b=a.length,e=[],j=0;j>>2]|=(a.charCodeAt(j)&255)<<24-8*(j%4);return new t.init(e,b)}},n=w.Utf8={stringify:function(a){try{return decodeURIComponent(escape(g.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return g.parse(unescape(encodeURIComponent(a)))}}, 11 | u=d.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new t.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=n.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var b=this._data,e=b.words,j=b.sigBytes,p=this.blockSize,c=j/(4*p),c=a?q.ceil(c):q.max((c|0)-this._minBufferSize,0);a=c*p;j=q.min(4*a,j);if(a){for(var g=0;gu;u++){t[g+5*n]=(u+1)*(u+2)/2%64;var x=(2*g+3*n)%5,g=n%5,n=x}for(g=0;5>g;g++)for(n=0;5>n;n++)w[g+5*n]=n+5*((2*g+3*n)%5);g=1;for(n=0;24>n;n++){for(var a=x=u=0;7>a;a++){if(g&1){var b=(1<b?x^=1<g;g++)e[g]=s.create();c=c.SHA3=v.extend({cfg:v.cfg.extend({outputLength:512}),_doReset:function(){for(var a=this._state= 16 | [],b=0;25>b;b++)a[b]=new s.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(a,b){for(var c=this._state,g=this.blockSize/2,k=0;k>>24)&16711935|(d<<24|d>>>8)&4278255360,l=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,h=c[k];h.high^=l;h.low^=d}for(g=0;24>g;g++){for(k=0;5>k;k++){for(var f=d=0,m=0;5>m;m++)h=c[k+5*m],d^=h.high,f^=h.low;h=e[k];h.high=d;h.low=f}for(k=0;5>k;k++){h=e[(k+4)%5];d=e[(k+1)%5];l=d.high;m=d.low;d=h.high^ 17 | (l<<1|m>>>31);f=h.low^(m<<1|l>>>31);for(m=0;5>m;m++)h=c[k+5*m],h.high^=d,h.low^=f}for(l=1;25>l;l++)h=c[l],k=h.high,h=h.low,m=t[l],32>m?(d=k<>>32-m,f=h<>>32-m):(d=h<>>64-m,f=k<>>64-m),h=e[w[l]],h.high=d,h.low=f;h=e[0];k=c[0];h.high=k.high;h.low=k.low;for(k=0;5>k;k++)for(m=0;5>m;m++)l=k+5*m,h=c[l],d=e[l],l=e[(k+1)%5+5*m],f=e[(k+2)%5+5*m],h.high=d.high^~l.high&f.high,h.low=d.low^~l.low&f.low;h=c[0];k=r[g];h.high^=k.high;h.low^=k.low}},_doFinalize:function(){var a=this._data, 18 | b=a.words,c=8*a.sigBytes,e=32*this.blockSize;b[c>>>5]|=1<<24-c%32;b[(q.ceil((c+1)/e)*e>>>5)-1]|=128;a.sigBytes=4*b.length;this._process();for(var a=this._state,b=this.cfg.outputLength/8,c=b/8,e=[],g=0;g>>24)&16711935|(l<<24|l>>>8)&4278255360,f=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360;e.push(f);e.push(l)}return new d.init(e,b)},clone:function(){for(var a=v.clone.call(this),b=a._state=this._state.slice(0),c=0;25>c;c++)b[c]=b[c].clone();return a}}); 19 | f.SHA3=v._createHelper(c);f.HmacSHA3=v._createHmacHelper(c)})(Math); 20 | (function(){var q=CryptoJS,f=q.enc.Utf8;q.algo.HMAC=q.lib.Base.extend({init:function(c,d){c=this._hasher=new c.init;"string"==typeof d&&(d=f.parse(d));var q=c.blockSize,s=4*q;d.sigBytes>s&&(d=c.finalize(d));d.clamp();for(var t=this._oKey=d.clone(),w=this._iKey=d.clone(),r=t.words,g=w.words,n=0;n>>2]|=(a[h>>>2]>>>24-8*(h%4)&255)<<24-8*((l+h)%4);else if(65535>>2]=a[h>>>2];else j.push.apply(j,a);this.sigBytes+=b;return this},clamp:function(){var b=this.words,j=this.sigBytes;b[j>>>2]&=4294967295<< 9 | 32-8*(j%4);b.length=q.ceil(j/4)},clone:function(){var b=t.clone.call(this);b.words=this.words.slice(0);return b},random:function(b){for(var j=[],a=0;a>>2]>>>24-8*(l%4)&255;h.push((m>>>4).toString(16));h.push((m&15).toString(16))}return h.join("")},parse:function(b){for(var a=b.length,h=[],l=0;l>>3]|=parseInt(b.substr(l, 10 | 2),16)<<24-4*(l%8);return new n.init(h,a/2)}},a=v.Latin1={stringify:function(b){var a=b.words;b=b.sigBytes;for(var h=[],l=0;l>>2]>>>24-8*(l%4)&255));return h.join("")},parse:function(b){for(var a=b.length,h=[],l=0;l>>2]|=(b.charCodeAt(l)&255)<<24-8*(l%4);return new n.init(h,a)}},s=v.Utf8={stringify:function(b){try{return decodeURIComponent(escape(a.stringify(b)))}catch(h){throw Error("Malformed UTF-8 data");}},parse:function(b){return a.parse(unescape(encodeURIComponent(b)))}}, 11 | h=g.BufferedBlockAlgorithm=t.extend({reset:function(){this._data=new n.init;this._nDataBytes=0},_append:function(b){"string"==typeof b&&(b=s.parse(b));this._data.concat(b);this._nDataBytes+=b.sigBytes},_process:function(b){var a=this._data,h=a.words,l=a.sigBytes,m=this.blockSize,k=l/(4*m),k=b?q.ceil(k):q.max((k|0)-this._minBufferSize,0);b=k*m;l=q.min(4*b,l);if(b){for(var g=0;g>>32-l)+m}function k(a,m,b,j,g,l,k){a=a+(m&j|b&~j)+g+k;return(a<>>32-l)+m}function g(a,m,b,j,g,l,k){a=a+(m^b^j)+g+k;return(a<>>32-l)+m}function p(a,g,b,j,k,l,p){a=a+(b^(g|~j))+k+p;return(a<>>32-l)+g}for(var t=CryptoJS,n=t.lib,v=n.WordArray,u=n.Hasher,n=t.algo,a=[],s=0;64>s;s++)a[s]=4294967296*q.abs(q.sin(s+1))|0;n=n.MD5=u.extend({_doReset:function(){this._hash=new v.init([1732584193,4023233417,2562383102,271733878])}, 15 | _doProcessBlock:function(h,m){for(var b=0;16>b;b++){var j=m+b,n=h[j];h[j]=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360}var b=this._hash.words,j=h[m+0],n=h[m+1],l=h[m+2],q=h[m+3],t=h[m+4],s=h[m+5],u=h[m+6],v=h[m+7],w=h[m+8],x=h[m+9],y=h[m+10],z=h[m+11],A=h[m+12],B=h[m+13],C=h[m+14],D=h[m+15],c=b[0],d=b[1],e=b[2],f=b[3],c=r(c,d,e,f,j,7,a[0]),f=r(f,c,d,e,n,12,a[1]),e=r(e,f,c,d,l,17,a[2]),d=r(d,e,f,c,q,22,a[3]),c=r(c,d,e,f,t,7,a[4]),f=r(f,c,d,e,s,12,a[5]),e=r(e,f,c,d,u,17,a[6]),d=r(d,e,f,c,v,22,a[7]), 16 | c=r(c,d,e,f,w,7,a[8]),f=r(f,c,d,e,x,12,a[9]),e=r(e,f,c,d,y,17,a[10]),d=r(d,e,f,c,z,22,a[11]),c=r(c,d,e,f,A,7,a[12]),f=r(f,c,d,e,B,12,a[13]),e=r(e,f,c,d,C,17,a[14]),d=r(d,e,f,c,D,22,a[15]),c=k(c,d,e,f,n,5,a[16]),f=k(f,c,d,e,u,9,a[17]),e=k(e,f,c,d,z,14,a[18]),d=k(d,e,f,c,j,20,a[19]),c=k(c,d,e,f,s,5,a[20]),f=k(f,c,d,e,y,9,a[21]),e=k(e,f,c,d,D,14,a[22]),d=k(d,e,f,c,t,20,a[23]),c=k(c,d,e,f,x,5,a[24]),f=k(f,c,d,e,C,9,a[25]),e=k(e,f,c,d,q,14,a[26]),d=k(d,e,f,c,w,20,a[27]),c=k(c,d,e,f,B,5,a[28]),f=k(f,c, 17 | d,e,l,9,a[29]),e=k(e,f,c,d,v,14,a[30]),d=k(d,e,f,c,A,20,a[31]),c=g(c,d,e,f,s,4,a[32]),f=g(f,c,d,e,w,11,a[33]),e=g(e,f,c,d,z,16,a[34]),d=g(d,e,f,c,C,23,a[35]),c=g(c,d,e,f,n,4,a[36]),f=g(f,c,d,e,t,11,a[37]),e=g(e,f,c,d,v,16,a[38]),d=g(d,e,f,c,y,23,a[39]),c=g(c,d,e,f,B,4,a[40]),f=g(f,c,d,e,j,11,a[41]),e=g(e,f,c,d,q,16,a[42]),d=g(d,e,f,c,u,23,a[43]),c=g(c,d,e,f,x,4,a[44]),f=g(f,c,d,e,A,11,a[45]),e=g(e,f,c,d,D,16,a[46]),d=g(d,e,f,c,l,23,a[47]),c=p(c,d,e,f,j,6,a[48]),f=p(f,c,d,e,v,10,a[49]),e=p(e,f,c,d, 18 | C,15,a[50]),d=p(d,e,f,c,s,21,a[51]),c=p(c,d,e,f,A,6,a[52]),f=p(f,c,d,e,q,10,a[53]),e=p(e,f,c,d,y,15,a[54]),d=p(d,e,f,c,n,21,a[55]),c=p(c,d,e,f,w,6,a[56]),f=p(f,c,d,e,D,10,a[57]),e=p(e,f,c,d,u,15,a[58]),d=p(d,e,f,c,B,21,a[59]),c=p(c,d,e,f,t,6,a[60]),f=p(f,c,d,e,z,10,a[61]),e=p(e,f,c,d,l,15,a[62]),d=p(d,e,f,c,x,21,a[63]);b[0]=b[0]+c|0;b[1]=b[1]+d|0;b[2]=b[2]+e|0;b[3]=b[3]+f|0},_doFinalize:function(){var a=this._data,g=a.words,b=8*this._nDataBytes,j=8*a.sigBytes;g[j>>>5]|=128<<24-j%32;var k=q.floor(b/ 19 | 4294967296);g[(j+64>>>9<<4)+15]=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360;g[(j+64>>>9<<4)+14]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360;a.sigBytes=4*(g.length+1);this._process();a=this._hash;g=a.words;for(b=0;4>b;b++)j=g[b],g[b]=(j<<8|j>>>24)&16711935|(j<<24|j>>>8)&4278255360;return a},clone:function(){var a=u.clone.call(this);a._hash=this._hash.clone();return a}});t.MD5=u._createHelper(n);t.HmacMD5=u._createHmacHelper(n)})(Math); 20 | (function(){var q=CryptoJS,r=q.enc.Utf8;q.algo.HMAC=q.lib.Base.extend({init:function(k,g){k=this._hasher=new k.init;"string"==typeof g&&(g=r.parse(g));var p=k.blockSize,q=4*p;g.sigBytes>q&&(g=k.finalize(g));g.clamp();for(var n=this._oKey=g.clone(),v=this._iKey=g.clone(),u=n.words,a=v.words,s=0;s