forked from shizothetechie/OREO-BOT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
shizo-oreo.js
1 lines (1 loc) · 15.5 KB
/
shizo-oreo.js
1
const _0x48f217=_0x5552;(function(_0x2148c4,_0x3253b1){const _0x340848=_0x5552,_0x327919=_0x2148c4();while(!![]){try{const _0x20aeef=-parseInt(_0x340848(0x196))/0x1+-parseInt(_0x340848(0x185))/0x2*(parseInt(_0x340848(0x189))/0x3)+parseInt(_0x340848(0x175))/0x4*(-parseInt(_0x340848(0x1c4))/0x5)+parseInt(_0x340848(0x1b4))/0x6+parseInt(_0x340848(0x1a5))/0x7+-parseInt(_0x340848(0x187))/0x8*(-parseInt(_0x340848(0x18d))/0x9)+parseInt(_0x340848(0x1aa))/0xa*(-parseInt(_0x340848(0x156))/0xb);if(_0x20aeef===_0x3253b1)break;else _0x327919['push'](_0x327919['shift']());}catch(_0x3b1225){_0x327919['push'](_0x327919['shift']());}}}(_0x3579,0xdfee9),process['env'][_0x48f217(0x1a2)]='0');import'./config.js';import{createRequire}from'module';import _0x14a235,{join}from'path';import{fileURLToPath,pathToFileURL}from'url';import{platform}from'process';import*as _0x348fbd from'ws';import{readdirSync,statSync,unlinkSync,existsSync,readFileSync,watch,rmSync}from'fs';import _0xc53bd2 from'fs';import _0xf068f2 from'yargs';import{spawn}from'child_process';import _0x5f0331 from'lodash';import _0x588fbd from'chalk';import _0x3d851b from'syntax-error';import{tmpdir}from'os';import{format}from'util';import{makeWASocket,protoType,serialize}from'./lib/simple.js';import{Low,JSONFile}from'lowdb';import _0x857b23 from'pino';import{mongoDB,mongoDBV2}from'./lib/mongoDB.js';import _0x13ff71 from'./lib/store.js';import _0x550c37 from'./lib/genses.js';import{useMultiFileAuthState,DisconnectReason,fetchLatestBaileysVersion}from'@whiskeysockets/baileys';const {CONNECTING}=_0x348fbd,{chain}=_0x5f0331,PORT=process['env']['PORT']||process[_0x48f217(0x153)][_0x48f217(0x1bf)]||0xbb8;protoType(),serialize(),global[_0x48f217(0x165)]=function filename(_0x34742=import.meta[_0x48f217(0x13b)],_0x497d63=platform!==_0x48f217(0x168)){const _0x5856ea=_0x48f217;return _0x497d63?/file:\/\/\//['test'](_0x34742)?fileURLToPath(_0x34742):_0x34742:pathToFileURL(_0x34742)[_0x5856ea(0x1b8)]();},global[_0x48f217(0x176)]=function dirname(_0x2e2ac1){const _0x5e36c3=_0x48f217;return _0x14a235['dirname'](global[_0x5e36c3(0x165)](_0x2e2ac1,!![]));},global['__require']=function require(_0x56b18c=import.meta[_0x48f217(0x13b)]){return createRequire(_0x56b18c);},global[_0x48f217(0x16d)]=(_0x2b49ef,_0x16d08c='/',_0x387b73={},_0x502dcc)=>(_0x2b49ef in global[_0x48f217(0x170)]?global[_0x48f217(0x170)][_0x2b49ef]:_0x2b49ef)+_0x16d08c+(_0x387b73||_0x502dcc?'?'+new URLSearchParams(Object[_0x48f217(0x14d)]({..._0x387b73,..._0x502dcc?{[_0x502dcc]:global[_0x48f217(0x1a8)][_0x2b49ef in global[_0x48f217(0x170)]?global[_0x48f217(0x170)][_0x2b49ef]:_0x2b49ef]}:{}})):''),global[_0x48f217(0x186)]={'start':new Date()};const __dirname=global[_0x48f217(0x176)](import.meta[_0x48f217(0x13b)]);global[_0x48f217(0x1bc)]=new Object(_0xf068f2(process[_0x48f217(0x1a4)][_0x48f217(0x1a7)](0x2))[_0x48f217(0x174)](![])['parse']()),global['prefix']=new RegExp('^['+(process['env'][_0x48f217(0x188)]||_0x48f217(0x152))['replace'](/[|\\{}()[\]^$+*?.\-\^]/g,_0x48f217(0x14b))+']'),global['opts']['db']=process[_0x48f217(0x153)][_0x48f217(0x151)],global['db']=new Low(/https?:\/\//[_0x48f217(0x146)](opts['db']||'')?new cloudDBAdapter(opts['db']):/mongodb(\+srv)?:\/\//i[_0x48f217(0x146)](opts['db'])?opts[_0x48f217(0x199)]?new mongoDBV2(opts['db']):new mongoDB(opts['db']):new JSONFile((opts['_'][0x0]?opts['_'][0x0]+'_':'')+_0x48f217(0x1be))),global['DATABASE']=global['db'],global[_0x48f217(0x137)]=async function loadDatabase(){const _0x4d9cb5=_0x48f217;if(global['db'][_0x4d9cb5(0x1ae)])return new Promise(_0x44eb5a=>setInterval(async function(){const _0x1e9a64=_0x4d9cb5;!global['db'][_0x1e9a64(0x1ae)]&&(clearInterval(this),_0x44eb5a(global['db'][_0x1e9a64(0x19f)]==null?global[_0x1e9a64(0x137)]():global['db'][_0x1e9a64(0x19f)]));},0x1*0x3e8));if(global['db']['data']!==null)return;global['db'][_0x4d9cb5(0x1ae)]=!![],await global['db'][_0x4d9cb5(0x194)]()[_0x4d9cb5(0x1b5)](console[_0x4d9cb5(0x1a3)]),global['db'][_0x4d9cb5(0x1ae)]=null,global['db'][_0x4d9cb5(0x19f)]={'users':{},'chats':{},'stats':{},'msgs':{},'sticker':{},'settings':{},...global['db']['data']||{}},global['db'][_0x4d9cb5(0x154)]=chain(global['db'][_0x4d9cb5(0x19f)]);},loadDatabase(),global[_0x48f217(0x14e)]=_0x48f217(0x1ac);let txt=process[_0x48f217(0x153)][_0x48f217(0x1c0)];!_0xc53bd2[_0x48f217(0x18b)]('./'+authFolder+_0x48f217(0x180))&&process[_0x48f217(0x153)][_0x48f217(0x1c0)]&&await _0x550c37(txt);const {state,saveCreds}=await useMultiFileAuthState(global[_0x48f217(0x14e)]);function _0x5552(_0x543a65,_0x1bbdb4){const _0x3579ea=_0x3579();return _0x5552=function(_0x555230,_0x700cac){_0x555230=_0x555230-0x135;let _0x3d2990=_0x3579ea[_0x555230];return _0x3d2990;},_0x5552(_0x543a65,_0x1bbdb4);}let {version,isLatest}=await fetchLatestBaileysVersion();const connectionOptions={'version':version,'printQRInTerminal':!![],'auth':state,'browser':[_0x48f217(0x198),_0x48f217(0x18c),'107.0.1418.26'],'patchMessageBeforeSending':_0x60a4c=>{const _0x1e2939=_0x48f217,_0x4de2fd=!!(_0x60a4c[_0x1e2939(0x145)]||_0x60a4c[_0x1e2939(0x192)]||_0x60a4c[_0x1e2939(0x16c)]);return _0x4de2fd&&(_0x60a4c={'viewOnceMessage':{'message':{'messageContextInfo':{'deviceListMetadataVersion':0x2,'deviceListMetadata':{}},..._0x60a4c}}}),_0x60a4c;},'logger':_0x857b23({'level':_0x48f217(0x147)})};global[_0x48f217(0x14a)]=makeWASocket(connectionOptions),conn['isInit']=![];!opts[_0x48f217(0x146)]&&setInterval(async()=>{const _0x3ec755=_0x48f217;if(global['db']['data'])await global['db'][_0x3ec755(0x157)]()[_0x3ec755(0x1b5)](console[_0x3ec755(0x1a3)]);if(opts[_0x3ec755(0x18e)])try{clearTmp();}catch(_0x328b76){console['error'](_0x328b76);}},0x3c*0x3e8);if(global[_0x48f217(0x15c)]===0x1)(await import(_0x48f217(0x19c)))[_0x48f217(0x16e)](global['conn'],PORT);async function clearTmp(){const _0x5a04e5=_0x48f217,_0x29ec5f=[tmpdir(),join(__dirname,_0x5a04e5(0x1a0))],_0x11c151=[];return _0x29ec5f[_0x5a04e5(0x17d)](_0x5b534c=>readdirSync(_0x5b534c)[_0x5a04e5(0x17d)](_0xfcbf31=>_0x11c151[_0x5a04e5(0x13e)](join(_0x5b534c,_0xfcbf31)))),_0x11c151[_0x5a04e5(0x15f)](_0x4a9137=>{const _0x59a68d=_0x5a04e5,_0x135d03=statSync(_0x4a9137);if(_0x135d03[_0x59a68d(0x163)]()&&Date['now']()-_0x135d03[_0x59a68d(0x184)]>=0x3e8*0x3c*0x3)return unlinkSync(_0x4a9137);return![];});}setInterval(async()=>{const _0x48024f=_0x48f217;var _0x1bb390=await clearTmp();console['log'](_0x588fbd[_0x48024f(0x1ab)](_0x48024f(0x158)));},0x2bf20);async function connectionUpdate(_0x3bf604){const _0x28102a=_0x48f217,{connection:_0x4305a5,lastDisconnect:_0x3c8c0a,isNewLogin:_0x56d3a5}=_0x3bf604;if(_0x56d3a5)conn['isInit']=!![];const _0xd7f088=_0x3c8c0a?.[_0x28102a(0x1a3)]?.['output']?.[_0x28102a(0x16b)]||_0x3c8c0a?.[_0x28102a(0x1a3)]?.['output']?.[_0x28102a(0x1c5)]?.['statusCode'];_0xd7f088&&_0xd7f088!==DisconnectReason[_0x28102a(0x191)]&&conn?.['ws'][_0x28102a(0x13a)]==null&&(console['log'](await global[_0x28102a(0x1a6)](!![])[_0x28102a(0x1b5)](console[_0x28102a(0x1a3)])),global[_0x28102a(0x186)][_0x28102a(0x150)]=new Date());if(global['db']['data']==null)loadDatabase();}function _0x3579(){const _0x162c82=['105966KJTzDV','catch','./handler.js?update=','log','toString','filter','color','convert','opts','handler','userdb.json','SERVER_PORT','SESSION_ID','logger','fromEntries','sRevoke','65bSOCgG','payload','group-participants.update','then','loadDatabase','ffprobe','message.delete','socket','url','credsUpdate','The\x20group\x20link\x20has\x20been\x20changed.\x0a*🖇️\x20New\x20Link:*\x0a@revoke','push','reload','module','magick','Group\x20description\x20has\x20been\x20Updated\x0a*🔮\x20New\x20Description:*\x0a@desc','🌟\x20Updated\x20Plugin\x20-\x20\x27','-hide_banner','buttonsMessage','test','silent','groupsUpdate','creds.update','conn','\x5c$&','sIcon','entries','authFolder','warn','connect','DATABASE_URL','z/i!#$%+£¢€¥^°=¶∆×÷π√✓©®:;?&.,\x5c-','env','chain','participantsUpdate','143ebpvJf','write','🚀\x20Bot\x20Boosted\x20and\x20Temp\x20Directory\x20is\x20Cleared\x20🔥','chats','onDelete','info','serverHost','GoodBye\x20👋\x20@user','webp','map','ffmpeg','sSubject','Hey\x20👋,\x20@user\x0aWelcome\x20to\x20@group\x20👑','isFile','connection.update','__filename','bye','❌\x20syntax\x20error\x20while\x20loading\x20\x27','win32','deleteUpdate','uncaughtException','statusCode','listMessage','API','default','--version','APIs','all','-filter_complex','off','exitProcess','192164vYOfMO','__dirname','find','messages.upsert','groups.update','welcome','sdemote','🤖\x20SYSTEM\x20SUCESSFULLY\x20PERFORMED\x20AND\x20PASSED\x20THE\x20NORMAL\x20OPERATION\x20TEST\x20🚀','forEach','now','?update=','/creds.json','close','bind','sort','mtimeMs','1355812jsPUnx','timestamp','5000siizZt','PREFIX','3bmphVN','Stickers\x20may\x20not\x20work\x20without\x20imagemagick\x20if\x20libwebp\x20on\x20ffmpeg\x20doesnt\x20isntalled\x20(pkg\x20install\x20imagemagick)','existsSync','Edge','22689iiSbzD','autocleartmp','🗑️\x20Plugin\x20Deleted\x20-\x20\x27','removeAllListeners','loggedOut','templateMessage','-loglevel','read','Stickers\x20may\x20not\x20animated\x20without\x20libwebp\x20on\x20ffmpeg\x20(--enable-ibwebp\x20while\x20compiling\x20ffmpeg)','228488BRrQEZ','Group\x20name\x20just\x20updated\x0a*👑\x20New\x20Name:*\x0a@group','OREO-BOT','mongodbv2','Please\x20install\x20ffmpeg\x20for\x20sending\x20videos\x20(pkg\x20install\x20ffmpeg)','race','./server.js','support','freeze','data','./tmp','keys','NODE_TLS_REJECT_UNAUTHORIZED','error','argv','6304382nYRjBb','reloadHandler','slice','APIKeys','plugins','35200BloLIP','cyan','Authenticators','✨\x20New\x20plugin\x20-\x20\x27','READ','./plugins/index','-frames:v','The\x20group\x20icon\x20has\x20been\x20changed\x20🌸','connectionUpdate','localeCompare'];_0x3579=function(){return _0x162c82;};return _0x3579();}process['on'](_0x48f217(0x16a),console['error']);let isInit=!![],handler=await import('./handler.js');global['reloadHandler']=async function(_0x29b3fb){const _0x2ab821=_0x48f217;try{const _0x4228b9=await import(_0x2ab821(0x1b6)+Date[_0x2ab821(0x17e)]())[_0x2ab821(0x1b5)](console[_0x2ab821(0x1a3)]);if(Object[_0x2ab821(0x1a1)](_0x4228b9||{})['length'])handler=_0x4228b9;}catch(_0x3b898b){console[_0x2ab821(0x1a3)](_0x3b898b);}if(_0x29b3fb){const _0x4791c9=global['conn'][_0x2ab821(0x159)];try{global[_0x2ab821(0x14a)]['ws'][_0x2ab821(0x181)]();}catch{}conn['ev'][_0x2ab821(0x190)](),global[_0x2ab821(0x14a)]=makeWASocket(connectionOptions,{'chats':_0x4791c9}),isInit=!![];}return!isInit&&(conn['ev'][_0x2ab821(0x173)](_0x2ab821(0x178),conn[_0x2ab821(0x1bd)]),conn['ev'][_0x2ab821(0x173)](_0x2ab821(0x135),conn[_0x2ab821(0x155)]),conn['ev'][_0x2ab821(0x173)](_0x2ab821(0x179),conn['groupsUpdate']),conn['ev'][_0x2ab821(0x173)](_0x2ab821(0x139),conn[_0x2ab821(0x15a)]),conn['ev'][_0x2ab821(0x173)](_0x2ab821(0x164),conn['connectionUpdate']),conn['ev'][_0x2ab821(0x173)](_0x2ab821(0x149),conn[_0x2ab821(0x13c)])),conn[_0x2ab821(0x17a)]=_0x2ab821(0x162),conn[_0x2ab821(0x166)]=_0x2ab821(0x15d),conn['spromote']='@user\x20is\x20now\x20Admin\x20🧧',conn[_0x2ab821(0x17b)]='@user\x20is\x20no\x20Longer\x20Admin\x20🧧🔫',conn['sDesc']=_0x2ab821(0x142),conn[_0x2ab821(0x161)]=_0x2ab821(0x197),conn[_0x2ab821(0x14c)]=_0x2ab821(0x1b1),conn[_0x2ab821(0x1c3)]=_0x2ab821(0x13d),conn['handler']=handler[_0x2ab821(0x1bd)]['bind'](global[_0x2ab821(0x14a)]),conn['participantsUpdate']=handler[_0x2ab821(0x155)][_0x2ab821(0x182)](global[_0x2ab821(0x14a)]),conn['groupsUpdate']=handler[_0x2ab821(0x148)][_0x2ab821(0x182)](global['conn']),conn[_0x2ab821(0x15a)]=handler[_0x2ab821(0x169)][_0x2ab821(0x182)](global[_0x2ab821(0x14a)]),conn[_0x2ab821(0x1b2)]=connectionUpdate[_0x2ab821(0x182)](global[_0x2ab821(0x14a)]),conn['credsUpdate']=saveCreds[_0x2ab821(0x182)](global['conn'],!![]),conn['ev']['on'](_0x2ab821(0x178),conn[_0x2ab821(0x1bd)]),conn['ev']['on'](_0x2ab821(0x135),conn[_0x2ab821(0x155)]),conn['ev']['on']('groups.update',conn[_0x2ab821(0x148)]),conn['ev']['on'](_0x2ab821(0x139),conn[_0x2ab821(0x15a)]),conn['ev']['on'](_0x2ab821(0x164),conn['connectionUpdate']),conn['ev']['on']('creds.update',conn['credsUpdate']),isInit=![],!![];};const pluginFolder=global['__dirname'](join(__dirname,_0x48f217(0x1af))),pluginFilter=_0x2c6684=>/\.js$/[_0x48f217(0x146)](_0x2c6684);global[_0x48f217(0x1a9)]={};async function filesInit(){const _0x47186c=_0x48f217;for(let _0x5dd690 of readdirSync(pluginFolder)[_0x47186c(0x1b9)](pluginFilter)){try{let _0x2d937b=global['__filename'](join(pluginFolder,_0x5dd690));const _0x1417b1=await import(_0x2d937b);global[_0x47186c(0x1a9)][_0x5dd690]=_0x1417b1[_0x47186c(0x16e)]||_0x1417b1;}catch(_0x52c6d6){conn[_0x47186c(0x1c1)][_0x47186c(0x1a3)](_0x52c6d6),delete global[_0x47186c(0x1a9)][_0x5dd690];}}}filesInit()[_0x48f217(0x136)](_0x13522b=>console[_0x48f217(0x1b7)](Object[_0x48f217(0x1a1)](global[_0x48f217(0x1a9)])))[_0x48f217(0x1b5)](console[_0x48f217(0x1a3)]),global[_0x48f217(0x13f)]=async(_0x9e3b6c,_0x3e9239)=>{const _0x36f93e=_0x48f217;if(pluginFilter(_0x3e9239)){let _0x2760bf=global[_0x36f93e(0x165)](join(pluginFolder,_0x3e9239),!![]);if(_0x3e9239 in global['plugins']){if(existsSync(_0x2760bf))conn[_0x36f93e(0x1c1)][_0x36f93e(0x15b)](_0x36f93e(0x143)+_0x3e9239+'\x27');else return conn[_0x36f93e(0x1c1)][_0x36f93e(0x14f)](_0x36f93e(0x18f)+_0x3e9239+'\x27'),delete global[_0x36f93e(0x1a9)][_0x3e9239];}else conn[_0x36f93e(0x1c1)][_0x36f93e(0x15b)](_0x36f93e(0x1ad)+_0x3e9239+'\x27');let _0x4c05e2=_0x3d851b(readFileSync(_0x2760bf),_0x3e9239,{'sourceType':_0x36f93e(0x140),'allowAwaitOutsideFunction':!![]});if(_0x4c05e2)conn[_0x36f93e(0x1c1)][_0x36f93e(0x1a3)](_0x36f93e(0x167)+_0x3e9239+'\x27\x0a'+format(_0x4c05e2));else try{const _0x327161=await import(global[_0x36f93e(0x165)](_0x2760bf)+_0x36f93e(0x17f)+Date[_0x36f93e(0x17e)]());global[_0x36f93e(0x1a9)][_0x3e9239]=_0x327161['default']||_0x327161;}catch(_0x4e520b){conn[_0x36f93e(0x1c1)][_0x36f93e(0x1a3)]('error\x20require\x20plugin\x20\x27'+_0x3e9239+'\x0a'+format(_0x4e520b)+'\x27');}finally{global[_0x36f93e(0x1a9)]=Object[_0x36f93e(0x1c2)](Object['entries'](global[_0x36f93e(0x1a9)])[_0x36f93e(0x183)](([_0x597f59],[_0x324a6f])=>_0x597f59[_0x36f93e(0x1b3)](_0x324a6f)));}}},Object['freeze'](global[_0x48f217(0x13f)]),watch(pluginFolder,global[_0x48f217(0x13f)]),await global['reloadHandler']();async function _quickTest(){const _0x18d831=_0x48f217;let _0xdc86f9=await Promise[_0x18d831(0x171)]([spawn(_0x18d831(0x160)),spawn(_0x18d831(0x138)),spawn('ffmpeg',[_0x18d831(0x144),_0x18d831(0x193),_0x18d831(0x1a3),_0x18d831(0x172),_0x18d831(0x1ba),_0x18d831(0x1b0),'1','-f',_0x18d831(0x15e),'-']),spawn(_0x18d831(0x1bb)),spawn(_0x18d831(0x141)),spawn('gm'),spawn(_0x18d831(0x177),[_0x18d831(0x16f)])][_0x18d831(0x15f)](_0x1115db=>{const _0x3a9173=_0x18d831;return Promise[_0x3a9173(0x19b)]([new Promise(_0x44b113=>{const _0x5c39f1=_0x3a9173;_0x1115db['on'](_0x5c39f1(0x181),_0x2db112=>{_0x44b113(_0x2db112!==0x7f);});}),new Promise(_0x13143d=>{const _0x16ac74=_0x3a9173;_0x1115db['on'](_0x16ac74(0x1a3),_0x7d828a=>_0x13143d(![]));})]);})),[_0xbf9c70,_0x7ac097,_0x2c13b4,_0x296b1b,_0x39e826,_0x387715,_0x46fe34]=_0xdc86f9;console['log'](_0xdc86f9);let _0x1e6022=global[_0x18d831(0x19d)]={'ffmpeg':_0xbf9c70,'ffprobe':_0x7ac097,'ffmpegWebp':_0x2c13b4,'convert':_0x296b1b,'magick':_0x39e826,'gm':_0x387715,'find':_0x46fe34};Object[_0x18d831(0x19e)](global['support']);if(!_0x1e6022[_0x18d831(0x160)])conn[_0x18d831(0x1c1)][_0x18d831(0x14f)](_0x18d831(0x19a));if(_0x1e6022[_0x18d831(0x160)]&&!_0x1e6022['ffmpegWebp'])conn[_0x18d831(0x1c1)][_0x18d831(0x14f)](_0x18d831(0x195));if(!_0x1e6022[_0x18d831(0x1bb)]&&!_0x1e6022[_0x18d831(0x141)]&&!_0x1e6022['gm'])conn['logger'][_0x18d831(0x14f)](_0x18d831(0x18a));}_quickTest()[_0x48f217(0x136)](()=>conn['logger'][_0x48f217(0x15b)](_0x48f217(0x17c)))[_0x48f217(0x1b5)](console[_0x48f217(0x1a3)]);