Wa Gateway | Multi device BETA | MPWA MD

Wa Gateway | Multi device BETA | MPWA MD v8.0.0 ( Extended License )

No permission to download

eslrustler

Member
Dec 26, 2020
51
18
8
They have updated on 23rd August at 4 am UTC time before your post, after that their website gone down for maintenance.
Yesterday their website got live.

Let's see if your modification same as yours then author maybe in this forum.

Could be, funny though if author is spying here :ROFLMAO:
Author can then thanks all the contributors here for enhancing his old code.
 

eslrustler

Member
Dec 26, 2020
51
18
8
You have shared helpful file.
It will be great if you share steps on how to decrypt js file will be great.
I hope you will share it and this will help to this community.
Maybe this tool?

I have not tried it but it can help in decrypting js file indeed.

1661505858763.png
 

Morehere

Well-known member
Null Master
Trusted Uploader
Jan 13, 2020
965
959
93
Could be, funny though if author is spying here :ROFLMAO:
Author can then thanks all the contributors here for enhancing his old code.
I guess author will not follow.
This script is made by them before our thread.
Please note that according to new version's update logs there are no such changes occurred by following this forum's contributor's shared codes or idea.
 

hmc

Member
Banned User
Jul 23, 2022
98
50
18
Server Room
localhost
whatsapp.js

\server\router\model

Code:
'use strict';
const _0x53cdf0 = _0x5f5b;
(function (_0x3d2668, _0x28b219) {
    const _0x104606 = _0x5f5b,
        _0x1dd4b6 = _0x3d2668();
    while (!![]) {
        try {
            const _0x2cf8ee = -parseInt(_0x104606(0x145)) / 0x1 + -parseInt(_0x104606(0x132)) / 0x2 + parseInt(_0x104606(0xfe)) / 0x3 + -parseInt(_0x104606(0x121)) / 0x4 * (parseInt(_0x104606(0x102)) / 0x5) + -parseInt(_0x104606(0xff)) / 0x6 + -parseInt(_0x104606(0x139)) / 0x7 + parseInt(_0x104606(0x114)) / 0x8;
            if (_0x2cf8ee === _0x28b219) break;
            else _0x1dd4b6['push'](_0x1dd4b6['shift']());
        } catch (_0x3ff965) {
            _0x1dd4b6['push'](_0x1dd4b6['shift']());
        }
    }
}(_0x3d17, 0xe76d4));
const {
    default: makeWASocket,
    makeWALegacySocket,
    downloadContentFromMessage
} = require(_0x53cdf0(0x130)), {
    useSingleFileAuthState,
    makeInMemoryStore,
    fetchLatestBaileysVersion,
    AnyMessageContent,
    delay,
    MessageRetryMap,
    useMultiFileAuthState
} = require('@adiwajshing/baileys'), {
    DisconnectReason
} = require(_0x53cdf0(0x130)), QRCode = require(_0x53cdf0(0xf2)), lib = require(_0x53cdf0(0x11c)), fs = require('fs');
let sock = [],
    qrcode = [],
    intervalStore = [];
