-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
2 lines (2 loc) · 12.9 KB
/
index.js
1
2
const _0x4fda5f=_0x33fb;function _0x33fb(_0x1839a9,_0x46b98f){const _0x5d5ed0=_0x5d5e();return _0x33fb=function(_0x33fb1f,_0x4a5edf){_0x33fb1f=_0x33fb1f-0x7d;let _0x5d917c=_0x5d5ed0[_0x33fb1f];return _0x5d917c;},_0x33fb(_0x1839a9,_0x46b98f);}(function(_0x120bbd,_0x4535a3){const _0x23d1d7=_0x33fb,_0x2ac0b3=_0x120bbd();while(!![]){try{const _0x3eed36=-parseInt(_0x23d1d7(0xab))/0x1*(parseInt(_0x23d1d7(0xd8))/0x2)+-parseInt(_0x23d1d7(0x9e))/0x3+parseInt(_0x23d1d7(0xdd))/0x4*(parseInt(_0x23d1d7(0xe3))/0x5)+parseInt(_0x23d1d7(0xd1))/0x6*(-parseInt(_0x23d1d7(0x98))/0x7)+-parseInt(_0x23d1d7(0xe0))/0x8+parseInt(_0x23d1d7(0xde))/0x9+-parseInt(_0x23d1d7(0xd0))/0xa*(-parseInt(_0x23d1d7(0xe4))/0xb);if(_0x3eed36===_0x4535a3)break;else _0x2ac0b3['push'](_0x2ac0b3['shift']());}catch(_0x2f37c5){_0x2ac0b3['push'](_0x2ac0b3['shift']());}}}(_0x5d5e,0xc48b3));const {default:makeWaSocket,useMultiFileAuthState,DisconnectReason,fetchLatestBaileysVersion,generateForwardMessageContent,prepareWAMessageMedia,generateWAMessageFromContent,generateMessageID,downloadContentFromMessage,makeInMemoryStore,jidDecode,proto}=require(_0x4fda5f(0xd4)),pino=require(_0x4fda5f(0xb7)),{Boom}=require('@hapi/boom'),figlet=require(_0x4fda5f(0xd9)),path=require(_0x4fda5f(0xcf)),readline=require(_0x4fda5f(0xbf)),fs=require('fs'),chalk=require(_0x4fda5f(0x85)),PhoneNumber=require(_0x4fda5f(0xc0)),util=require('util'),{sizeFormatter}=require(_0x4fda5f(0xc1)),format=sizeFormatter(),FileType=require(_0x4fda5f(0x93)),{imageToWebp,videoToWebp,writeExifImg,writeExifVid}=require(_0x4fda5f(0x88)),usePairingCode=!![],{smsg,isUrl,getBuffer,fetchJson,await,sleep}=require(_0x4fda5f(0xf1)),store=makeInMemoryStore({'logger':pino()[_0x4fda5f(0xef)]({'level':_0x4fda5f(0xf2),'stream':'store'})}),log=console[_0x4fda5f(0x86)],rl=readline['createInterface']({'input':process[_0x4fda5f(0xc4)],'output':process[_0x4fda5f(0xca)]}),akses=JSON['parse'](fs[_0x4fda5f(0xe2)]('./database/akses.json')),owner=JSON[_0x4fda5f(0xbd)](fs[_0x4fda5f(0xe2)](_0x4fda5f(0xb2)));async function connectToWhatsApp(){const _0x34c400=_0x4fda5f,_0x273093=await useMultiFileAuthState(_0x34c400(0xc9)),{state:_0x41609c,saveCreds:_0x4f2e0c}=await useMultiFileAuthState('auth'),_0x54548c=makeWaSocket({'printQRInTerminal':!usePairingCode,'browser':[_0x34c400(0xcb),_0x34c400(0xe9),'121.0.6167.159'],'version':[0x2,0x96d,0x1],'auth':_0x273093['state'],'logger':pino({'level':_0x34c400(0xf2)})});return usePairingCode&&!_0x54548c[_0x34c400(0xa9)][_0x34c400(0x83)][_0x34c400(0xbe)]&&(log(chalk`{cyan Ro0TN3T v2.0 Kalo pake lah sc ini dengan bijak paham !!,
masukkan nomor kalian dengan awali 62}`),rl[_0x34c400(0xf0)]('',async _0x33ec83=>{const _0x45fef7=await _0x54548c['requestPairingCode'](_0x33ec83);log(chalk`{bgMagenta Ro0TN3T} : {bgCyanBright ${_0x45fef7}}`);})),_0x54548c['ev']['on'](_0x34c400(0xc3),_0x273093[_0x34c400(0xd7)]),_0x54548c['ev']['on'](_0x34c400(0xdf),async _0x5ac5fd=>{const _0x4733f3=_0x34c400;try{m=_0x5ac5fd[_0x4733f3(0x8c)][0x0];if(!m[_0x4733f3(0xa8)])return;m[_0x4733f3(0xa8)]=Object[_0x4733f3(0xa1)](m[_0x4733f3(0xa8)])[0x0]==='ephemeralMessage'?m[_0x4733f3(0xa8)][_0x4733f3(0x9f)][_0x4733f3(0xa8)]:m['message'];if(m['key']&&m[_0x4733f3(0x82)][_0x4733f3(0xd6)]===_0x4733f3(0xba))return;if(!_0x54548c['public']&&!m[_0x4733f3(0x82)]['fromMe']&&_0x5ac5fd['type']===_0x4733f3(0xeb))return;if(m[_0x4733f3(0x82)]['id'][_0x4733f3(0xd3)]('BAE5')&&m['key']['id']['length']===0x10)return;m=smsg(_0x54548c,m,store),require(_0x4733f3(0x91))(_0x54548c,m,_0x5ac5fd,store,akses,owner);}catch(_0x1aece9){console['log'](_0x1aece9);}}),_0x54548c[_0x34c400(0xb0)]=_0x5e6358=>{const _0x379e89=_0x34c400;if(!_0x5e6358)return _0x5e6358;if(/:\d+@/gi['test'](_0x5e6358)){let _0x27b25f=jidDecode(_0x5e6358)||{};return _0x27b25f[_0x379e89(0xac)]&&_0x27b25f[_0x379e89(0xdc)]&&_0x27b25f['user']+'@'+_0x27b25f[_0x379e89(0xdc)]||_0x5e6358;}else return _0x5e6358;},_0x54548c['ev']['on'](_0x34c400(0x81),_0x4d2786=>{const _0x281a70=_0x34c400;for(let _0xb8a93 of _0x4d2786){let _0x2ee732=_0x54548c[_0x281a70(0xb0)](_0xb8a93['id']);if(store&&store['contacts'])store[_0x281a70(0xd2)][_0x2ee732]={'id':_0x2ee732,'name':_0xb8a93[_0x281a70(0xeb)]};}}),_0x54548c[_0x34c400(0x80)]=_0x1a9cdd=>{const _0x2655df=_0x34c400;return _0x54548c[_0x2655df(0xec)]({'tag':'iq','attrs':{'to':_0x2655df(0x97),'type':_0x2655df(0x9d),'xmlns':_0x2655df(0x94)},'content':[{'tag':_0x2655df(0x94),'attrs':{},'content':Buffer[_0x2655df(0xd5)](_0x1a9cdd,_0x2655df(0xa2))}]}),_0x1a9cdd;},_0x54548c['sendText']=(_0x3776bf,_0x4ee77e,_0x45d806='',_0x7407b2)=>_0x54548c[_0x34c400(0xce)](_0x3776bf,{'text':_0x4ee77e,..._0x7407b2},{'quoted':_0x45d806}),_0x54548c[_0x34c400(0xb1)]=!![],_0x54548c[_0x34c400(0x96)]=_0x3fcbc0=>smsg(_0x54548c,_0x3fcbc0,store),_0x54548c['ev']['on'](_0x34c400(0x8f),async _0x4fbaaf=>{const _0x43607d=_0x34c400,{connection:_0x22638a,lastDisconnect:_0x3547ef}=_0x4fbaaf;if(_0x22638a==='close'){let _0xd9be9c=new Boom(_0x3547ef?.['error'])?.[_0x43607d(0xc5)][_0x43607d(0xc2)];if(_0xd9be9c===DisconnectReason[_0x43607d(0xb9)])log(chalk`{bgRed Hapus Session Kemudian Coba Kembali}`),process[_0x43607d(0xae)]();else{if(_0xd9be9c===DisconnectReason[_0x43607d(0xea)])log(chalk`{bgGreen Menghubungkan Kembali...}`),connectToWhatsApp();else{if(_0xd9be9c===DisconnectReason[_0x43607d(0xc6)])log(chalk`{bgYellow Koneksi Hilang dari Server, menyambung kembali...}`),connectToWhatsApp();else{if(_0xd9be9c===DisconnectReason[_0x43607d(0x8e)])log(chalk`{bgCyan Koneksi Diganti, Sesi Baru Lagi Dibuka, Silakan Restart Bot}`),process['exit']();else{if(_0xd9be9c===DisconnectReason[_0x43607d(0xcc)])log(chalk`{bgMagenta Perangkat Keluar, Harap Hapus Folder auth Dan Restart Ulang!}`),process['exit']();else{if(_0xd9be9c===DisconnectReason['restartRequired'])log(chalk`{bgBlue Sedang Merestart Koneksi}`),connectToWhatsApp();else _0xd9be9c===DisconnectReason[_0x43607d(0xb6)]?(log(chalk`{bgMagentaBright Waktu Koneksi Habis, Menyambungkan Kembali}`),connectToWhatsApp()):(log(chalk`{bgGreenBright Unknown DisconnectReason: ${_0xd9be9c}|${_0x22638a}}`),connectToWhatsApp());}}}}}}else{if(_0x22638a===_0x43607d(0xa3)){log(chalk`{magentaBright Berhasil Koneksi Ke {bgGreen.white Whatsapp!}}`),log('\x20\x20');const _0x29d108=_0x54548c[_0x43607d(0xac)];log(chalk`{bgCyan.yellow Nomor Whatsapp} : {cyan ${_0x29d108['id'][_0x43607d(0x89)](':')[0x0]}}`),log(chalk`{bgYellow.cyan Nama Pengguna } : {yellow ${_0x29d108['name']}}`);}}}),_0x54548c['send5ButGif']=async(_0x50d777,_0x30d28c='',_0x485c0d='',_0x3f6c67=[],_0x46b6ce={})=>{const _0x51f5d5=_0x34c400;let _0x107b06=await prepareWAMessageMedia({'video':thumb,'gifPlayback':!![]},{'upload':_0x54548c['waUploadToServer']});const _0x5ced27=generateWAMessageFromContent(m[_0x51f5d5(0x84)],proto[_0x51f5d5(0x92)][_0x51f5d5(0xdb)]({'templateMessage':{'hydratedTemplate':{'videoMessage':_0x107b06[_0x51f5d5(0xb5)],'hydratedContentText':_0x30d28c,'hydratedFooterText':_0x485c0d,'hydratedButtons':_0x3f6c67}}}),_0x46b6ce);_0x54548c[_0x51f5d5(0xee)](_0x50d777,_0x5ced27['message'],{'messageId':_0x5ced27[_0x51f5d5(0x82)]['id']});},_0x54548c[_0x34c400(0x99)]=async(_0x3aafdd,_0x112c76,_0x3f5943,_0x29dad5={})=>{const _0x2eaa67=_0x34c400;let _0x136a15=Buffer[_0x2eaa67(0xbb)](_0x112c76)?_0x112c76:/^data:.*?\/.*?;base64,/i['test'](_0x112c76)?Buffer['from'](_0x112c76['split']`,`[0x1],_0x2eaa67(0x95)):/^https?:\/\//[_0x2eaa67(0xa5)](_0x112c76)?await await getBuffer(_0x112c76):fs[_0x2eaa67(0xc7)](_0x112c76)?fs[_0x2eaa67(0xe2)](_0x112c76):Buffer[_0x2eaa67(0xe6)](0x0),_0x4e0ff5;return _0x29dad5&&(_0x29dad5[_0x2eaa67(0xda)]||_0x29dad5[_0x2eaa67(0xcd)])?_0x4e0ff5=await writeExifImg(_0x136a15,_0x29dad5):_0x4e0ff5=await imageToWebp(_0x136a15),await _0x54548c[_0x2eaa67(0xce)](_0x3aafdd,{'sticker':{'url':_0x4e0ff5},..._0x29dad5},{'quoted':_0x3f5943}),_0x4e0ff5;},_0x54548c[_0x34c400(0xaf)]=async(_0x3739c2,_0x456b21,_0x262391,_0x557b0e={})=>{const _0x37fb5e=_0x34c400;let _0x4426f4=Buffer['isBuffer'](_0x456b21)?_0x456b21:/^data:.*?\/.*?;base64,/i[_0x37fb5e(0xa5)](_0x456b21)?Buffer['from'](_0x456b21[_0x37fb5e(0x89)]`,`[0x1],_0x37fb5e(0x95)):/^https?:\/\//[_0x37fb5e(0xa5)](_0x456b21)?await await getBuffer(_0x456b21):fs[_0x37fb5e(0xc7)](_0x456b21)?fs[_0x37fb5e(0xe2)](_0x456b21):Buffer[_0x37fb5e(0xe6)](0x0),_0x4a1daf;return _0x557b0e&&(_0x557b0e['packname']||_0x557b0e[_0x37fb5e(0xcd)])?_0x4a1daf=await writeExifVid(_0x4426f4,_0x557b0e):_0x4a1daf=await videoToWebp(_0x4426f4),await _0x54548c[_0x37fb5e(0xce)](_0x3739c2,{'sticker':{'url':_0x4a1daf},..._0x557b0e},{'quoted':_0x262391}),_0x4a1daf;},_0x54548c[_0x34c400(0xb4)]=async(_0x57b1b9,_0x13a1ff,_0x3cd6c3=!![])=>{const _0xc32754=_0x34c400;let _0x5ab32f=_0x57b1b9[_0xc32754(0xe1)]?_0x57b1b9[_0xc32754(0xe1)]:_0x57b1b9,_0x52538d=(_0x57b1b9['msg']||_0x57b1b9)[_0xc32754(0xa6)]||'',_0x3c6ba7=_0x57b1b9[_0xc32754(0xad)]?_0x57b1b9['mtype'][_0xc32754(0x87)](/Message/gi,''):_0x52538d['split']('/')[0x0];const _0x2cafc2=await downloadContentFromMessage(_0x5ab32f,_0x3c6ba7);let _0x1a33b2=Buffer[_0xc32754(0xd5)]([]);for await(const _0x30c572 of _0x2cafc2){_0x1a33b2=Buffer['concat']([_0x1a33b2,_0x30c572]);}let _0x2a268b=await FileType['fromBuffer'](_0x1a33b2);return trueFileName=_0x3cd6c3?_0x13a1ff+'.'+_0x2a268b['ext']:_0x13a1ff,await fs[_0xc32754(0x8a)](trueFileName,_0x1a33b2),trueFileName;},_0x54548c[_0x34c400(0xa7)]=async _0x11df4c=>{const _0x5ba740=_0x34c400;let _0x63984f=(_0x11df4c[_0x5ba740(0xe1)]||_0x11df4c)['mimetype']||'',_0xcedf34=_0x11df4c[_0x5ba740(0xad)]?_0x11df4c['mtype'][_0x5ba740(0x87)](/Message/gi,''):_0x63984f[_0x5ba740(0x89)]('/')[0x0];const _0x19b0a3=await downloadContentFromMessage(_0x11df4c,_0xcedf34);let _0x2e2f0e=Buffer[_0x5ba740(0xd5)]([]);for await(const _0x45c2e0 of _0x19b0a3){_0x2e2f0e=Buffer[_0x5ba740(0x9b)]([_0x2e2f0e,_0x45c2e0]);}return _0x2e2f0e;},_0x54548c[_0x34c400(0xc8)]=async(_0x3b9fca,_0x1959f8,_0x16d318='',_0x2d997e='',_0x1b42c7='',_0x96047c={})=>{const _0x17bc44=_0x34c400;let _0x4a39ad=await _0x54548c[_0x17bc44(0x9c)](_0x1959f8,!![]),{mime:_0x135cfa,ext:_0x242cb1,res:_0x76b1ed,data:_0x187bb1,filename:_0x5d448f}=_0x4a39ad;if(_0x76b1ed&&_0x76b1ed[_0x17bc44(0x94)]!==0xc8||file[_0x17bc44(0x9a)]<=0x10000)try{throw{'json':JSON[_0x17bc44(0xbd)](file[_0x17bc44(0xbc)]())};}catch(_0x3d011a){if(_0x3d011a[_0x17bc44(0xaa)])throw _0x3d011a[_0x17bc44(0xaa)];}let _0x467d2d='',_0x15a799=_0x135cfa,_0x23e9d5=_0x5d448f;if(_0x96047c[_0x17bc44(0xe5)])_0x467d2d=_0x17bc44(0xe8);if(_0x96047c[_0x17bc44(0xa4)]||/webp/[_0x17bc44(0xa5)](_0x135cfa)){let {writeExif:_0xbff81a}=require(_0x17bc44(0x88)),_0x546ed6={'mimetype':_0x135cfa,'data':_0x187bb1};_0x23e9d5=await _0xbff81a(_0x546ed6,{'packname':_0x96047c[_0x17bc44(0xda)]?_0x96047c[_0x17bc44(0xda)]:global['packname'],'author':_0x96047c[_0x17bc44(0xcd)]?_0x96047c[_0x17bc44(0xcd)]:global[_0x17bc44(0xcd)],'categories':_0x96047c[_0x17bc44(0xb3)]?_0x96047c[_0x17bc44(0xb3)]:[]}),await fs['promises'][_0x17bc44(0x7f)](_0x5d448f),_0x467d2d=_0x17bc44(0xb8),_0x15a799=_0x17bc44(0x7e);}else{if(/image/[_0x17bc44(0xa5)](_0x135cfa))_0x467d2d=_0x17bc44(0xed);else{if(/video/[_0x17bc44(0xa5)](_0x135cfa))_0x467d2d=_0x17bc44(0xa0);else{if(/audio/[_0x17bc44(0xa5)](_0x135cfa))_0x467d2d=_0x17bc44(0x8d);else _0x467d2d='document';}}}return await _0x54548c[_0x17bc44(0xce)](_0x3b9fca,{[_0x467d2d]:{'url':_0x23e9d5},'caption':_0x2d997e,'mimetype':_0x15a799,'fileName':_0x16d318,..._0x96047c},{'quoted':_0x1b42c7,..._0x96047c}),fs[_0x17bc44(0xe7)]['unlink'](_0x23e9d5);},_0x54548c;}connectToWhatsApp();let file=require['resolve'](__filename);function _0x5d5e(){const _0x4fffa2=['auth','stdout','Mac\x20Os','loggedOut','author','sendMessage','path','112370NrdlpV','2772DjEbQi','contacts','startsWith','@whiskeysockets/baileys','from','remoteJid','saveCreds','2REYCuj','figlet','packname','fromObject','server','449792PWUPSY','653121MtmVol','messages.upsert','119464zLOlKA','msg','readFileSync','5PLidfD','1353iqeIzL','asDocument','alloc','promises','document','chrome','connectionClosed','notify','query','image','relayMessage','child','question','./database/functions','silent','unwatchFile','image/webp','unlink','setStatus','contacts.update','key','creds','chat','chalk','log','replace','./database/exif','split','writeFileSync','Update\x20File\x20Terbaru\x20','messages','audio','connectionReplaced','connection.update','watchFile','./Ro0TN3T','Message','file-type','status','base64','serializeM','@s.whatsapp.net','3584fpczJe','sendImageAsSticker','length','concat','getFile','set','1334577LgyOeu','ephemeralMessage','video','keys','utf-8','open','asSticker','test','mimetype','downloadMediaMessage','message','authState','json','65789rWwMun','user','mtype','exit','sendVideoAsSticker','decodeJid','public','./database/owner.json','categories','downloadAndSaveMediaMessage','videoMessage','timedOut','pino','sticker','badSession','status@broadcast','isBuffer','toString','parse','registered','readline','awesome-phonenumber','human-readable','statusCode','creds.update','stdin','output','connectionLost','existsSync','sendMedia'];_0x5d5e=function(){return _0x4fffa2;};return _0x5d5e();}fs[_0x4fda5f(0x90)](file,()=>{const _0x2c77b4=_0x4fda5f;fs[_0x2c77b4(0x7d)](file),console[_0x2c77b4(0x86)](chalk['yellowBright'](_0x2c77b4(0x8b)+__filename)),delete require['cache'][file],require(file);});