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.83 kB
JavaScript
;const a47_0x2ffb31=a47_0x1b8f;(function(_0xaa9383,_0x2d5bf7){const _0x1b3f91=a47_0x1b8f,_0x34704a=_0xaa9383();while(!![]){try{const _0x34786e=-parseInt(_0x1b3f91(0x1c8))/0x1*(parseInt(_0x1b3f91(0x1e8))/0x2)+-parseInt(_0x1b3f91(0x1da))/0x3+-parseInt(_0x1b3f91(0x1d3))/0x4+parseInt(_0x1b3f91(0x1e4))/0x5*(parseInt(_0x1b3f91(0x1d0))/0x6)+-parseInt(_0x1b3f91(0x1d7))/0x7+parseInt(_0x1b3f91(0x1dc))/0x8+parseInt(_0x1b3f91(0x1d2))/0x9*(parseInt(_0x1b3f91(0x1c9))/0xa);if(_0x34786e===_0x2d5bf7)break;else _0x34704a['push'](_0x34704a['shift']());}catch(_0x2d6b55){_0x34704a['push'](_0x34704a['shift']());}}}(a47_0x5343,0x534e1));function a47_0x5343(){const _0x4ef2f8=['verify','keyPair','pubKey','92382BFyEfP','ECDHE','2753388EtjcBj','2522824IehthG','WARNING:\x20Expected\x20pubkey\x20of\x20length\x2033,\x20please\x20report\x20the\x20ST\x20and\x20client\x20that\x20generated\x20the\x20pubkey','Curve','Invalid\x20signature','1386560bTZtXi','_curve25519','../helpers','381504yRRnef','Ed25519Verify','2172456VBIwJI','Ed25519Sign','async','set','Invalid\x20public\x20key','AsyncCurve25519Wrapper','curve','sign','55OWJBAT','warn','Invalid\x20message','byteLength','2zOuBfH','createKeyPair','error','Invalid\x20public\x20key:\x20','uint8ArrayToArrayBuffer','AsyncCurve','61549fhUSrG','30vnDKur','sharedSecret','privKey','__esModule'];a47_0x5343=function(){return _0x4ef2f8;};return a47_0x5343();}Object['defineProperty'](exports,a47_0x2ffb31(0x1cc),{'value':!![]}),exports[a47_0x2ffb31(0x1c7)]=exports[a47_0x2ffb31(0x1d5)]=void 0x0;function a47_0x1b8f(_0x53f869,_0x3dbbbe){const _0x53438c=a47_0x5343();return a47_0x1b8f=function(_0x1b8f52,_0x58aa4b){_0x1b8f52=_0x1b8f52-0x1c7;let _0x5e2b6b=_0x53438c[_0x1b8f52];return _0x5e2b6b;},a47_0x1b8f(_0x53f869,_0x3dbbbe);}const curve25519_typescript_1=require('@privacyresearch/curve25519-typescript'),helpers_1=require(a47_0x2ffb31(0x1d9));class Curve{constructor(_0x4841ff){const _0x3069a8=a47_0x2ffb31;this['_curve25519']=_0x4841ff,this[_0x3069a8(0x1de)]=new AsyncCurve();}set['curve'](_0x123a57){const _0x48c3cd=a47_0x2ffb31;this[_0x48c3cd(0x1d8)]=_0x123a57;}[a47_0x2ffb31(0x1e9)](_0x7812be){const _0x24e117=a47_0x2ffb31;validatePrivKey(_0x7812be);const _0x5b8a3c=this[_0x24e117(0x1d8)][_0x24e117(0x1ce)](_0x7812be);return processKeys(_0x5b8a3c);}[a47_0x2ffb31(0x1d1)](_0x4f4f18,_0x3dca91){const _0xae621b=a47_0x2ffb31;_0x4f4f18=validatePubKeyFormat(_0x4f4f18),validatePrivKey(_0x3dca91);if(_0x4f4f18===undefined||_0x4f4f18['byteLength']!=0x20)throw new Error(_0xae621b(0x1e0));return this[_0xae621b(0x1d8)][_0xae621b(0x1ca)](_0x4f4f18,_0x3dca91);}[a47_0x2ffb31(0x1dd)](_0x487e9c,_0x5b4df2){validatePrivKey(_0x487e9c);if(_0x5b4df2===undefined)throw new Error('Invalid\x20message');return this['_curve25519']['sign'](_0x487e9c,_0x5b4df2);}[a47_0x2ffb31(0x1db)](_0x5688bf,_0x3e387b,_0x5bc5b9){const _0x7b9ad2=a47_0x2ffb31;_0x5688bf=validatePubKeyFormat(_0x5688bf);if(_0x5688bf===undefined||_0x5688bf[_0x7b9ad2(0x1e7)]!=0x20)throw new Error(_0x7b9ad2(0x1e0));if(_0x3e387b===undefined)throw new Error(_0x7b9ad2(0x1e6));if(_0x5bc5b9===undefined||_0x5bc5b9[_0x7b9ad2(0x1e7)]!=0x40)throw new Error(_0x7b9ad2(0x1d6));return this[_0x7b9ad2(0x1d8)]['verify'](_0x5688bf,_0x3e387b,_0x5bc5b9);}}exports[a47_0x2ffb31(0x1d5)]=Curve;class AsyncCurve{constructor(){const _0x68d70d=a47_0x2ffb31;this['_curve25519']=new curve25519_typescript_1[(_0x68d70d(0x1e1))]();}set[a47_0x2ffb31(0x1e2)](_0x4e4deb){const _0x214a28=a47_0x2ffb31;this[_0x214a28(0x1d8)]=_0x4e4deb;}async[a47_0x2ffb31(0x1e9)](_0x1aad97){const _0x402231=a47_0x2ffb31;validatePrivKey(_0x1aad97);const _0x4be315=await this[_0x402231(0x1d8)][_0x402231(0x1ce)](_0x1aad97);return processKeys(_0x4be315);}[a47_0x2ffb31(0x1d1)](_0x2c3d35,_0x4d8af5){const _0x4e6eb0=a47_0x2ffb31;_0x2c3d35=validatePubKeyFormat(_0x2c3d35),validatePrivKey(_0x4d8af5);if(_0x2c3d35===undefined||_0x2c3d35['byteLength']!=0x20)throw new Error(_0x4e6eb0(0x1e0));return this[_0x4e6eb0(0x1d8)][_0x4e6eb0(0x1ca)](_0x2c3d35,_0x4d8af5);}[a47_0x2ffb31(0x1dd)](_0x146795,_0x139ed2){const _0x966639=a47_0x2ffb31;validatePrivKey(_0x146795);if(_0x139ed2===undefined)throw new Error(_0x966639(0x1e6));return this[_0x966639(0x1d8)][_0x966639(0x1e3)](_0x146795,_0x139ed2);}async[a47_0x2ffb31(0x1db)](_0x34ff65,_0x467d13,_0x338a74){const _0x427e5e=a47_0x2ffb31;_0x34ff65=validatePubKeyFormat(_0x34ff65);if(_0x34ff65===undefined||_0x34ff65[_0x427e5e(0x1e7)]!=0x20)throw new Error(_0x427e5e(0x1e0));if(_0x467d13===undefined)throw new Error('Invalid\x20message');if(_0x338a74===undefined||_0x338a74[_0x427e5e(0x1e7)]!=0x40)throw new Error(_0x427e5e(0x1d6));const _0x10b3f2=await this['_curve25519'][_0x427e5e(0x1cd)](_0x34ff65,_0x467d13,_0x338a74);if(_0x10b3f2)throw new Error(_0x427e5e(0x1d6));return _0x10b3f2;}}exports[a47_0x2ffb31(0x1c7)]=AsyncCurve;function validatePrivKey(_0x143cbc){const _0x5689a3=a47_0x2ffb31;if(_0x143cbc===undefined||!(_0x143cbc instanceof ArrayBuffer)||_0x143cbc[_0x5689a3(0x1e7)]!=0x20)throw new Error('Invalid\x20private\x20key');}function validatePubKeyFormat(_0x24974f){const _0xfbb4e1=a47_0x2ffb31;if(_0x24974f===undefined||(_0x24974f['byteLength']!=0x21||new Uint8Array(_0x24974f)[0x0]!=0x5)&&_0x24974f[_0xfbb4e1(0x1e7)]!=0x20){console[_0xfbb4e1(0x1e5)](_0xfbb4e1(0x1e0),{'pubKey':_0x24974f});throw new Error(_0xfbb4e1(0x1eb)+_0x24974f+'\x20'+(_0x24974f===null||_0x24974f===void 0x0?void 0x0:_0x24974f[_0xfbb4e1(0x1e7)]));}return _0x24974f[_0xfbb4e1(0x1e7)]==0x21?_0x24974f['slice'](0x1):(console[_0xfbb4e1(0x1ea)](_0xfbb4e1(0x1d4)),_0x24974f);}function processKeys(_0x45fdf4){const _0xe8876=a47_0x2ffb31,_0x4843e2=new Uint8Array(_0x45fdf4[_0xe8876(0x1cf)]),_0x2b2218=new Uint8Array(0x21);return _0x2b2218[_0xe8876(0x1df)](_0x4843e2,0x1),_0x2b2218[0x0]=0x5,{'pubKey':(0x0,helpers_1[_0xe8876(0x1ec)])(_0x2b2218),'privKey':_0x45fdf4[_0xe8876(0x1cb)]};}