const {
    setStatus
} = require(_0x53cdf0(0x126)), {
    autoReply
} = require(_0x53cdf0(0x124)), {
    formatReceipt
} = require(_0x53cdf0(0x138)), axios = require(_0x53cdf0(0x133)), MAIN_LOGGER = require(_0x53cdf0(0x11d)), logger = MAIN_LOGGER[_0x53cdf0(0x129)]({}), useStore = !process[_0x53cdf0(0x146)][_0x53cdf0(0x105)](_0x53cdf0(0x142)), msgRetryCounterMap = () => MessageRetryMap = {}, connectToWhatsApp = async (_0x5d8b03, _0x411f60 = null) => {
    const _0x34ef30 = _0x53cdf0;
    if (typeof qrcode[_0x5d8b03] !== _0x34ef30(0x111)) return _0x411f60 !== null && _0x411f60[_0x34ef30(0x11e)](_0x34ef30(0xf2), {
        'token': _0x5d8b03,
        'data': qrcode[_0x5d8b03],
        'message': _0x34ef30(0xf4)
    }), {
        'status': ![],
        'sock': sock[_0x5d8b03],
        'qrcode': qrcode[_0x5d8b03],
        'message': _0x34ef30(0xfd)
    };
    try {
        let _0x391c37 = sock[_0x5d8b03]['user']['id'][_0x34ef30(0x118)](':');
        _0x391c37 = _0x391c37[0x0] + _0x34ef30(0x147);
        const _0xd5bdf9 = await getPpUrl(_0x5d8b03, _0x391c37);
        return _0x411f60 !== null && _0x411f60['emit'](_0x34ef30(0x144), {
            'token': _0x5d8b03,
            'user': sock[_0x5d8b03][_0x34ef30(0xf7)],
            'ppUrl': _0xd5bdf9
        }), {
            'status': !![],
            'message': _0x34ef30(0x140)
        };
    } catch (_0x5e852e) {
        _0x411f60 !== null && _0x411f60['emit'](_0x34ef30(0x101), {
            'token': _0x5d8b03,
            'message': 'Try to connecting ' + _0x5d8b03
        }), console[_0x34ef30(0x12a)](_0x34ef30(0xf5) + _0x5d8b03);
    }
    const {
        state: _0x5b4d3f,
        saveCreds: _0xcd46e8
    } = await useMultiFileAuthState(_0x34ef30(0x100) + _0x5d8b03), _0x481c43 = await getChromeLates();
    console[_0x34ef30(0x12a)](_0x34ef30(0x110) + _0x481c43?. [_0x34ef30(0x10c)]?. ['versions'][0x0]?. [_0x34ef30(0x106)] + _0x34ef30(0x10e) + (_0x481c43?. ['data']?. [_0x34ef30(0x137)][_0x34ef30(0x131)] > 0x0 ? !![] : ![]));
    const {
        version: _0xb8b69,
        isLatest: _0x4e402a
    } = await fetchLatestBaileysVersion();
    return console[_0x34ef30(0x12a)](_0x34ef30(0x112) + _0xb8b69[_0x34ef30(0x107)]('.') + _0x34ef30(0x10e) + _0x4e402a), sock[_0x5d8b03] = makeWASocket({
        'version': _0xb8b69,
        'browser': [_0x34ef30(0x12e), _0x34ef30(0x103), _0x481c43?. [_0x34ef30(0x10c)]?. [_0x34ef30(0x137)][0x0]?. ['version']],
        'logger': logger,
        'printQRInTerminal': !![],
        'auth': _0x5b4d3f
    }), sock[_0x5d8b03]['ev']['on'](_0x34ef30(0x148), _0x3e9b88 => {
        autoReply(_0x3e9b88, sock[_0x5d8b03]);
    }), sock[_0x5d8b03]['ev']['on']('connection.update', async _0x551a8e => {
        const _0x1188bf = _0x34ef30,
            {
                connection: _0x2d88fd,
                qr: _0x40d980,
                lastDisconnect: _0x42dc9d
            } = _0x551a8e;
        if (_0x2d88fd === _0x1188bf(0xf9)) {
            if (_0x42dc9d[_0x1188bf(0x14d)]?. [_0x1188bf(0x10b)]?. [_0x1188bf(0x123)] !== DisconnectReason['loggedOut']) {
                if (_0x42dc9d[_0x1188bf(0x14d)]?. [_0x1188bf(0x10b)]?. [_0x1188bf(0xfb)]?. [_0x1188bf(0x101)] === _0x1188bf(0x12b)) {
                    delete qrcode[_0x5d8b03], connectToWhatsApp(_0x5d8b03, _0x411f60);
                    if (_0x411f60 != null) _0x411f60[_0x1188bf(0x11e)](_0x1188bf(0x101), {
                        'token': _0x5d8b03,
                        'message': _0x1188bf(0x13c)
                    });
                } else {
                    if (_0x42dc9d[_0x1188bf(0x14d)]?. [_0x1188bf(0x10b)]?. [_0x1188bf(0xfb)]?. ['message'] === _0x1188bf(0x113)) {
                        delete qrcode[_0x5d8b03];
                        if (_0x411f60 != null) _0x411f60['emit'](_0x1188bf(0x101), {
                            'token': _0x5d8b03,
                            'message': _0x42dc9d[_0x1188bf(0x14d)][_0x1188bf(0x10b)][_0x1188bf(0xfb)][_0x1188bf(0x101)],
                            'error': _0x42dc9d[_0x1188bf(0x14d)][_0x1188bf(0x10b)][_0x1188bf(0xfb)]['error']
                        });
                    }
                }
            } else _0x42dc9d[_0x1188bf(0x14d)]?. [_0x1188bf(0x10b)]?. ['statusCode'] === 0x191 && (setStatus(_0x5d8b03, _0x1188bf(0xfa)), console['log']('Connection closed. You are logged out.'), _0x411f60 !== null && _0x411f60[_0x1188bf(0x11e)]('message', {
                'token': _0x5d8b03,
                'message': _0x1188bf(0x10a)
            }), clearConnection(_0x5d8b03));
        }
        _0x40d980 && QRCode[_0x1188bf(0x108)](_0x40d980, function (_0x182750, _0x38dc31) {
            const _0x13c347 = _0x1188bf;
            _0x182750 && console[_0x13c347(0x12a)](_0x182750), qrcode[_0x5d8b03] = _0x38dc31, _0x411f60 !== null && _0x411f60[_0x13c347(0x11e)](_0x13c347(0xf2), {
                'token': _0x5d8b03,
                'data': _0x38dc31,
                'message': _0x13c347(0xf4)
            });
        });
        if (_0x2d88fd === _0x1188bf(0x134)) {
            setStatus(_0x5d8b03, 'Connected');
            let _0x2aaacd = sock[_0x5d8b03][_0x1188bf(0xf7)]['id']['split'](':');
            _0x2aaacd = _0x2aaacd[0x0] + '@s.whatsapp.net';
            const _0x2a1827 = await getPpUrl(_0x5d8b03, _0x2aaacd);
            _0x411f60 !== null && _0x411f60['emit'](_0x1188bf(0x144), {
                'token': _0x5d8b03,
                'user': sock[_0x5d8b03][_0x1188bf(0xf7)],
                'ppUrl': _0x2a1827
            }), delete qrcode[_0x5d8b03];
        }
    }), sock[_0x5d8b03]['ev']['on'](_0x34ef30(0x12d), _0xcd46e8), {
        'sock': sock[_0x5d8b03],
        'qrcode': qrcode[_0x5d8b03]
    };
};
async function connectWaBeforeSend(_0x35fddd) {
    const _0xe12a28 = _0x53cdf0;
    let _0x574872 = undefined,
        _0x4625e4;
    _0x4625e4 = await connectToWhatsApp(_0x35fddd), await _0x4625e4['sock']['ev']['on'](_0xe12a28(0x13a), _0x195721 => {
        const {
            connection: _0x354d40,
            qr: _0x33516a
        } = _0x195721;
        _0x354d40 === 'open' && (_0x574872 = !![]), _0x33516a && (_0x574872 = ![]);
    });
    let _0x38a757 = 0x0;
    while (typeof _0x574872 === _0xe12a28(0x111)) {
        _0x38a757++;
        if (_0x38a757 > 0x4) break;
        await new Promise(_0x2a4b16 => setTimeout(_0x2a4b16, 0x3e8));
    }
    return _0x574872;
}
const sendText = async (_0xb643e8, _0x3bd2a1, _0x126b1b) => {
    const _0xbe326c = _0x53cdf0;
    try {
        const _0x504935 = await sock[_0xb643e8][_0xbe326c(0x14c)](formatReceipt(_0x3bd2a1), {
            'text': _0x126b1b
        });
        return _0x504935;
    } catch (_0x1cd0c1) {
        return console[_0xbe326c(0x12a)](_0x1cd0c1), ![];
    }
}, sendMessage = async (_0x376f82, _0x44ecba, _0x5a5bf4) => {
    const _0x4a1cbd = _0x53cdf0;
    try {
        const _0x523010 = JSON['parse'](_0x5a5bf4);
        let _0x13f4bc = ![];
        _0x44ecba['length'] > 0xe ? (_0x44ecba = _0x44ecba + _0x4a1cbd(0x115), _0x13f4bc = !![]) : _0x13f4bc = await isExist(_0x376f82, formatReceipt(_0x44ecba));
        if (_0x13f4bc) {
            const _0x21b916 = await sock[_0x376f82][_0x4a1cbd(0x14c)](formatReceipt(_0x44ecba), JSON['parse'](_0x5a5bf4));
            return _0x21b916;
        }
        return ![];
    } catch (_0xcde9f6) {
        return console[_0x4a1cbd(0x12a)](_0xcde9f6), ![];
    }
};
function _0x3d17() {
    const _0x198639 = ['xls', '../../database/index', 'application/pdf', ' connection was estabilished', 'child', 'log', 'Stream Errored (restart required)', 'readFileSync', 'creds.update', 'SUNOR Gateway', 'get', '@adiwajshing/baileys', 'length', '3284448TUdtXz', 'axios', 'open', 'logout', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'versions', '../helper', '6870878MSMRKt', 'connection.update', 'rmSync', 'Reconnecting', ' is deleted', 'Nothing deleted', 'application/msword', 'Already connected', 'video', '--no-store', 'docx', 'connection-open', '272287hRnbEV', 'argv', '@s.whatsapp.net', 'messages.upsert', 'url', 'src/public/temp/', 'slice', 'sendMessage', 'error', 'existsSync', 'qrcode', 'send', 'Qrcode updated, please scann with your Whatsapp Device', 'Try to connecting ', 'displayText', 'user', 'Deleting session and credential', 'close', 'Disconnect', 'payload', 'groupFetchAllParticipating', 'Please scann qrcode', '1439961qHlakO', '4759482zkFHia', './credentials/', 'message', '449035ZYiFlH', 'Chrome', 'map', 'includes', 'version', 'join', 'toDataURL', 'exports', 'Connection closed. You are logged out.', 'output', 'data', 'application/mp3', ', isLatest: ', 'xlsx', 'using Chrome v', 'undefined', 'using WA v', 'QR refs attempts ended', '45471744TqkmcE', '@g.us', 'application/excel', 'entries', 'split', 'Logout Progres..', 'Please add your won role of mimetype', ' Connection failed,please scan first', '../../lib', '../../lib/pino', 'emit', 'body', 'image', '68xnViIa', 'profilePictureUrl', 'statusCode', './autoreply'];
    _0x3d17 = function () {
        return _0x198639;
    };
    return _0x3d17();
}
async function sendMedia(_0x19650e, _0x2e9ecb, _0x9d1bf6, _0x576574, _0x9f595a, _0x3bb9eb) {
    const _0x72de8e = _0x53cdf0,
        _0x3da4b5 = formatReceipt(_0x2e9ecb);
    try {
        if (_0x9d1bf6 == _0x72de8e(0x120)) var _0xf96846 = await sock[_0x19650e][_0x72de8e(0x14c)](_0x3da4b5, {
            'image': _0x576574 ? {
                'url': _0x576574
            } : fs[_0x72de8e(0x12c)]('src/public/temp/' + _0x9f595a),
            'caption': _0x3bb9eb ? _0x3bb9eb : null
        });
        else {
            if (_0x9d1bf6 == _0x72de8e(0x141)) var _0xf96846 = await sock[_0x19650e][_0x72de8e(0x14c)](_0x3da4b5, {
                'video': _0x576574 ? {
                    'url': _0x576574
                } : fs[_0x72de8e(0x12c)](_0x72de8e(0x14a) + _0x9f595a),
                'caption': _0x3bb9eb ? _0x3bb9eb : null
            });
            else {
                if (_0x9d1bf6 == 'audio') var _0xf96846 = await sock[_0x19650e]['sendMessage'](_0x3da4b5, {
                    'audio': _0x576574 ? {
                        'url': _0x576574
                    } : fs[_0x72de8e(0x12c)](_0x72de8e(0x14a) + _0x9f595a),
                    'caption': _0x3bb9eb ? _0x3bb9eb : null
                });
                else {
                    if (_0x9d1bf6 == 'pdf') var _0xf96846 = await sock[_0x19650e][_0x72de8e(0x14c)](_0x3da4b5, {
                        'document': {
                            'url': _0x576574
                        },
                        'mimetype': _0x72de8e(0x127)
                    }, {
                        'url': _0x576574
                    });
                    else {
                        if (_0x9d1bf6 == _0x72de8e(0x125)) var _0xf96846 = await sock[_0x19650e][_0x72de8e(0x14c)](_0x3da4b5, {
                            'document': {
                                'url': _0x576574
                            },
                            'mimetype': _0x72de8e(0x116)
                        }, {
                            'url': _0x576574
                        });
                        else {
                            if (_0x9d1bf6 == _0x72de8e(0x125)) var _0xf96846 = await sock[_0x19650e][_0x72de8e(0x14c)](_0x3da4b5, {
                                'document': {
                                    'url': _0x576574
                                },
                                'mimetype': _0x72de8e(0x116)
                            }, {
                                'url': _0x576574
                            });
                            else {
                                if (_0x9d1bf6 == _0x72de8e(0x10f)) var _0xf96846 = await sock[_0x19650e][_0x72de8e(0x14c)](_0x3da4b5, {
                                    'document': {
                                        'url': _0x576574
                                    },
                                    'mimetype': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
                                }, {
                                    'url': _0x576574
                                });
                                else {
                                    if (_0x9d1bf6 == 'doc') var _0xf96846 = await sock[_0x19650e][_0x72de8e(0x14c)](_0x3da4b5, {
                                        'document': {
                                            'url': _0x576574
                                        },
                                        'mimetype': _0x72de8e(0x13f)
                                    }, {
                                        'url': _0x576574
                                    });
                                    else {
                                        if (_0x9d1bf6 == _0x72de8e(0x143)) var _0xf96846 = await sock[_0x19650e][_0x72de8e(0x14c)](_0x3da4b5, {
                                            'document': {
                                                'url': _0x576574
                                            },
                                            'mimetype': _0x72de8e(0x136)
                                        }, {
                                            'url': _0x576574
                                        });
                                        else {
                                            if (_0x9d1bf6 == 'zip') var _0xf96846 = await sock[_0x19650e][_0x72de8e(0x14c)](_0x3da4b5, {
                                                'document': {
                                                    'url': _0x576574
                                                },
                                                'mimetype': 'application/zip'
                                            }, {
                                                'url': _0x576574
                                            });
                                            else {
                                                if (_0x9d1bf6 == 'mp3') var _0xf96846 = await sock[_0x19650e][_0x72de8e(0x14c)](_0x3da4b5, {
                                                    'document': {
                                                        'url': _0x576574
                                                    },
                                                    'mimetype': _0x72de8e(0x10d)
                                                }, {
                                                    'url': _0x576574
                                                });
                                                else return console[_0x72de8e(0x12a)](_0x72de8e(0x11a)), ![];
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        return _0xf96846;
    } catch (_0x4479f1) {
        return console[_0x72de8e(0x12a)](_0x4479f1), ![];
    }
}
function _0x5f5b(_0x425622, _0x2aa1fb) {
    const _0x3d17aa = _0x3d17();
    return _0x5f5b = function (_0x5f5b5d, _0x2f1675) {
        _0x5f5b5d = _0x5f5b5d - 0xf2;
        let _0x43bf93 = _0x3d17aa[_0x5f5b5d];
        return _0x43bf93;
    }, _0x5f5b(_0x425622, _0x2aa1fb);
}
async function sendButtonMessage(_0xa1b22b, _0x1f6c22, _0x326134, _0x59b009, _0xfc5339, _0x458664) {
    const _0x2a7fed = _0x53cdf0;
    let _0x5c26ec = _0x2a7fed(0x149);
    try {
        const _0x1ddfff = _0x326134[_0x2a7fed(0x104)]((_0x5a231d, _0x2e47db) => {
            const _0x1d2770 = _0x2a7fed;
            return console[_0x1d2770(0x12a)](_0x5a231d), {
                'buttonId': _0x2e47db,
                'buttonText': {
                    'displayText': _0x5a231d[_0x1d2770(0xf6)]
                },
                'type': 0x1
            };
        });
        if (_0x458664) var _0x41d9a2 = {
            'image': _0x5c26ec == 'url' ? {
                'url': _0x458664
            } : fs[_0x2a7fed(0x12c)](_0x2a7fed(0x14a) + _0x458664),
            'caption': _0x59b009,
            'footer': _0xfc5339,
            'buttons': _0x1ddfff,
            'headerType': 0x4
        };
        else var _0x41d9a2 = {
            'text': _0x59b009,
            'footer': _0xfc5339,
            'buttons': _0x1ddfff,
            'headerType': 0x1
        };
        const _0x868344 = await sock[_0xa1b22b][_0x2a7fed(0x14c)](formatReceipt(_0x1f6c22), _0x41d9a2);
        return _0x868344;
    } catch (_0x60dc63) {
        return console['log'](_0x60dc63), ![];
    }
}
async function sendTemplateMessage(_0x411b70, _0x2c7673, _0x2cddc2, _0x273a56, _0xf9e1f1, _0x456b0e) {
    const _0x18fcbc = _0x53cdf0;
    try {
        console[_0x18fcbc(0x12a)](_0x2cddc2);
        if (_0x456b0e) var _0x752123 = {
            'caption': _0x273a56,
            'footer': _0xf9e1f1,
            'templateButtons': _0x2cddc2,
            'image': {
                'url': _0x456b0e
            }
        };
        else var _0x752123 = {
            'text': _0x273a56,
            'footer': _0xf9e1f1,
            'templateButtons': _0x2cddc2
        };
        const _0x39de6e = await sock[_0x411b70][_0x18fcbc(0x14c)](formatReceipt(_0x2c7673), _0x752123);
        return _0x39de6e;
    } catch (_0x2b6ae3) {
        return console[_0x18fcbc(0x12a)](_0x2b6ae3), ![];
    }
}
async function sendListMessage(_0x5dcccf, _0x103058, _0x12aa17, _0x2c0ff1, _0x31ec7a, _0x11ec86, _0x567c23) {
    const _0x51ff1a = _0x53cdf0;
    try {
        const _0x1e141c = {
                'text': _0x2c0ff1,
                'footer': _0x31ec7a,
                'title': _0x11ec86,
                'buttonText': _0x567c23,
                'sections': [_0x12aa17]
            },
            _0x174c8e = await sock[_0x5dcccf]['sendMessage'](formatReceipt(_0x103058), _0x1e141c);
        return _0x174c8e;
    } catch (_0x9c8798) {
        return console[_0x51ff1a(0x12a)](_0x9c8798), ![];
    }
}
async function fetchGroups(_0x28a7de) {
    const _0x23b434 = _0x53cdf0;
    try {
        let _0x24e4fc = await sock[_0x28a7de][_0x23b434(0xfc)](),
            _0x57b512 = Object[_0x23b434(0x117)](_0x24e4fc)[_0x23b434(0x14b)](0x0)[_0x23b434(0x104)](_0x538ede => _0x538ede[0x1]);
        return _0x57b512;
    } catch (_0x3fdbfb) {
        return ![];
    }
}
async function isExist(_0xb342b5, _0x5588c5) {
    const _0x55681a = _0x53cdf0;
    if (typeof sock[_0xb342b5] === _0x55681a(0x111)) {
        const _0x2bc24b = await connectWaBeforeSend(_0xb342b5);
        if (!_0x2bc24b) return ![];
    }
    try {
        if (_0x5588c5[_0x55681a(0x105)](_0x55681a(0x115))) return !![];
        else {
            const [_0x2d15f3] = await sock[_0xb342b5]['onWhatsApp'](_0x5588c5);
            return _0x2d15f3;
        }
    } catch (_0x4df1b9) {
        return ![];
    }
}
async function getPpUrl(_0x7b397f, _0x2e1753, _0x51b875) {
    const _0x26c4fb = _0x53cdf0;
    let _0x115119;
    try {
        return _0x51b875 ? _0x115119 = await sock[_0x7b397f]['profilePictureUrl'](_0x2e1753, 'image') : _0x115119 = await sock[_0x7b397f][_0x26c4fb(0x122)](_0x2e1753), _0x115119;
    } catch (_0x4426c9) {
        return 'https://upload.wikimedia.org/wikipedia/commons/thumb/6/6b/WhatsApp.svg/1200px-WhatsApp.svg.png';
    }
}
async function deleteCredentials(_0x5c54ee, _0x1f0c56 = null) {
    const _0x4cb3fa = _0x53cdf0;
    _0x1f0c56 !== null && _0x1f0c56[_0x4cb3fa(0x11e)](_0x4cb3fa(0x101), {
        'token': _0x5c54ee,
        'message': _0x4cb3fa(0x119)
    });
    try {
        if (typeof sock[_0x5c54ee] === _0x4cb3fa(0x111)) {
            const _0x11f88b = await connectWaBeforeSend(_0x5c54ee);
            _0x11f88b && (sock[_0x5c54ee][_0x4cb3fa(0x135)](), delete sock[_0x5c54ee]);
        } else sock[_0x5c54ee][_0x4cb3fa(0x135)](), delete sock[_0x5c54ee];
        return delete qrcode[_0x5c54ee], clearInterval(intervalStore[_0x5c54ee]), setStatus(_0x5c54ee, 'Disconnect'), _0x1f0c56 != null && (_0x1f0c56[_0x4cb3fa(0x11e)]('Unauthorized', _0x5c54ee), _0x1f0c56['emit'](_0x4cb3fa(0x101), {
            'token': _0x5c54ee,
            'message': _0x4cb3fa(0x10a)
        })), fs['existsSync'](_0x4cb3fa(0x100) + _0x5c54ee) && fs[_0x4cb3fa(0x13b)]('./credentials/' + _0x5c54ee, {
            'recursive': !![],
            'force': !![]
        }, _0x5580c4 => {
            if (_0x5580c4) console['log'](_0x5580c4);
        }), {
            'status': !![],
            'message': _0x4cb3fa(0xf8)
        };
    } catch (_0xd58e2d) {
        return console[_0x4cb3fa(0x12a)](_0xd58e2d), {
            'status': !![],
            'message': _0x4cb3fa(0x13e)
        };
    }
}
async function getChromeLates() {
    const _0x2b49a9 = _0x53cdf0,
        _0x324322 = await axios[_0x2b49a9(0x12f)]('https://versionhistory.googleapis.com/v1/chrome/platforms/linux/channels/stable/versions');
    return _0x324322;
}
function clearConnection(_0x3c7716) {
    const _0x5c878a = _0x53cdf0;
    clearInterval(intervalStore[_0x3c7716]), delete sock[_0x3c7716], delete qrcode[_0x3c7716], setStatus(_0x3c7716, _0x5c878a(0xfa)), fs['existsSync'](_0x5c878a(0x100) + _0x3c7716) && (fs[_0x5c878a(0x13b)](_0x5c878a(0x100) + _0x3c7716, {
        'recursive': !![],
        'force': !![]
    }, _0x41de93 => {
        const _0x487767 = _0x5c878a;
        if (_0x41de93) console[_0x487767(0x12a)](_0x41de93);
    }), console[_0x5c878a(0x12a)]('credentials/' + _0x3c7716 + _0x5c878a(0x13d)));
}
async function initialize(_0x3fcd0a, _0x1d5a38) {
    const _0x198e90 = _0x53cdf0,
        {
            token: _0x5bc86b
        } = _0x3fcd0a[_0x198e90(0x11f)];
    if (_0x5bc86b) {
        const _0x15041b = require('fs'),
            _0x4ee774 = './credentials/' + _0x5bc86b;
        if (_0x15041b[_0x198e90(0x14e)](_0x4ee774)) {
            if (typeof sock[_0x5bc86b] === 'undefined') {
                const _0x2b524c = await connectWaBeforeSend(_0x5bc86b);
                return _0x2b524c ? _0x1d5a38[_0x198e90(0xf3)]({
                    'status': !![],
                    'message': _0x5bc86b + _0x198e90(0x128)
                }) : _0x1d5a38['send']({
                    'status': ![],
                    'message': _0x5bc86b + ' Connection failed,please scan first'
                });
            }
            return _0x1d5a38[_0x198e90(0xf3)]({
                'status': !![],
                'message': _0x5bc86b + _0x198e90(0x128)
            });
        }
        return _0x1d5a38[_0x198e90(0xf3)]({
            'status': ![],
            'message': _0x5bc86b + _0x198e90(0x11b)
        });
    }
    return _0x1d5a38[_0x198e90(0xf3)]({
        'status': ![],
        'message': 'Wrong Parameterss'
    });
}
module[_0x53cdf0(0x109)] = {
    'connectToWhatsApp': connectToWhatsApp,
    'sendText': sendText,
    'sendMedia': sendMedia,
    'sendButtonMessage': sendButtonMessage,
    'sendTemplateMessage': sendTemplateMessage,
    'sendListMessage': sendListMessage,
    'isExist': isExist,
    'getPpUrl': getPpUrl,
    'fetchGroups': fetchGroups,
    'deleteCredentials': deleteCredentials,
    'sendMessage': sendMessage,
    'initialize': initialize,
    'connectWaBeforeSend': connectWaBeforeSend
};

[/SPOILER]
 
Last edited:

shopyan

Active member
Banned User
May 11, 2021
117
97
28
very special forum, I will also add some variables for sending messages in addition to the {name} variable
 

hmc

Member
Banned User
Jul 23, 2022
98
50
18
Server Room
localhost
store.js
\server\router\model

Code:
'use strict';
const _0xe4f3e8 = _0x5b13;
(function (_0x34c711, _0x503640) {
    const _0x565c2c = _0x5b13,
        _0x38d71b = _0x34c711();
    while (!![]) {
        try {
            const _0xb64c53 = parseInt(_0x565c2c(0x140)) / 0x1 * (-parseInt(_0x565c2c(0x138)) / 0x2) + -parseInt(_0x565c2c(0x131)) / 0x3 + -parseInt(_0x565c2c(0x13e)) / 0x4 * (-parseInt(_0x565c2c(0x13f)) / 0x5) + parseInt(_0x565c2c(0x137)) / 0x6 + parseInt(_0x565c2c(0x142)) / 0x7 + -parseInt(_0x565c2c(0x136)) / 0x8 * (-parseInt(_0x565c2c(0x130)) / 0x9) + -parseInt(_0x565c2c(0x144)) / 0xa;
            if (_0xb64c53 === _0x503640) break;
            else _0x38d71b['push'](_0x38d71b['shift']());
        } catch (_0x50fc16) {
            _0x38d71b['push'](_0x38d71b['shift']());
        }
    }
}(_0x2e26, 0x73dc8));
const fs = require('fs'),
    chats = (_0x369a07, _0x50a1ac) => {
        const _0x2c9e55 = _0x5b13,
            {
                token: _0x8e6845,
                type: _0x1b9ee4,
                jid: _0x35fb8c
            } = _0x369a07['body'];
        if (_0x8e6845 && _0x1b9ee4) try {
            const _0x2c481c = fs[_0x2c9e55(0x13a)]('credentials/' + _0x8e6845 + '/multistore.js', {
                'encoding': 'utf8'
            });
            let _0x5ac404 = JSON[_0x2c9e55(0x13d)](_0x2c481c);
            if (_0x1b9ee4 === _0x2c9e55(0x141)) _0x5ac404 = _0x5ac404[_0x2c9e55(0x141)];
            else {
                if (_0x1b9ee4 === _0x2c9e55(0x12d)) _0x5ac404 = _0x5ac404[_0x2c9e55(0x12d)];
                else {
                    if (_0x1b9ee4 === _0x2c9e55(0x143)) _0x35fb8c ? _0x5ac404 = _0x5ac404['messages'][_0x35fb8c] : _0x5ac404 = _0x5ac404[_0x2c9e55(0x143)];
                    else return _0x50a1ac[_0x2c9e55(0x135)]({
                        'status': ![],
                        'message': _0x2c9e55(0x139)
                    });
                }
            }
            if (typeof _0x5ac404 === _0x2c9e55(0x134)) return _0x50a1ac[_0x2c9e55(0x135)]({
                'status': ![],
                'message': _0x2c9e55(0x132)
            });
            return _0x50a1ac['send'](_0x5ac404[_0x2c9e55(0x12e)] > 0x0 ? _0x5ac404[_0x2c9e55(0x13b)]() : _0x5ac404);
        } catch (_0x3c3382) {
            return process['env'][_0x2c9e55(0x12f)] !== 'production' ? console['log'](_0x3c3382) : null, _0x50a1ac[_0x2c9e55(0x135)]({
                'status': ![],
                'error': _0x3c3382
            });
        }
        _0x50a1ac['send']({
            'status': ![],
            'error': _0x2c9e55(0x13c)
        });
    };
module[_0xe4f3e8(0x133)] = {
    'chats': chats
};
function _0x5b13(_0x3f50e5, _0x5acc4a) {
    const _0x2e26eb = _0x2e26();
    return _0x5b13 = function (_0x5b1363, _0x4c0474) {
        _0x5b1363 = _0x5b1363 - 0x12d;
        let _0x4fb4f2 = _0x2e26eb[_0x5b1363];
        return _0x4fb4f2;
    }, _0x5b13(_0x3f50e5, _0x5acc4a);
}
function _0x2e26() {
    const _0x555b22 = ['readFileSync', 'reverse', 'wrong parameters', 'parse', '6676ImxYzj', '1795XHkCqJ', '2910GhqWgU', 'chats', '6000673vxFQtw', 'messages', '1602480UkgcKm', 'contacts', 'length', 'NODE_ENV', '585rJWhlB', '1446834REPmnJ', 'Data Not Found', 'exports', 'undefined', 'send', '11512LqoehE', '2675814zqxRWA', '604wNvAGW', 'Unknown type'];
    _0x2e26 = function () {
        return _0x555b22;
    };
    return _0x2e26();
}

[/SPOILER]
 
Last edited:

hmc

Member
Banned User
Jul 23, 2022
98
50
18
Server Room
localhost
routes.js
\server\router\model

Code:
'use strict';
const _0x4e07e0 = _0x1b95;
(function (_0x16bbdb, _0x4c9ff2) {
    const _0x58a2d4 = _0x1b95,
        _0x1b9478 = _0x16bbdb();
    while (!![]) {
        try {
            const _0x3c0594 = parseInt(_0x58a2d4(0x1df)) / 0x1 * (parseInt(_0x58a2d4(0x1e0)) / 0x2) + -parseInt(_0x58a2d4(0x1f6)) / 0x3 + parseInt(_0x58a2d4(0x1de)) / 0x4 + parseInt(_0x58a2d4(0x1f5)) / 0x5 * (parseInt(_0x58a2d4(0x1e5)) / 0x6) + parseInt(_0x58a2d4(0x1fe)) / 0x7 + parseInt(_0x58a2d4(0x1dc)) / 0x8 * (parseInt(_0x58a2d4(0x1ee)) / 0x9) + -parseInt(_0x58a2d4(0x1ff)) / 0xa;
            if (_0x3c0594 === _0x4c9ff2) break;
            else _0x1b9478['push'](_0x1b9478['shift']());
        } catch (_0x3bc7ff) {
            _0x1b9478['push'](_0x1b9478['shift']());
        }
    }
}(_0x1846, 0x1e5d7));
function _0x1b95(_0x4df01f, _0x293d72) {
    const _0x18467e = _0x1846();
    return _0x1b95 = function (_0x1b9591, _0x2767d9) {
        _0x1b9591 = _0x1b9591 - 0x1db;
        let _0x5ce679 = _0x18467e[_0x1b9591];
        return _0x5ce679;
    }, _0x1b95(_0x4df01f, _0x293d72);
}
function _0x1846() {
    const _0x345721 = ['Check your parameterr', '\' AND campaign_id = \'', 'sendListMessage', '5784XCsWSB', 'sender', '628264OamDaQ', '72103cNWLpt', '2HVzQdg', 'UPDATE blasts SET status = \'success\' WHERE receiver = \'', 'delay', 'qrcode', 'sendText', '402oHQqLT', '../../database', 'log', 'connectToWhatsApp', 'end', './whatsapp', 'send', 'data', 'On progress blasat,you can check the report at history blast page', '1539YpCcQb', 'isExist', 'parse', 'Check your connection', 'status', 'Processing', 'Check your parameter', '5430RYaEOp', '338928ZaCpau', 'body', 'fetchGroups', 'The destination Number not registered in whatsapp or your sender not connected', 'exports', 'Check your whatsapp connection', 'processing', 'deleteCredentials', '1351448LnnbRM', '3812770TNyJhE'];
    _0x1846 = function () {
        return _0x345721;
    };
    return _0x1846();
}
const wa = require(_0x4e07e0(0x1ea)),
    lib = require('../../lib'),
    {
        dbQuery
    } = require(_0x4e07e0(0x1e6)),
    {
        asyncForEach,
        formatReceipt
    } = require('../helper'),
    createInstance = async (_0x16c368, _0x5a35ba) => {
        const _0x353f3c = _0x4e07e0,
            {
                token: _0x47c58f
            } = _0x16c368[_0x353f3c(0x1f7)];
        if (_0x47c58f) try {
            const _0x4a3264 = await wa[_0x353f3c(0x1e8)](_0x47c58f, _0x16c368['io']),
                _0x26ecf9 = _0x4a3264?. ['status'],
                _0x58d419 = _0x4a3264?. ['message'];
            return _0x5a35ba[_0x353f3c(0x1eb)]({
                'status': _0x26ecf9 ?? _0x353f3c(0x1fc),
                'qrcode': _0x4a3264?. [_0x353f3c(0x1e3)],
                'message': _0x58d419 ? _0x58d419 : _0x353f3c(0x1f3)
            });
        } catch (_0x36c899) {
            return console[_0x353f3c(0x1e7)](_0x36c899), _0x5a35ba['send']({
                'status': ![],
                'error': _0x36c899
            });
        }
        _0x5a35ba[_0x353f3c(0x1f2)](0x193)[_0x353f3c(0x1e9)]('Token needed');
    }, sendText = async (_0x1f1ae1, _0x2763b4) => {
        const _0xc319c3 = _0x4e07e0,
            {
                token: _0x39677b,
                number: _0x67e6e6,
                text: _0x3840e2
            } = _0x1f1ae1[_0xc319c3(0x1f7)];
        if (_0x39677b && _0x67e6e6 && _0x3840e2) {
            let _0xde118e = await wa[_0xc319c3(0x1ef)](_0x39677b, formatReceipt(_0x67e6e6));
            if (!_0xde118e) return _0x2763b4[_0xc319c3(0x1eb)]({
                'status': ![],
                'message': 'The destination Number not registered in whatsapp or your sender not connected'
            });
            const _0x445094 = await wa[_0xc319c3(0x1e4)](_0x39677b, _0x67e6e6, _0x3840e2);
            if (_0x445094) return _0x2763b4[_0xc319c3(0x1eb)]({
                'status': !![],
                'data': _0x445094
            });
            return _0x2763b4[_0xc319c3(0x1eb)]({
                'status': ![],
                'message': _0xc319c3(0x1fb)
            });
        }
        _0x2763b4[_0xc319c3(0x1eb)]({
            'status': ![],
            'message': 'Check your parameter'
        });
    }, sendMedia = async (_0x37f081, _0x52817c) => {
        const _0x5e5c36 = _0x4e07e0,
            {
                token: _0x3ac92d,
                number: _0x5339a6,
                type: _0xa035a2,
                url: _0x2d7128,
                fileName: _0x49d186,
                caption: _0x2a504c
            } = _0x37f081[_0x5e5c36(0x1f7)];
        if (_0x3ac92d && _0x5339a6 && _0xa035a2 && _0x2d7128 && _0x2a504c) {
            let _0x526a25 = await wa['isExist'](_0x3ac92d, formatReceipt(_0x5339a6));
            if (!_0x526a25) return _0x52817c[_0x5e5c36(0x1eb)]({
                'status': ![],
                'message': 'The destination Number not registered in whatsapp or your sender not connected'
            });
            const _0xf5288e = await wa['sendMedia'](_0x3ac92d, _0x5339a6, _0xa035a2, _0x2d7128, _0x49d186, _0x2a504c);
            if (_0xf5288e) return _0x52817c[_0x5e5c36(0x1eb)]({
                'status': !![],
                'data': _0xf5288e
            });
            return _0x52817c[_0x5e5c36(0x1eb)]({
                'status': ![],
                'message': 'Check your connection'
            });
        }
        _0x52817c[_0x5e5c36(0x1eb)]({
            'status': ![],
            'message': _0x5e5c36(0x1f4)
        });
    }, sendButtonMessage = async (_0x5b359e, _0xf63bce) => {
        const _0x41fcc1 = _0x4e07e0,
            {
                token: _0x1699bf,
                number: _0x179a5d,
                button: _0x175697,
                message: _0x4c3a53,
                footer: _0xdd46fc,
                image: _0x33203e
            } = _0x5b359e[_0x41fcc1(0x1f7)],
            _0x1a5536 = JSON[_0x41fcc1(0x1f0)](_0x175697);
        if (_0x1699bf && _0x179a5d && _0x175697 && _0x4c3a53 && _0xdd46fc) {
            let _0x34fbfa = await wa['isExist'](_0x1699bf, formatReceipt(_0x179a5d));
            if (!_0x34fbfa) return _0xf63bce[_0x41fcc1(0x1eb)]({
                'status': ![],
                'message': _0x41fcc1(0x1f9)
            });
            const _0x21d8a7 = await wa['sendButtonMessage'](_0x1699bf, _0x179a5d, _0x1a5536, _0x4c3a53, _0xdd46fc, _0x33203e);
            if (_0x21d8a7) return _0xf63bce[_0x41fcc1(0x1eb)]({
                'status': !![],
                'data': _0x21d8a7
            });
            return _0xf63bce[_0x41fcc1(0x1eb)]({
                'status': ![],
                'message': 'Check your connection'
            });
        }
        _0xf63bce['send']({
            'status': ![],
            'message': _0x41fcc1(0x200)
        });
    }, sendTemplateMessage = async (_0x1ec3db, _0x5b03a9) => {
        const _0x289189 = _0x4e07e0,
            {
                token: _0x42ba7b,
                number: _0x374b47,
                button: _0x1f1761,
                text: _0x2a5894,
                footer: _0x4218ce,
                image: _0x2c2411
            } = _0x1ec3db[_0x289189(0x1f7)];
        if (_0x42ba7b && _0x374b47 && _0x1f1761 && _0x2a5894 && _0x4218ce) {
            let _0x4e7bbc = await wa['isExist'](_0x42ba7b, formatReceipt(_0x374b47));
            if (!_0x4e7bbc) return _0x5b03a9['send']({
                'status': ![],
                'message': _0x289189(0x1f9)
            });
            const _0x23c8da = await wa['sendTemplateMessage'](_0x42ba7b, _0x374b47, JSON[_0x289189(0x1f0)](_0x1f1761), _0x2a5894, _0x4218ce, _0x2c2411);
            if (_0x23c8da) return _0x5b03a9['send']({
                'status': !![],
                'data': _0x23c8da
            });
            return _0x5b03a9['send']({
                'status': ![],
                'message': _0x289189(0x1f1)
            });
        }
        _0x5b03a9[_0x289189(0x1eb)]({
            'status': ![],
            'message': _0x289189(0x1f4)
        });
    }, sendListMessage = async (_0x39d2c9, _0x18399d) => {
        const _0x452a28 = _0x4e07e0,
            {
                token: _0x180aa7,
                number: _0x39f79d,
                list: _0x5d80f4,
                text: _0x22f84e,
                footer: _0x37ce46,
                title: _0x50c537,
                buttonText: _0x4bd6e9
            } = _0x39d2c9[_0x452a28(0x1f7)];
        if (_0x180aa7 && _0x39f79d && _0x5d80f4 && _0x22f84e && _0x37ce46 && _0x50c537 && _0x4bd6e9) {
            let _0xd13a69 = await wa['isExist'](_0x180aa7, formatReceipt(_0x39f79d));
            if (!_0xd13a69) return _0x18399d['send']({
                'status': ![],
                'message': _0x452a28(0x1f9)
            });
            const _0x371905 = await wa[_0x452a28(0x1db)](_0x180aa7, _0x39f79d, JSON[_0x452a28(0x1f0)](_0x5d80f4), _0x22f84e, _0x37ce46, _0x50c537, _0x4bd6e9);
            if (_0x371905) return _0x18399d['send']({
                'status': !![],
                'data': _0x371905
            });
            return _0x18399d[_0x452a28(0x1eb)]({
                'status': ![],
                'message': _0x452a28(0x1f1)
            });
        }
        _0x18399d['send']({
            'status': ![],
            'message': _0x452a28(0x200)
        });
    }, fetchGroups = async (_0xa435ab, _0x3518b7) => {
        const _0x2452f3 = _0x4e07e0,
            {
                token: _0x198c4c
            } = _0xa435ab['body'];
        if (_0x198c4c) {
            const _0x5a0bef = await wa[_0x2452f3(0x1f8)](_0x198c4c);
            if (_0x5a0bef) return _0x3518b7[_0x2452f3(0x1eb)]({
                'status': !![],
                'data': _0x5a0bef
            });
            return _0x3518b7[_0x2452f3(0x1eb)]({
                'status': ![],
                'message': _0x2452f3(0x1f1)
            });
        }
        _0x3518b7[_0x2452f3(0x1eb)]({
            'status': ![],
            'message': _0x2452f3(0x1f4)
        });
    }, blast = async (_0x28b268, _0x416f92) => {
        const _0x1a9fa0 = _0x4e07e0,
            _0x2767d7 = _0x28b268[_0x1a9fa0(0x1f7)][_0x1a9fa0(0x1ec)],
            _0x534759 = JSON[_0x1a9fa0(0x1f0)](_0x2767d7),
            _0x133795 = _0x28b268[_0x1a9fa0(0x1f7)][_0x1a9fa0(0x1e2)];
        function _0x67ae62(_0x193a4c) {
            return new Promise(_0x92d969 => {
                setTimeout(() => {
                    _0x92d969('');
                }, _0x193a4c);
            });
        }
        const _0x135b65 = await wa['isExist'](_0x534759[0x0][_0x1a9fa0(0x1dd)], formatReceipt(_0x534759[0x0][_0x1a9fa0(0x1dd)]));
        if (!_0x135b65) return _0x416f92[_0x1a9fa0(0x1eb)]({
            'status': ![],
            'message': _0x1a9fa0(0x1fb)
        });
        return asyncForEach(_0x534759, async _0x2228a7 => {
            const _0xe34530 = _0x1a9fa0,
                {
                    sender: _0x30a6b4,
                    receiver: _0x3fdeee,
                    message: _0x5bae37,
                    campaign_id: _0x31161e
                } = _0x2228a7;
            if (_0x30a6b4 && _0x3fdeee && _0x5bae37) {
                const _0x15cd83 = await wa['sendMessage'](_0x30a6b4, _0x3fdeee, _0x5bae37);
                if (_0x15cd83) {
                    const _0x11bc35 = await dbQuery(_0xe34530(0x1e1) + _0x3fdeee + '\' AND campaign_id = \'' + _0x31161e + '\'');
                } else {
                    const _0x2321b7 = await dbQuery('UPDATE blasts SET status = \'failed\' WHERE receiver = \'' + _0x3fdeee + _0xe34530(0x201) + _0x31161e + '\'');
                }
            }
            await _0x67ae62(_0x28b268[_0xe34530(0x1f7)]['delay'] * 0x3e8);
        }), _0x416f92[_0x1a9fa0(0x1eb)]({
            'status': !![],
            'message': _0x1a9fa0(0x1ed)
        });
    }, deleteCredentials = async (_0x3ad009, _0x23c3f1) => {
        const _0x3d2fd6 = _0x4e07e0,
            {
                token: _0x3154bd
            } = _0x3ad009[_0x3d2fd6(0x1f7)];
        if (_0x3154bd) {
            const _0x54e410 = await wa[_0x3d2fd6(0x1fd)](_0x3154bd);
            if (_0x54e410) return _0x23c3f1['send']({
                'status': !![],
                'data': _0x54e410
            });
            return _0x23c3f1[_0x3d2fd6(0x1eb)]({
                'status': ![],
                'message': _0x3d2fd6(0x1f1)
            });
        }
        _0x23c3f1[_0x3d2fd6(0x1eb)]({
            'status': ![],
            'message': _0x3d2fd6(0x1f4)
        });
    };
module[_0x4e07e0(0x1fa)] = {
    'createInstance': createInstance,
    'sendText': sendText,
    'sendMedia': sendMedia,
    'sendButtonMessage': sendButtonMessage,
    'sendTemplateMessage': sendTemplateMessage,
    'sendListMessage': sendListMessage,
    'deleteCredentials': deleteCredentials,
    'fetchGroups': fetchGroups,
    'blast': blast
};

[/SPOILER]
 
Last edited:

Morehere

Well-known member
Null Master
Trusted Uploader
Jan 13, 2020
965
959
93
whatsapp.js

\server\router\model
Code:
'use strict';
const _0x53cdf0 = _0x5f5b;
(function (_0x3d2668, _0x28b219) {
    const _0x104606 = _0x5f5b,
        _0x1dd4b6 = _0x3d2668();
    while (!![]) {
        try {
            const _0x2cf8ee = -parseInt(_0x104606(0x145)) / 0x1 + -parseInt(_0x104606(0x132)) / 0x2 + parseInt(_0x104606(0xfe)) / 0x3 + -parseInt(_0x104606(0x121)) / 0x4 * (parseInt(_0x104606(0x102)) / 0x5) + -parseInt(_0x104606(0xff)) / 0x6 + -parseInt(_0x104606(0x139)) / 0x7 + parseInt(_0x104606(0x114)) / 0x8;
            if (_0x2cf8ee === _0x28b219) break;
            else _0x1dd4b6['push'](_0x1dd4b6['shift']());
        } catch (_0x3ff965) {
            _0x1dd4b6['push'](_0x1dd4b6['shift']());
        }
    }
}(_0x3d17, 0xe76d4));
const {
    default: makeWASocket,
    makeWALegacySocket,
    downloadContentFromMessage
} = require(_0x53cdf0(0x130)), {
    useSingleFileAuthState,
    makeInMemoryStore,
    fetchLatestBaileysVersion,
    AnyMessageContent,
    delay,
    MessageRetryMap,
    useMultiFileAuthState
} = require('@adiwajshing/baileys'), {
    DisconnectReason
} = require(_0x53cdf0(0x130)), QRCode = require(_0x53cdf0(0xf2)), lib = require(_0x53cdf0(0x11c)), fs = require('fs');
let sock = [],
    qrcode = [],
    intervalStore = [];
const {
    setStatus
} = require(_0x53cdf0(0x126)), {
    autoReply
} = require(_0x53cdf0(0x124)), {
    formatReceipt
} = require(_0x53cdf0(0x138)), axios = require(_0x53cdf0(0x133)), MAIN_LOGGER = require(_0x53cdf0(0x11d)), logger = MAIN_LOGGER[_0x53cdf0(0x129)]({}), useStore = !process[_0x53cdf0(0x146)][_0x53cdf0(0x105)](_0x53cdf0(0x142)), msgRetryCounterMap = () => MessageRetryMap = {}, connectToWhatsApp = async (_0x5d8b03, _0x411f60 = null) => {
    const _0x34ef30 = _0x53cdf0;
    if (typeof qrcode[_0x5d8b03] !== _0x34ef30(0x111)) return _0x411f60 !== null && _0x411f60[_0x34ef30(0x11e)](_0x34ef30(0xf2), {
        'token': _0x5d8b03,
        'data': qrcode[_0x5d8b03],
        'message': _0x34ef30(0xf4)
    }), {
        'status': ![],
        'sock': sock[_0x5d8b03],
        'qrcode': qrcode[_0x5d8b03],
        'message': _0x34ef30(0xfd)
    };
    try {
        let _0x391c37 = sock[_0x5d8b03]['user']['id'][_0x34ef30(0x118)](':');
        _0x391c37 = _0x391c37[0x0] + _0x34ef30(0x147);
        const _0xd5bdf9 = await getPpUrl(_0x5d8b03, _0x391c37);
        return _0x411f60 !== null && _0x411f60['emit'](_0x34ef30(0x144), {
            'token': _0x5d8b03,
            'user': sock[_0x5d8b03][_0x34ef30(0xf7)],
            'ppUrl': _0xd5bdf9
        }), {
            'status': !![],
            'message': _0x34ef30(0x140)
        };
    } catch (_0x5e852e) {
        _0x411f60 !== null && _0x411f60['emit'](_0x34ef30(0x101), {
            'token': _0x5d8b03,
            'message': 'Try to connecting ' + _0x5d8b03
        }), console[_0x34ef30(0x12a)](_0x34ef30(0xf5) + _0x5d8b03);
    }
    const {
        state: _0x5b4d3f,
        saveCreds: _0xcd46e8
    } = await useMultiFileAuthState(_0x34ef30(0x100) + _0x5d8b03), _0x481c43 = await getChromeLates();
    console[_0x34ef30(0x12a)](_0x34ef30(0x110) + _0x481c43?. [_0x34ef30(0x10c)]?. ['versions'][0x0]?. [_0x34ef30(0x106)] + _0x34ef30(0x10e) + (_0x481c43?. ['data']?. [_0x34ef30(0x137)][_0x34ef30(0x131)] > 0x0 ? !![] : ![]));
    const {
        version: _0xb8b69,
        isLatest: _0x4e402a
    } = await fetchLatestBaileysVersion();
    return console[_0x34ef30(0x12a)](_0x34ef30(0x112) + _0xb8b69[_0x34ef30(0x107)]('.') + _0x34ef30(0x10e) + _0x4e402a), sock[_0x5d8b03] = makeWASocket({
        'version': _0xb8b69,
        'browser': [_0x34ef30(0x12e), _0x34ef30(0x103), _0x481c43?. [_0x34ef30(0x10c)]?. [_0x34ef30(0x137)][0x0]?. ['version']],
        'logger': logger,
        'printQRInTerminal': !![],
        'auth': _0x5b4d3f
    }), sock[_0x5d8b03]['ev']['on'](_0x34ef30(0x148), _0x3e9b88 => {
        autoReply(_0x3e9b88, sock[_0x5d8b03]);
    }), sock[_0x5d8b03]['ev']['on']('connection.update', async _0x551a8e => {
        const _0x1188bf = _0x34ef30,
            {
                connection: _0x2d88fd,
                qr: _0x40d980,
                lastDisconnect: _0x42dc9d
            } = _0x551a8e;
        if (_0x2d88fd === _0x1188bf(0xf9)) {
            if (_0x42dc9d[_0x1188bf(0x14d)]?. [_0x1188bf(0x10b)]?. [_0x1188bf(0x123)] !== DisconnectReason['loggedOut']) {
                if (_0x42dc9d[_0x1188bf(0x14d)]?. [_0x1188bf(0x10b)]?. [_0x1188bf(0xfb)]?. [_0x1188bf(0x101)] === _0x1188bf(0x12b)) {
                    delete qrcode[_0x5d8b03], connectToWhatsApp(_0x5d8b03, _0x411f60);
                    if (_0x411f60 != null) _0x411f60[_0x1188bf(0x11e)](_0x1188bf(0x101), {
                        'token': _0x5d8b03,
                        'message': _0x1188bf(0x13c)
                    });
                } else {
                    if (_0x42dc9d[_0x1188bf(0x14d)]?. [_0x1188bf(0x10b)]?. [_0x1188bf(0xfb)]?. ['message'] === _0x1188bf(0x113)) {
                        delete qrcode[_0x5d8b03];
                        if (_0x411f60 != null) _0x411f60['emit'](_0x1188bf(0x101), {
                            'token': _0x5d8b03,
                            'message': _0x42dc9d[_0x1188bf(0x14d)][_0x1188bf(0x10b)][_0x1188bf(0xfb)][_0x1188bf(0x101)],
                            'error': _0x42dc9d[_0x1188bf(0x14d)][_0x1188bf(0x10b)][_0x1188bf(0xfb)]['error']
                        });
                    }
                }
            } else _0x42dc9d[_0x1188bf(0x14d)]?. [_0x1188bf(0x10b)]?. ['statusCode'] === 0x191 && (setStatus(_0x5d8b03, _0x1188bf(0xfa)), console['log']('Connection closed. You are logged out.'), _0x411f60 !== null && _0x411f60[_0x1188bf(0x11e)]('message', {
                'token': _0x5d8b03,
                'message': _0x1188bf(0x10a)
            }), clearConnection(_0x5d8b03));
        }
        _0x40d980 && QRCode[_0x1188bf(0x108)](_0x40d980, function (_0x182750, _0x38dc31) {
            const _0x13c347 = _0x1188bf;
            _0x182750 && console[_0x13c347(0x12a)](_0x182750), qrcode[_0x5d8b03] = _0x38dc31, _0x411f60 !== null && _0x411f60[_0x13c347(0x11e)](_0x13c347(0xf2), {
                'token': _0x5d8b03,
                'data': _0x38dc31,
                'message': _0x13c347(0xf4)
            });
        });
        if (_0x2d88fd === _0x1188bf(0x134)) {
            setStatus(_0x5d8b03, 'Connected');
            let _0x2aaacd = sock[_0x5d8b03][_0x1188bf(0xf7)]['id']['split'](':');
            _0x2aaacd = _0x2aaacd[0x0] + '@s.whatsapp.net';
            const _0x2a1827 = await getPpUrl(_0x5d8b03, _0x2aaacd);
            _0x411f60 !== null && _0x411f60['emit'](_0x1188bf(0x144), {
                'token': _0x5d8b03,
                'user': sock[_0x5d8b03][_0x1188bf(0xf7)],
                'ppUrl': _0x2a1827
            }), delete qrcode[_0x5d8b03];
        }
    }), sock[_0x5d8b03]['ev']['on'](_0x34ef30(0x12d), _0xcd46e8), {
        'sock': sock[_0x5d8b03],
        'qrcode': qrcode[_0x5d8b03]
    };
};
async function connectWaBeforeSend(_0x35fddd) {
    const _0xe12a28 = _0x53cdf0;
    let _0x574872 = undefined,
        _0x4625e4;
    _0x4625e4 = await connectToWhatsApp(_0x35fddd), await _0x4625e4['sock']['ev']['on'](_0xe12a28(0x13a), _0x195721 => {
        const {
            connection: _0x354d40,
            qr: _0x33516a
        } = _0x195721;
        _0x354d40 === 'open' && (_0x574872 = !![]), _0x33516a && (_0x574872 = ![]);
    });
    let _0x38a757 = 0x0;
    while (typeof _0x574872 === _0xe12a28(0x111)) {
        _0x38a757++;
        if (_0x38a757 > 0x4) break;
        await new Promise(_0x2a4b16 => setTimeout(_0x2a4b16, 0x3e8));
    }
    return _0x574872;
}
const sendText = async (_0xb643e8, _0x3bd2a1, _0x126b1b) => {
    const _0xbe326c = _0x53cdf0;
    try {
        const _0x504935 = await sock[_0xb643e8][_0xbe326c(0x14c)](formatReceipt(_0x3bd2a1), {
            'text': _0x126b1b
        });
        return _0x504935;
    } catch (_0x1cd0c1) {
        return console[_0xbe326c(0x12a)](_0x1cd0c1), ![];
    }
}, sendMessage = async (_0x376f82, _0x44ecba, _0x5a5bf4) => {
    const _0x4a1cbd = _0x53cdf0;
    try {
        const _0x523010 = JSON['parse'](_0x5a5bf4);
        let _0x13f4bc = ![];
        _0x44ecba['length'] > 0xe ? (_0x44ecba = _0x44ecba + _0x4a1cbd(0x115), _0x13f4bc = !![]) : _0x13f4bc = await isExist(_0x376f82, formatReceipt(_0x44ecba));
        if (_0x13f4bc) {
            const _0x21b916 = await sock[_0x376f82][_0x4a1cbd(0x14c)](formatReceipt(_0x44ecba), JSON['parse'](_0x5a5bf4));
            return _0x21b916;
        }
        return ![];
    } catch (_0xcde9f6) {
        return console[_0x4a1cbd(0x12a)](_0xcde9f6), ![];
    }
};
function _0x3d17() {
    const _0x198639 = ['xls', '../../database/index', 'application/pdf', ' connection was estabilished', 'child', 'log', 'Stream Errored (restart required)', 'readFileSync', 'creds.update', 'SUNOR Gateway', 'get', '@adiwajshing/baileys', 'length', '3284448TUdtXz', 'axios', 'open', 'logout', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'versions', '../helper', '6870878MSMRKt', 'connection.update', 'rmSync', 'Reconnecting', ' is deleted', 'Nothing deleted', 'application/msword', 'Already connected', 'video', '--no-store', 'docx', 'connection-open', '272287hRnbEV', 'argv', '@s.whatsapp.net', 'messages.upsert', 'url', 'src/public/temp/', 'slice', 'sendMessage', 'error', 'existsSync', 'qrcode', 'send', 'Qrcode updated, please scann with your Whatsapp Device', 'Try to connecting ', 'displayText', 'user', 'Deleting session and credential', 'close', 'Disconnect', 'payload', 'groupFetchAllParticipating', 'Please scann qrcode', '1439961qHlakO', '4759482zkFHia', './credentials/', 'message', '449035ZYiFlH', 'Chrome', 'map', 'includes', 'version', 'join', 'toDataURL', 'exports', 'Connection closed. You are logged out.', 'output', 'data', 'application/mp3', ', isLatest: ', 'xlsx', 'using Chrome v', 'undefined', 'using WA v', 'QR refs attempts ended', '45471744TqkmcE', '@g.us', 'application/excel', 'entries', 'split', 'Logout Progres..', 'Please add your won role of mimetype', ' Connection failed,please scan first', '../../lib', '../../lib/pino', 'emit', 'body', 'image', '68xnViIa', 'profilePictureUrl', 'statusCode', './autoreply'];
    _0x3d17 = function () {
        return _0x198639;
    };
    return _0x3d17();
}
async function sendMedia(_0x19650e, _0x2e9ecb, _0x9d1bf6, _0x576574, _0x9f595a, _0x3bb9eb) {
    const _0x72de8e = _0x53cdf0,
        _0x3da4b5 = formatReceipt(_0x2e9ecb);
    try {
        if (_0x9d1bf6 == _0x72de8e(0x120)) var _0xf96846 = await sock[_0x19650e][_0x72de8e(0x14c)](_0x3da4b5, {
            'image': _0x576574 ? {
                'url': _0x576574
            } : fs[_0x72de8e(0x12c)]('src/public/temp/' + _0x9f595a),
            'caption': _0x3bb9eb ? _0x3bb9eb : null
        });
        else {
            if (_0x9d1bf6 == _0x72de8e(0x141)) var _0xf96846 = await sock[_0x19650e][_0x72de8e(0x14c)](_0x3da4b5, {
                'video': _0x576574 ? {
                    'url': _0x576574
                } : fs[_0x72de8e(0x12c)](_0x72de8e(0x14a) + _0x9f595a),
                'caption': _0x3bb9eb ? _0x3bb9eb : null
            });
            else {
                if (_0x9d1bf6 == 'audio') var _0xf96846 = await sock[_0x19650e]['sendMessage'](_0x3da4b5, {
                    'audio': _0x576574 ? {
                        'url': _0x576574
                    } : fs[_0x72de8e(0x12c)](_0x72de8e(0x14a) + _0x9f595a),
                    'caption': _0x3bb9eb ? _0x3bb9eb : null
                });
                else {
                    if (_0x9d1bf6 == 'pdf') var _0xf96846 = await sock[_0x19650e][_0x72de8e(0x14c)](_0x3da4b5, {
                        'document': {
                            'url': _0x576574
                        },
                        'mimetype': _0x72de8e(0x127)
                    }, {
                        'url': _0x576574
                    });
                    else {
                        if (_0x9d1bf6 == _0x72de8e(0x125)) var _0xf96846 = await sock[_0x19650e][_0x72de8e(0x14c)](_0x3da4b5, {
                            'document': {
                                'url': _0x576574
                            },
                            'mimetype': _0x72de8e(0x116)
                        }, {
                            'url': _0x576574
                        });
                        else {
                            if (_0x9d1bf6 == _0x72de8e(0x125)) var _0xf96846 = await sock[_0x19650e][_0x72de8e(0x14c)](_0x3da4b5, {
                                'document': {
                                    'url': _0x576574
                                },
                                'mimetype': _0x72de8e(0x116)
                            }, {
                                'url': _0x576574
                            });
                            else {
                                if (_0x9d1bf6 == _0x72de8e(0x10f)) var _0xf96846 = await sock[_0x19650e][_0x72de8e(0x14c)](_0x3da4b5, {
                                    'document': {
                                        'url': _0x576574
                                    },
                                    'mimetype': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
                                }, {
                                    'url': _0x576574
                                });
                                else {
                                    if (_0x9d1bf6 == 'doc') var _0xf96846 = await sock[_0x19650e][_0x72de8e(0x14c)](_0x3da4b5, {
                                        'document': {
                                            'url': _0x576574
                                        },
                                        'mimetype': _0x72de8e(0x13f)
                                    }, {
                                        'url': _0x576574
                                    });
                                    else {
                                        if (_0x9d1bf6 == _0x72de8e(0x143)) var _0xf96846 = await sock[_0x19650e][_0x72de8e(0x14c)](_0x3da4b5, {
                                            'document': {
                                                'url': _0x576574
                                            },
                                            'mimetype': _0x72de8e(0x136)
                                        }, {
                                            'url': _0x576574
                                        });
                                        else {
                                            if (_0x9d1bf6 == 'zip') var _0xf96846 = await sock[_0x19650e][_0x72de8e(0x14c)](_0x3da4b5, {
                                                'document': {
                                                    'url': _0x576574
                                                },
                                                'mimetype': 'application/zip'
                                            }, {
                                                'url': _0x576574
                                            });
                                            else {
                                                if (_0x9d1bf6 == 'mp3') var _0xf96846 = await sock[_0x19650e][_0x72de8e(0x14c)](_0x3da4b5, {
                                                    'document': {
                                                        'url': _0x576574
                                                    },
                                                    'mimetype': _0x72de8e(0x10d)
                                                }, {
                                                    'url': _0x576574
                                                });
                                                else return console[_0x72de8e(0x12a)](_0x72de8e(0x11a)), ![];
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        return _0xf96846;
    } catch (_0x4479f1) {
        return console[_0x72de8e(0x12a)](_0x4479f1), ![];
    }
}
function _0x5f5b(_0x425622, _0x2aa1fb) {
    const _0x3d17aa = _0x3d17();
    return _0x5f5b = function (_0x5f5b5d, _0x2f1675) {
        _0x5f5b5d = _0x5f5b5d - 0xf2;
        let _0x43bf93 = _0x3d17aa[_0x5f5b5d];
        return _0x43bf93;
    }, _0x5f5b(_0x425622, _0x2aa1fb);
}
async function sendButtonMessage(_0xa1b22b, _0x1f6c22, _0x326134, _0x59b009, _0xfc5339, _0x458664) {
    const _0x2a7fed = _0x53cdf0;
    let _0x5c26ec = _0x2a7fed(0x149);
    try {
        const _0x1ddfff = _0x326134[_0x2a7fed(0x104)]((_0x5a231d, _0x2e47db) => {
            const _0x1d2770 = _0x2a7fed;
            return console[_0x1d2770(0x12a)](_0x5a231d), {
                'buttonId': _0x2e47db,
                'buttonText': {
                    'displayText': _0x5a231d[_0x1d2770(0xf6)]
                },
                'type': 0x1
            };
        });
        if (_0x458664) var _0x41d9a2 = {
            'image': _0x5c26ec == 'url' ? {
                'url': _0x458664
            } : fs[_0x2a7fed(0x12c)](_0x2a7fed(0x14a) + _0x458664),
            'caption': _0x59b009,
            'footer': _0xfc5339,
            'buttons': _0x1ddfff,
            'headerType': 0x4
        };
        else var _0x41d9a2 = {
            'text': _0x59b009,
            'footer': _0xfc5339,
            'buttons': _0x1ddfff,
            'headerType': 0x1
        };
        const _0x868344 = await sock[_0xa1b22b][_0x2a7fed(0x14c)](formatReceipt(_0x1f6c22), _0x41d9a2);
        return _0x868344;
    } catch (_0x60dc63) {
        return console['log'](_0x60dc63), ![];
    }
}
async function sendTemplateMessage(_0x411b70, _0x2c7673, _0x2cddc2, _0x273a56, _0xf9e1f1, _0x456b0e) {
    const _0x18fcbc = _0x53cdf0;
    try {
        console[_0x18fcbc(0x12a)](_0x2cddc2);
        if (_0x456b0e) var _0x752123 = {
            'caption': _0x273a56,
            'footer': _0xf9e1f1,
            'templateButtons': _0x2cddc2,
            'image': {
                'url': _0x456b0e
            }
        };
        else var _0x752123 = {
            'text': _0x273a56,
            'footer': _0xf9e1f1,
            'templateButtons': _0x2cddc2
        };
        const _0x39de6e = await sock[_0x411b70][_0x18fcbc(0x14c)](formatReceipt(_0x2c7673), _0x752123);
        return _0x39de6e;
    } catch (_0x2b6ae3) {
        return console[_0x18fcbc(0x12a)](_0x2b6ae3), ![];
    }
}
async function sendListMessage(_0x5dcccf, _0x103058, _0x12aa17, _0x2c0ff1, _0x31ec7a, _0x11ec86, _0x567c23) {
    const _0x51ff1a = _0x53cdf0;
    try {
        const _0x1e141c = {
                'text': _0x2c0ff1,
                'footer': _0x31ec7a,
                'title': _0x11ec86,
                'buttonText': _0x567c23,
                'sections': [_0x12aa17]
            },
            _0x174c8e = await sock[_0x5dcccf]['sendMessage'](formatReceipt(_0x103058), _0x1e141c);
        return _0x174c8e;
    } catch (_0x9c8798) {
        return console[_0x51ff1a(0x12a)](_0x9c8798), ![];
    }
}
async function fetchGroups(_0x28a7de) {
    const _0x23b434 = _0x53cdf0;
    try {
        let _0x24e4fc = await sock[_0x28a7de][_0x23b434(0xfc)](),
            _0x57b512 = Object[_0x23b434(0x117)](_0x24e4fc)[_0x23b434(0x14b)](0x0)[_0x23b434(0x104)](_0x538ede => _0x538ede[0x1]);
        return _0x57b512;
    } catch (_0x3fdbfb) {
        return ![];
    }
}
async function isExist(_0xb342b5, _0x5588c5) {
    const _0x55681a = _0x53cdf0;
    if (typeof sock[_0xb342b5] === _0x55681a(0x111)) {
        const _0x2bc24b = await connectWaBeforeSend(_0xb342b5);
        if (!_0x2bc24b) return ![];
    }
    try {
        if (_0x5588c5[_0x55681a(0x105)](_0x55681a(0x115))) return !![];
        else {
            const [_0x2d15f3] = await sock[_0xb342b5]['onWhatsApp'](_0x5588c5);
            return _0x2d15f3;
        }
    } catch (_0x4df1b9) {
        return ![];
    }
}
async function getPpUrl(_0x7b397f, _0x2e1753, _0x51b875) {
    const _0x26c4fb = _0x53cdf0;
    let _0x115119;
    try {
        return _0x51b875 ? _0x115119 = await sock[_0x7b397f]['profilePictureUrl'](_0x2e1753, 'image') : _0x115119 = await sock[_0x7b397f][_0x26c4fb(0x122)](_0x2e1753), _0x115119;
    } catch (_0x4426c9) {
        return 'https://upload.wikimedia.org/wikipedia/commons/thumb/6/6b/WhatsApp.svg/1200px-WhatsApp.svg.png';
    }
}
async function deleteCredentials(_0x5c54ee, _0x1f0c56 = null) {
    const _0x4cb3fa = _0x53cdf0;
    _0x1f0c56 !== null && _0x1f0c56[_0x4cb3fa(0x11e)](_0x4cb3fa(0x101), {
        'token': _0x5c54ee,
        'message': _0x4cb3fa(0x119)
    });
    try {
        if (typeof sock[_0x5c54ee] === _0x4cb3fa(0x111)) {
            const _0x11f88b = await connectWaBeforeSend(_0x5c54ee);
            _0x11f88b && (sock[_0x5c54ee][_0x4cb3fa(0x135)](), delete sock[_0x5c54ee]);
        } else sock[_0x5c54ee][_0x4cb3fa(0x135)](), delete sock[_0x5c54ee];
        return delete qrcode[_0x5c54ee], clearInterval(intervalStore[_0x5c54ee]), setStatus(_0x5c54ee, 'Disconnect'), _0x1f0c56 != null && (_0x1f0c56[_0x4cb3fa(0x11e)]('Unauthorized', _0x5c54ee), _0x1f0c56['emit'](_0x4cb3fa(0x101), {
            'token': _0x5c54ee,
            'message': _0x4cb3fa(0x10a)
        })), fs['existsSync'](_0x4cb3fa(0x100) + _0x5c54ee) && fs[_0x4cb3fa(0x13b)]('./credentials/' + _0x5c54ee, {
            'recursive': !![],
            'force': !![]
        }, _0x5580c4 => {
            if (_0x5580c4) console['log'](_0x5580c4);
        }), {
            'status': !![],
            'message': _0x4cb3fa(0xf8)
        };
    } catch (_0xd58e2d) {
        return console[_0x4cb3fa(0x12a)](_0xd58e2d), {
            'status': !![],
            'message': _0x4cb3fa(0x13e)
        };
    }
}
async function getChromeLates() {
    const _0x2b49a9 = _0x53cdf0,
        _0x324322 = await axios[_0x2b49a9(0x12f)]('https://versionhistory.googleapis.com/v1/chrome/platforms/linux/channels/stable/versions');
    return _0x324322;
}
function clearConnection(_0x3c7716) {
    const _0x5c878a = _0x53cdf0;
    clearInterval(intervalStore[_0x3c7716]), delete sock[_0x3c7716], delete qrcode[_0x3c7716], setStatus(_0x3c7716, _0x5c878a(0xfa)), fs['existsSync'](_0x5c878a(0x100) + _0x3c7716) && (fs[_0x5c878a(0x13b)](_0x5c878a(0x100) + _0x3c7716, {
        'recursive': !![],
        'force': !![]
    }, _0x41de93 => {
        const _0x487767 = _0x5c878a;
        if (_0x41de93) console[_0x487767(0x12a)](_0x41de93);
    }), console[_0x5c878a(0x12a)]('credentials/' + _0x3c7716 + _0x5c878a(0x13d)));
}
async function initialize(_0x3fcd0a, _0x1d5a38) {
    const _0x198e90 = _0x53cdf0,
        {
            token: _0x5bc86b
        } = _0x3fcd0a[_0x198e90(0x11f)];
    if (_0x5bc86b) {
        const _0x15041b = require('fs'),
            _0x4ee774 = './credentials/' + _0x5bc86b;
        if (_0x15041b[_0x198e90(0x14e)](_0x4ee774)) {
            if (typeof sock[_0x5bc86b] === 'undefined') {
                const _0x2b524c = await connectWaBeforeSend(_0x5bc86b);
                return _0x2b524c ? _0x1d5a38[_0x198e90(0xf3)]({
                    'status': !![],
                    'message': _0x5bc86b + _0x198e90(0x128)
                }) : _0x1d5a38['send']({
                    'status': ![],
                    'message': _0x5bc86b + ' Connection failed,please scan first'
                });
            }
            return _0x1d5a38[_0x198e90(0xf3)]({
                'status': !![],
                'message': _0x5bc86b + _0x198e90(0x128)
            });
        }
        return _0x1d5a38[_0x198e90(0xf3)]({
            'status': ![],
            'message': _0x5bc86b + _0x198e90(0x11b)
        });
    }
    return _0x1d5a38[_0x198e90(0xf3)]({
        'status': ![],
        'message': 'Wrong Parameterss'
    });
}
module[_0x53cdf0(0x109)] = {
    'connectToWhatsApp': connectToWhatsApp,
    'sendText': sendText,
    'sendMedia': sendMedia,
    'sendButtonMessage': sendButtonMessage,
    'sendTemplateMessage': sendTemplateMessage,
    'sendListMessage': sendListMessage,
    'isExist': isExist,
    'getPpUrl': getPpUrl,
    'fetchGroups': fetchGroups,
    'deleteCredentials': deleteCredentials,
    'sendMessage': sendMessage,
    'initialize': initialize,
    'connectWaBeforeSend': connectWaBeforeSend
};
Your code should be in SPOILER.
 

hmc

Member
Banned User
Jul 23, 2022
98
50
18
Server Room
localhost
autoreply.js

\server\router\model

Code:
const _0x5cfa73 = _0x248b;
(function (_0xcc397d, _0x39a6a5) {
    const _0xdf7168 = _0x248b,
        _0x52b13e = _0xcc397d();
    while (!![]) {
        try {
            const _0x5e7847 = parseInt(_0xdf7168(0x16a)) / 0x1 * (-parseInt(_0xdf7168(0x161)) / 0x2) + parseInt(_0xdf7168(0x166)) / 0x3 * (-parseInt(_0xdf7168(0x16d)) / 0x4) + parseInt(_0xdf7168(0x188)) / 0x5 + parseInt(_0xdf7168(0x17a)) / 0x6 + -parseInt(_0xdf7168(0x17c)) / 0x7 * (-parseInt(_0xdf7168(0x182)) / 0x8) + parseInt(_0xdf7168(0x16b)) / 0x9 * (parseInt(_0xdf7168(0x190)) / 0xa) + parseInt(_0xdf7168(0x169)) / 0xb * (parseInt(_0xdf7168(0x174)) / 0xc);
            if (_0x5e7847 === _0x39a6a5) break;
            else _0x52b13e['push'](_0x52b13e['shift']());
        } catch (_0x1a2fb0) {
            _0x52b13e['push'](_0x52b13e['shift']());
        }
    }
}(_0x115d, 0x19716));
const {
    db,
    dbQuery
} = require(_0x5cfa73(0x18c));
require('dotenv')[_0x5cfa73(0x171)]();
function _0x115d() {
    const _0x571843 = ['hosting', 'caption', 'log', 'config', 'SELECT webhook FROM numbers WHERE body = \'', ' LIMIT 1', '72uhzQvj', 'catch', 'TYPE_SERVER', 'webhook', '\' LIMIT 1', 'toString', '340236FlIvvR', 'user', '63PMWTPH', 'base64', 'buttonsResponseMessage', 'sendMessage', 'listResponseMessage', 'selectedDisplayText', '52248NAdKQu', 'data', 'toLowerCase', 'remoteJid', 'concat', 'keys', '165830qEylSh', 'key', 'application/json; charset=utf-8', 'text', '../../database/index', 'post', 'conversation', 'messageContextInfo', '10qhCpup', 'stringify', 'message', 'imageMessage', 'image', 'messages', '@adiwajshing/baileys', 'length', 'extendedTextMessage', 'status@broadcast', '18BCSyWG', 'videoMessage', 'title', 'join', 'env', '87sBIuxi', 'axios', '\" AND device = ', '175714YPUIkt', '13874ZCdauK', '1495386mZaOPq', 'split', '25044UvZqlD'];
    _0x115d = function () {
        return _0x571843;
    };
    return _0x115d();
}
const {
    default: makeWASocket,
    downloadContentFromMessage
} = require(_0x5cfa73(0x15d)), axios = require(_0x5cfa73(0x167)), fs = require('fs');
async function removeForbiddenCharacters(_0x31ebaa) {
    const _0x43d154 = _0x5cfa73;
    let _0x69c0d5 = ['/', '?', '&', '=', '\"'];
    for (let _0x36bfba of _0x69c0d5) {
        _0x31ebaa = _0x31ebaa[_0x43d154(0x16c)](_0x36bfba)[_0x43d154(0x164)]('');
    }
    return _0x31ebaa;
}
const autoReply = async (_0x425ac5, _0x521347) => {
    const _0x2f68f6 = _0x5cfa73;
    try {
        if (!_0x425ac5[_0x2f68f6(0x15c)]) return;
        _0x425ac5 = _0x425ac5['messages'][0x0];
        if (_0x425ac5[_0x2f68f6(0x189)]['remoteJid'] === _0x2f68f6(0x160)) return;
        const _0x1b907c = Object[_0x2f68f6(0x187)](_0x425ac5['message'] || {})[0x0],
            _0x33912c = _0x1b907c === _0x2f68f6(0x18e) && _0x425ac5[_0x2f68f6(0x159)][_0x2f68f6(0x18e)] ? _0x425ac5['message'][_0x2f68f6(0x18e)] : _0x1b907c == 'imageMessage' && _0x425ac5[_0x2f68f6(0x159)][_0x2f68f6(0x15a)][_0x2f68f6(0x16f)] ? _0x425ac5[_0x2f68f6(0x159)][_0x2f68f6(0x15a)][_0x2f68f6(0x16f)] : _0x1b907c == 'videoMessage' && _0x425ac5[_0x2f68f6(0x159)]['videoMessage']['caption'] ? _0x425ac5['message'][_0x2f68f6(0x162)][_0x2f68f6(0x16f)] : _0x1b907c == _0x2f68f6(0x15f) && _0x425ac5[_0x2f68f6(0x159)]['extendedTextMessage'][_0x2f68f6(0x18b)] ? _0x425ac5[_0x2f68f6(0x159)][_0x2f68f6(0x15f)]['text'] : _0x1b907c == _0x2f68f6(0x18f) && _0x425ac5[_0x2f68f6(0x159)]['listResponseMessage']?. [_0x2f68f6(0x163)] ? _0x425ac5[_0x2f68f6(0x159)][_0x2f68f6(0x180)][_0x2f68f6(0x163)] : _0x1b907c == _0x2f68f6(0x18f) ? _0x425ac5[_0x2f68f6(0x159)][_0x2f68f6(0x17e)][_0x2f68f6(0x181)] : '',
            _0x16384e = _0x33912c[_0x2f68f6(0x184)](),
            _0x4ff52a = await removeForbiddenCharacters(_0x16384e),
            _0x4efd90 = _0x425ac5[_0x2f68f6(0x189)][_0x2f68f6(0x185)][_0x2f68f6(0x16c)]('@')[0x0];
        let _0x2a76d5;
        if (_0x1b907c === _0x2f68f6(0x15a)) {
            const _0x4d9312 = await downloadContentFromMessage(_0x425ac5['message'][_0x2f68f6(0x15a)], _0x2f68f6(0x15b));
            let _0x38e67d = Buffer['from']([]);
            for await (const _0x22bad4 of _0x4d9312) {
                _0x38e67d = Buffer[_0x2f68f6(0x186)]([_0x38e67d, _0x22bad4]);
            }
            _0x2a76d5 = _0x38e67d[_0x2f68f6(0x179)](_0x2f68f6(0x17d));
        } else urlImage = null;
        if (_0x425ac5[_0x2f68f6(0x189)]['fromMe'] === !![]) return;
        let _0x5071c8;
        const _0x4527c4 = await dbQuery('SELECT * FROM autoreplies WHERE keyword = \"' + _0x4ff52a + _0x2f68f6(0x168) + _0x521347['user']['id'][_0x2f68f6(0x16c)](':')[0x0] + _0x2f68f6(0x173));
        if (_0x4527c4[_0x2f68f6(0x15e)] === 0x0) {
            const _0x153cd7 = _0x521347[_0x2f68f6(0x17b)]['id'][_0x2f68f6(0x16c)](':')[0x0];
            0x0;
            const _0x4a591f = await dbQuery(_0x2f68f6(0x172) + _0x153cd7 + _0x2f68f6(0x178)),
                _0x4dd165 = _0x4a591f[0x0][_0x2f68f6(0x177)];
            if (_0x4dd165 === null) return;
            const _0x516db3 = await sendWebhook({
                'command': _0x16384e,
                'bufferImage': _0x2a76d5,
                'from': _0x4efd90,
                'url': _0x4dd165
            });
            if (_0x516db3 === ![]) return;
            _0x5071c8 = JSON['stringify'](_0x516db3);
        } else _0x5071c8 = process[_0x2f68f6(0x165)][_0x2f68f6(0x176)] === _0x2f68f6(0x16e) ? _0x4527c4[0x0]['reply'] : JSON[_0x2f68f6(0x191)](_0x4527c4[0x0]['reply']);
        await _0x521347[_0x2f68f6(0x17f)](_0x425ac5[_0x2f68f6(0x189)][_0x2f68f6(0x185)], JSON['parse'](_0x5071c8))[_0x2f68f6(0x175)](_0x1d267f => {});
    } catch (_0x130343) {
        console[_0x2f68f6(0x170)](_0x130343);
    }
};
async function sendWebhook({
    command: _0x10c729,
    bufferImage: _0xd4991,
    from: _0x5d0d53,
    url: _0x25b380
}) {
    const _0x13b2cb = _0x5cfa73;
    try {
        const _0x41a295 = {
                'message': _0x10c729,
                'bufferImage': _0xd4991,
                'from': _0x5d0d53
            },
            _0x84fef7 = {
                'Content-Type': _0x13b2cb(0x18a)
            },
            _0x1faf34 = await axios[_0x13b2cb(0x18d)](_0x25b380, _0x41a295, _0x84fef7)['catch'](() => {
                return ![];
            });
        return _0x1faf34[_0x13b2cb(0x183)];
    } catch (_0x197f85) {
        return console['log'](_0x197f85), ![];
    }
}
function _0x248b(_0x2c5125, _0x20f204) {
    const _0x115dd0 = _0x115d();
    return _0x248b = function (_0x248b10, _0x42e386) {
        _0x248b10 = _0x248b10 - 0x159;
        let _0x228676 = _0x115dd0[_0x248b10];
        return _0x228676;
    }, _0x248b(_0x2c5125, _0x20f204);
}
module['exports'] = {
    'autoReply': autoReply
};


[/SPOILER]
 
Last edited:

hmc

Member
Banned User
Jul 23, 2022
98
50
18
Server Room
localhost
pino.js

\server\lib

Code:
'use strict';
function _0x124a(_0x1d4c4b, _0x3f301e) {
    const _0x39eac3 = _0x39ea();
    return _0x124a = function (_0x124a48, _0x5a5bd3) {
        _0x124a48 = _0x124a48 - 0x1a0;
        let _0x5f0292 = _0x39eac3[_0x124a48];
        return _0x5f0292;
    }, _0x124a(_0x1d4c4b, _0x3f301e);
}
const _0x3f6615 = _0x124a;
(function (_0x2b6005, _0x3824d1) {
    const _0x3adc43 = _0x124a,
        _0x37dc26 = _0x2b6005();
    while (!![]) {
        try {
            const _0x1fc5bb = -parseInt(_0x3adc43(0x1a6)) / 0x1 + -parseInt(_0x3adc43(0x1a8)) / 0x2 + -parseInt(_0x3adc43(0x1ab)) / 0x3 + -parseInt(_0x3adc43(0x1a2)) / 0x4 + parseInt(_0x3adc43(0x1a7)) / 0x5 + -parseInt(_0x3adc43(0x1aa)) / 0x6 + parseInt(_0x3adc43(0x1a5)) / 0x7;
            if (_0x1fc5bb === _0x3824d1) break;
            else _0x37dc26['push'](_0x37dc26['shift']());
        } catch (_0x3b0ea2) {
            _0x37dc26['push'](_0x37dc26['shift']());
        }
    }
}(_0x39ea, 0xe618a));
function _0x39ea() {
    const _0x4f9b68 = ['43306249YMwDIU', '1347529gdRNNm', '2691055lFEcVD', '829052oChDjq', 'SYS:standard', '9919050BQRURl', '3628926XlYogd', 'exports', 'info', '4629888uiQOJv', 'path', 'pino-pretty'];
    _0x39ea = function () {
        return _0x4f9b68;
    };
    return _0x39ea();
}
const path = require(_0x3f6615(0x1a3)),
    pino = require('pino'),
    logger = pino({
        'transport': {
            'target': _0x3f6615(0x1a4),
            'options': {
                'translateTime': _0x3f6615(0x1a9),
                'ignore': 'hostname,pid',
                'singleLine': ![],
                'colorize': !![],
                'levelFirst': !![],
                'append': !![],
                'mkdir': !![]
            }
        },
        'level': _0x3f6615(0x1a1)
    });
module[_0x3f6615(0x1a0)] = logger;


[/SPOILER]
 
Last edited:

Morehere

Well-known member
Null Master
Trusted Uploader
Jan 13, 2020
965
959
93
pino.js

\server\lib

Code:
'use strict';
function _0x124a(_0x1d4c4b, _0x3f301e) {
    const _0x39eac3 = _0x39ea();
    return _0x124a = function (_0x124a48, _0x5a5bd3) {
        _0x124a48 = _0x124a48 - 0x1a0;
        let _0x5f0292 = _0x39eac3[_0x124a48];
        return _0x5f0292;
    }, _0x124a(_0x1d4c4b, _0x3f301e);
}
const _0x3f6615 = _0x124a;
(function (_0x2b6005, _0x3824d1) {
    const _0x3adc43 = _0x124a,
        _0x37dc26 = _0x2b6005();
    while (!![]) {
        try {
            const _0x1fc5bb = -parseInt(_0x3adc43(0x1a6)) / 0x1 + -parseInt(_0x3adc43(0x1a8)) / 0x2 + -parseInt(_0x3adc43(0x1ab)) / 0x3 + -parseInt(_0x3adc43(0x1a2)) / 0x4 + parseInt(_0x3adc43(0x1a7)) / 0x5 + -parseInt(_0x3adc43(0x1aa)) / 0x6 + parseInt(_0x3adc43(0x1a5)) / 0x7;
            if (_0x1fc5bb === _0x3824d1) break;
            else _0x37dc26['push'](_0x37dc26['shift']());
        } catch (_0x3b0ea2) {
            _0x37dc26['push'](_0x37dc26['shift']());
        }
    }
}(_0x39ea, 0xe618a));
function _0x39ea() {
    const _0x4f9b68 = ['43306249YMwDIU', '1347529gdRNNm', '2691055lFEcVD', '829052oChDjq', 'SYS:standard', '9919050BQRURl', '3628926XlYogd', 'exports', 'info', '4629888uiQOJv', 'path', 'pino-pretty'];
    _0x39ea = function () {
        return _0x4f9b68;
    };
    return _0x39ea();
}
const path = require(_0x3f6615(0x1a3)),
    pino = require('pino'),
    logger = pino({
        'transport': {
            'target': _0x3f6615(0x1a4),
            'options': {
                'translateTime': _0x3f6615(0x1a9),
                'ignore': 'hostname,pid',
                'singleLine': ![],
                'colorize': !![],
                'levelFirst': !![],
                'append': !![],
                'mkdir': !![]
            }
        },
        'level': _0x3f6615(0x1a1)
    });
module[_0x3f6615(0x1a0)] = logger;
Don't be hurry bro.
Check your post by preview and then post it.
Enter spoiler manually like I shared.
 

Morehere

Well-known member
Null Master
Trusted Uploader
Jan 13, 2020
965
959
93
check, if it's working, i tried adding spoiler
Bro, Spoiler button will be same for all.
Please edit your post and remove
Code:
[ICODE]
before and after spoiler.
 
  • Like
Reactions: hmc

About us

  • Our community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day to make sure our community is one of the best.

Quick Navigation

User Menu