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 • 5.36 kB
JavaScript
function a29_0x15ed(_0x43f3a9,_0x54c1f1){const _0x2632a9=a29_0x2632();return a29_0x15ed=function(_0x15ed2b,_0xe62dbb){_0x15ed2b=_0x15ed2b-0x1e3;let _0xc52ccf=_0x2632a9[_0x15ed2b];return _0xc52ccf;},a29_0x15ed(_0x43f3a9,_0x54c1f1);}const a29_0x1bd7aa=a29_0x15ed;(function(_0x140f55,_0x3ee5b6){const _0x1c7025=a29_0x15ed,_0x5e69c3=_0x140f55();while(!![]){try{const _0x4abd0e=parseInt(_0x1c7025(0x1e3))/0x1+parseInt(_0x1c7025(0x208))/0x2*(parseInt(_0x1c7025(0x1f0))/0x3)+-parseInt(_0x1c7025(0x1ed))/0x4+-parseInt(_0x1c7025(0x1fb))/0x5*(-parseInt(_0x1c7025(0x20e))/0x6)+parseInt(_0x1c7025(0x1e5))/0x7+parseInt(_0x1c7025(0x203))/0x8+-parseInt(_0x1c7025(0x1f2))/0x9;if(_0x4abd0e===_0x3ee5b6)break;else _0x5e69c3['push'](_0x5e69c3['shift']());}catch(_0x3f46a6){_0x5e69c3['push'](_0x5e69c3['shift']());}}}(a29_0x2632,0x6a6ab));const queue_job=require(a29_0x1bd7aa(0x1e7)),SenderKeyMessage=require(a29_0x1bd7aa(0x20c)),crypto=require('super-libsignal/src/crypto');function a29_0x2632(){const _0x30f092=['1103464fkyDDa','getCipherKey','removeSenderMessageKey','setSenderChainKey','loadSenderKey','173076fxGgSP','No\x20session\x20to\x20encrypt\x20message','getIteration','No\x20SenderKeyRecord\x20found\x20for\x20encryption','./sender_key_message','serialize','4517436YRglzU','encrypt','queueJob','getIv','senderKeyStore','58044TCfOvC','No\x20SenderKeyRecord\x20found\x20for\x20decryption','3968146DwYppr','getSenderMessageKey','./queue_job','getCipherText','Over\x202000\x20messages\x20into\x20the\x20future!','getKeyId','addSenderMessageKey','getSenderKey','809676DcJPvV','from','string','15VRyfPI','getSigningKeyPrivate','11791341OYtlHy','storeSenderKey','senderKeyName','No\x20session\x20found\x20to\x20decrypt\x20message','getPlainText','getSigningKeyPublic','hasSenderMessageKey','Received\x20message\x20with\x20old\x20counter:\x20','verifySignature','5TlFSRk','getSenderKeyState','InvalidMessageException','exports','base64','decrypt','getSenderChainKey','getNext'];a29_0x2632=function(){return _0x30f092;};return a29_0x2632();}class GroupCipher{constructor(_0x2aa197,_0x4565a7){const _0x30e9d9=a29_0x1bd7aa;this[_0x30e9d9(0x212)]=_0x2aa197,this['senderKeyName']=_0x4565a7;}[a29_0x1bd7aa(0x210)](_0x2cc5d3){const _0x4e3374=a29_0x1bd7aa;return queue_job(this[_0x4e3374(0x1f4)]['toString'](),_0x2cc5d3);}async[a29_0x1bd7aa(0x20f)](_0x1eed9c){const _0x239599=a29_0x1bd7aa;return await this[_0x239599(0x210)](async()=>{const _0x22432=_0x239599,_0x374ee0=await this[_0x22432(0x212)][_0x22432(0x207)](this[_0x22432(0x1f4)]);if(!_0x374ee0)throw new Error(_0x22432(0x20b));const _0x2ce7f3=_0x374ee0['getSenderKeyState']();if(!_0x2ce7f3)throw new Error(_0x22432(0x209));const _0x31b891=_0x2ce7f3[_0x22432(0x201)]()['getIteration'](),_0x387629=this[_0x22432(0x1ec)](_0x2ce7f3,_0x31b891===0x0?0x0:_0x31b891+0x1),_0x58a8cc=await this[_0x22432(0x1e8)](_0x387629['getIv'](),_0x387629[_0x22432(0x204)](),_0x1eed9c),_0x1ebc8e=new SenderKeyMessage(_0x2ce7f3[_0x22432(0x1ea)](),_0x387629[_0x22432(0x20a)](),_0x58a8cc,_0x2ce7f3[_0x22432(0x1f1)]());return await this[_0x22432(0x212)][_0x22432(0x1f3)](this[_0x22432(0x1f4)],_0x374ee0),_0x1ebc8e[_0x22432(0x20d)]();});}async[a29_0x1bd7aa(0x200)](_0x4f1839){const _0x119fcf=a29_0x1bd7aa;return await this[_0x119fcf(0x210)](async()=>{const _0xdbca1e=_0x119fcf,_0x287a0a=await this[_0xdbca1e(0x212)][_0xdbca1e(0x207)](this['senderKeyName']);if(!_0x287a0a)throw new Error(_0xdbca1e(0x1e4));const _0x34cf28=new SenderKeyMessage(null,null,null,null,_0x4f1839),_0x152d62=_0x287a0a[_0xdbca1e(0x1fc)](_0x34cf28['getKeyId']());if(!_0x152d62)throw new Error(_0xdbca1e(0x1f5));_0x34cf28[_0xdbca1e(0x1fa)](_0x152d62[_0xdbca1e(0x1f7)]());const _0x2ccbab=this[_0xdbca1e(0x1ec)](_0x152d62,_0x34cf28[_0xdbca1e(0x20a)]()),_0x5880cd=await this[_0xdbca1e(0x1f6)](_0x2ccbab[_0xdbca1e(0x211)](),_0x2ccbab[_0xdbca1e(0x204)](),_0x34cf28[_0xdbca1e(0x1e8)]());return await this[_0xdbca1e(0x212)][_0xdbca1e(0x1f3)](this[_0xdbca1e(0x1f4)],_0x287a0a),_0x5880cd;});}[a29_0x1bd7aa(0x1ec)](_0x57bc54,_0x45884b){const _0x4e567b=a29_0x1bd7aa;let _0x56d2e2=_0x57bc54[_0x4e567b(0x201)]();if(_0x56d2e2[_0x4e567b(0x20a)]()>_0x45884b){if(_0x57bc54[_0x4e567b(0x1f8)](_0x45884b))return _0x57bc54[_0x4e567b(0x205)](_0x45884b);throw new Error(_0x4e567b(0x1f9)+_0x56d2e2[_0x4e567b(0x20a)]()+',\x20'+_0x45884b);}if(_0x45884b-_0x56d2e2[_0x4e567b(0x20a)]()>0x7d0)throw new Error(_0x4e567b(0x1e9));while(_0x56d2e2[_0x4e567b(0x20a)]()<_0x45884b){_0x57bc54[_0x4e567b(0x1eb)](_0x56d2e2[_0x4e567b(0x1e6)]()),_0x56d2e2=_0x56d2e2[_0x4e567b(0x202)]();}return _0x57bc54[_0x4e567b(0x206)](_0x56d2e2['getNext']()),_0x56d2e2['getSenderMessageKey']();}[a29_0x1bd7aa(0x1f6)](_0x1b2caf,_0x238a1a,_0x5f0720){const _0x17b68c=a29_0x1bd7aa;try{const _0x39c7c6=crypto[_0x17b68c(0x200)](_0x238a1a,_0x5f0720,_0x1b2caf);return _0x39c7c6;}catch(_0x18d6b4){throw new Error(_0x17b68c(0x1fd));}}['getCipherText'](_0x51c913,_0x292e6f,_0x5cdfb3){const _0x3f1aca=a29_0x1bd7aa;try{_0x51c913=typeof _0x51c913===_0x3f1aca(0x1ef)?Buffer[_0x3f1aca(0x1ee)](_0x51c913,_0x3f1aca(0x1ff)):_0x51c913,_0x292e6f=typeof _0x292e6f===_0x3f1aca(0x1ef)?Buffer[_0x3f1aca(0x1ee)](_0x292e6f,_0x3f1aca(0x1ff)):_0x292e6f;const _0x5b97a6=crypto[_0x3f1aca(0x20f)](_0x292e6f,Buffer[_0x3f1aca(0x1ee)](_0x5cdfb3),_0x51c913);return _0x5b97a6;}catch(_0x3d836a){throw new Error(_0x3f1aca(0x1fd));}}}module[a29_0x1bd7aa(0x1fe)]=GroupCipher;