superchats
Version:
SuperChats is a premium library with unique features that control Whatsapp functions. With Superchats you can build service bots, multiservice chats or any system that uses whatsapp
1 lines • 8.46 kB
JavaScript
;const a46_0x20c9c8=a46_0x4aba;(function(_0x10bd9a,_0x13798b){const _0x51474e=a46_0x4aba,_0x17e162=_0x10bd9a();while(!![]){try{const _0x1fd68e=-parseInt(_0x51474e(0x119))/0x1+-parseInt(_0x51474e(0x103))/0x2+-parseInt(_0x51474e(0x101))/0x3+-parseInt(_0x51474e(0x118))/0x4+-parseInt(_0x51474e(0xfe))/0x5*(-parseInt(_0x51474e(0x100))/0x6)+parseInt(_0x51474e(0xfc))/0x7+parseInt(_0x51474e(0x112))/0x8;if(_0x1fd68e===_0x13798b)break;else _0x17e162['push'](_0x17e162['shift']());}catch(_0x1a5b00){_0x17e162['push'](_0x17e162['shift']());}}}(a46_0x1f47,0xb9929));var __createBinding=this&&this[a46_0x20c9c8(0xe3)]||(Object[a46_0x20c9c8(0x116)]?function(_0x29eb7c,_0x49a799,_0x13eda4,_0x208fec){const _0x2daf87=a46_0x20c9c8;if(_0x208fec===undefined)_0x208fec=_0x13eda4;var _0x542ec9=Object['getOwnPropertyDescriptor'](_0x49a799,_0x13eda4);(!_0x542ec9||(_0x2daf87(0xf4)in _0x542ec9?!_0x49a799[_0x2daf87(0x106)]:_0x542ec9[_0x2daf87(0x10a)]||_0x542ec9[_0x2daf87(0x108)]))&&(_0x542ec9={'enumerable':!![],'get':function(){return _0x49a799[_0x13eda4];}}),Object[_0x2daf87(0xe0)](_0x29eb7c,_0x208fec,_0x542ec9);}:function(_0x4ed4fc,_0x39f07b,_0x3cde7d,_0x471894){if(_0x471894===undefined)_0x471894=_0x3cde7d;_0x4ed4fc[_0x471894]=_0x39f07b[_0x3cde7d];}),__setModuleDefault=this&&this[a46_0x20c9c8(0x10c)]||(Object[a46_0x20c9c8(0x116)]?function(_0x2b0f49,_0x152f46){const _0x55a2ae=a46_0x20c9c8;Object[_0x55a2ae(0xe0)](_0x2b0f49,'default',{'enumerable':!![],'value':_0x152f46});}:function(_0xd1e8ff,_0x146d97){const _0x55a8c6=a46_0x20c9c8;_0xd1e8ff[_0x55a8c6(0xf6)]=_0x146d97;}),__importStar=this&&this['__importStar']||function(_0x2dfce7){const _0x47def2=a46_0x20c9c8;if(_0x2dfce7&&_0x2dfce7[_0x47def2(0x106)])return _0x2dfce7;var _0x4e340d={};if(_0x2dfce7!=null){for(var _0x3deebd in _0x2dfce7)if(_0x3deebd!=='default'&&Object['prototype'][_0x47def2(0x10d)]['call'](_0x2dfce7,_0x3deebd))__createBinding(_0x4e340d,_0x2dfce7,_0x3deebd);}return __setModuleDefault(_0x4e340d,_0x2dfce7),_0x4e340d;};Object[a46_0x20c9c8(0xe0)](exports,a46_0x20c9c8(0x106),{'value':!![]}),exports[a46_0x20c9c8(0xf8)]=exports[a46_0x20c9c8(0xe2)]=exports[a46_0x20c9c8(0xfd)]=exports[a46_0x20c9c8(0xef)]=exports[a46_0x20c9c8(0xf3)]=exports[a46_0x20c9c8(0xf0)]=exports[a46_0x20c9c8(0x110)]=void 0x0;const Internal=__importStar(require('.')),util=__importStar(require(a46_0x20c9c8(0xe9))),webcrypto=(globalThis===null||globalThis===void 0x0?void 0x0:globalThis[a46_0x20c9c8(0xf0)])||require(a46_0x20c9c8(0xe4));function a46_0x4aba(_0x156175,_0x1c8dd1){const _0x1f47e7=a46_0x1f47();return a46_0x4aba=function(_0x4aba59,_0x5069d3){_0x4aba59=_0x4aba59-0xe0;let _0x34b03d=_0x1f47e7[_0x4aba59];return _0x34b03d;},a46_0x4aba(_0x156175,_0x1c8dd1);}class Crypto{constructor(_0x4fe39f){const _0x2d9986=a46_0x20c9c8;this['_curve']=new Internal['AsyncCurve'](),this[_0x2d9986(0xf9)]=_0x4fe39f||webcrypto;}set[a46_0x20c9c8(0xe5)](_0x18d97d){const _0x2ce4f7=a46_0x20c9c8;this[_0x2ce4f7(0xf9)]=_0x18d97d;}set[a46_0x20c9c8(0xfa)](_0x5e88d0){const _0x25320f=a46_0x20c9c8;this['_curve'][_0x25320f(0xfa)]=_0x5e88d0;}['getRandomBytes'](_0x34f822){const _0x267927=a46_0x20c9c8,_0x232602=new Uint8Array(_0x34f822);return this[_0x267927(0xf9)][_0x267927(0x102)](_0x232602),util[_0x267927(0xec)](_0x232602);}async['encrypt'](_0x40190d,_0x57e01c,_0x3d0d9e){const _0x1ce8a6=a46_0x20c9c8,_0x12e795=await this[_0x1ce8a6(0xf9)][_0x1ce8a6(0xe7)]['importKey']('raw',_0x40190d,{'name':'AES-CBC'},![],['encrypt']);return this['_webcrypto'][_0x1ce8a6(0xe7)][_0x1ce8a6(0xe6)]({'name':_0x1ce8a6(0x107),'iv':new Uint8Array(_0x3d0d9e)},_0x12e795,_0x57e01c);}async[a46_0x20c9c8(0xe1)](_0x22ff86,_0x5e00b9,_0x5db33c){const _0x4f5fec=a46_0x20c9c8,_0x51b6d3=await this['_webcrypto'][_0x4f5fec(0xe7)][_0x4f5fec(0x104)](_0x4f5fec(0x115),_0x22ff86,{'name':_0x4f5fec(0x107)},![],[_0x4f5fec(0xe1)]);return this[_0x4f5fec(0xf9)]['subtle'][_0x4f5fec(0xe1)]({'name':_0x4f5fec(0x107),'iv':new Uint8Array(_0x5db33c)},_0x51b6d3,_0x5e00b9);}async[a46_0x20c9c8(0x113)](_0x84b02d,_0xa0c3c7){const _0x7bf165=a46_0x20c9c8,_0x51a271=await this[_0x7bf165(0xf9)][_0x7bf165(0xe7)][_0x7bf165(0x104)](_0x7bf165(0x115),_0x84b02d,{'name':'HMAC','hash':{'name':_0x7bf165(0xeb)}},![],['sign']);try{return this[_0x7bf165(0xf9)][_0x7bf165(0xe7)][_0x7bf165(0x113)]({'name':'HMAC','hash':_0x7bf165(0xeb)},_0x51a271,_0xa0c3c7);}catch(_0x36144b){throw _0x36144b;}}async[a46_0x20c9c8(0xe8)](_0x14b0e2){const _0x121435=a46_0x20c9c8;return this[_0x121435(0xf9)][_0x121435(0xe7)][_0x121435(0x10b)]({'name':_0x121435(0xf7)},_0x14b0e2);}async[a46_0x20c9c8(0xfd)](_0x101683,_0x11e08a,_0x2e91e5){const _0x53c101=a46_0x20c9c8;if(typeof _0x2e91e5===_0x53c101(0x109))throw new Error(_0x53c101(0x111));const _0x123b06=await Internal[_0x53c101(0xf0)][_0x53c101(0x113)](_0x11e08a,_0x101683),_0x18eaad=new ArrayBuffer(_0x2e91e5[_0x53c101(0xee)]+0x1+0x20),_0x3f690b=new Uint8Array(_0x18eaad);_0x3f690b['set'](new Uint8Array(_0x2e91e5),0x20),_0x3f690b[_0x3f690b[_0x53c101(0x117)]-0x1]=0x1;const _0x169216=await Internal[_0x53c101(0xf0)][_0x53c101(0x113)](_0x123b06,_0x18eaad[_0x53c101(0xed)](0x20));_0x3f690b['set'](new Uint8Array(_0x169216)),_0x3f690b[_0x3f690b[_0x53c101(0x117)]-0x1]=0x2;const _0x55ec67=await Internal[_0x53c101(0xf0)][_0x53c101(0x113)](_0x123b06,_0x18eaad);_0x3f690b[_0x53c101(0xea)](new Uint8Array(_0x55ec67)),_0x3f690b[_0x3f690b['length']-0x1]=0x3;const _0x333241=await Internal[_0x53c101(0xf0)][_0x53c101(0x113)](_0x123b06,_0x18eaad);return[_0x169216,_0x55ec67,_0x333241];}[a46_0x20c9c8(0xf2)](_0x21bcf1){const _0x774837=a46_0x20c9c8;return!_0x21bcf1&&(_0x21bcf1=this[_0x774837(0xfb)](0x20)),this[_0x774837(0xf5)][_0x774837(0xf2)](_0x21bcf1);}[a46_0x20c9c8(0x114)](_0x5d8560,_0x1bde87){const _0x1e8b2c=a46_0x20c9c8;return this[_0x1e8b2c(0xf5)][_0x1e8b2c(0x114)](_0x5d8560,_0x1bde87);}[a46_0x20c9c8(0xff)](_0x336338,_0x13e332){const _0x5a240b=a46_0x20c9c8;return this['_curve'][_0x5a240b(0xff)](_0x336338,_0x13e332);}[a46_0x20c9c8(0x10e)](_0x3c12b3,_0x5e2106,_0x4f3d8b){const _0x12ee4a=a46_0x20c9c8;return this[_0x12ee4a(0xf5)]['Ed25519Verify'](_0x3c12b3,_0x5e2106,_0x4f3d8b);}}exports[a46_0x20c9c8(0x110)]=Crypto,exports[a46_0x20c9c8(0xf0)]=new Crypto();function setWebCrypto(_0xac8a38){exports['crypto']['webcrypto']=_0xac8a38;}exports['setWebCrypto']=setWebCrypto;function a46_0x1f47(){const _0x16bf47=['curve','getRandomBytes','7008526kiIhNG','HKDF','310wlPkIZ','Ed25519Sign','105456UNeKjp','1542675wGJIvV','getRandomValues','521174FdrCgK','importKey','Invalid\x20HKDF\x20info','__esModule','AES-CBC','configurable','string','writable','digest','__setModuleDefault','hasOwnProperty','Ed25519Verify','Got\x20salt\x20of\x20incorrect\x20length','Crypto','HKDF\x20info\x20was\x20a\x20string','7725592hFuPPz','sign','ECDHE','raw','create','length','679824GvezSW','1351756SdwXOz','defineProperty','decrypt','verifyMAC','__createBinding','../../lib/msrcrypto','webcrypto','encrypt','subtle','hash','../helpers','set','SHA-256','uint8ArrayToArrayBuffer','slice','byteLength','setCurve','crypto','Bad\x20MAC','createKeyPair','setWebCrypto','get','_curve','default','SHA-512','calculateMAC','_webcrypto'];a46_0x1f47=function(){return _0x16bf47;};return a46_0x1f47();}function setCurve(_0x56218e){const _0x513c05=a46_0x20c9c8;exports['crypto'][_0x513c05(0xfa)]=_0x56218e;}exports['setCurve']=setCurve;function HKDF(_0x2c0230,_0x3bf197,_0x4d5511){const _0x24a702=a46_0x20c9c8;if(_0x3bf197[_0x24a702(0xee)]!=0x20)throw new Error(_0x24a702(0x10f));const _0x59468a=util['binaryStringToArrayBuffer'](_0x4d5511);if(!_0x59468a)throw new Error(_0x24a702(0x105));return exports['crypto'][_0x24a702(0xfd)](_0x2c0230,_0x3bf197,_0x59468a);}exports[a46_0x20c9c8(0xfd)]=HKDF;async function verifyMAC(_0x1a3c70,_0x35a316,_0x44531b,_0x400390){const _0x566d0a=a46_0x20c9c8,_0x1bb133=await exports[_0x566d0a(0xf0)][_0x566d0a(0x113)](_0x35a316,_0x1a3c70);if(_0x44531b[_0x566d0a(0xee)]!=_0x400390||_0x1bb133[_0x566d0a(0xee)]<_0x400390)throw new Error('Bad\x20MAC\x20length');const _0x23b07e=new Uint8Array(_0x1bb133),_0x2f0baf=new Uint8Array(_0x44531b);let _0x35a4a3=0x0;for(let _0x4de873=0x0;_0x4de873<_0x44531b[_0x566d0a(0xee)];++_0x4de873){_0x35a4a3=_0x35a4a3|_0x23b07e[_0x4de873]^_0x2f0baf[_0x4de873];}if(_0x35a4a3!==0x0)throw new Error(_0x566d0a(0xf1));}exports[a46_0x20c9c8(0xe2)]=verifyMAC;function calculateMAC(_0x34a320,_0x58d248){const _0x1cb077=a46_0x20c9c8;return exports[_0x1cb077(0xf0)][_0x1cb077(0x113)](_0x34a320,_0x58d248);}exports[a46_0x20c9c8(0xf8)]=calculateMAC;