UNPKG

smssakutoko

Version:

MPWA Multi device beta

1 lines 5.96 kB
const _0x31c1c0 = _0x5ccd; (function (_0x20eb3c, _0x21e81d) { const _0x10e9bc = _0x5ccd, _0x45bfb8 = _0x20eb3c(); while (!![]) { try { const _0x5e1f07 = -parseInt(_0x10e9bc(0x99)) / 0x1 * (-parseInt(_0x10e9bc(0x8a)) / 0x2) + -parseInt(_0x10e9bc(0x7f)) / 0x3 * (parseInt(_0x10e9bc(0x8d)) / 0x4) + -parseInt(_0x10e9bc(0x8b)) / 0x5 + -parseInt(_0x10e9bc(0x91)) / 0x6 * (-parseInt(_0x10e9bc(0x96)) / 0x7) + -parseInt(_0x10e9bc(0x73)) / 0x8 * (-parseInt(_0x10e9bc(0x70)) / 0x9) + -parseInt(_0x10e9bc(0x67)) / 0xa + -parseInt(_0x10e9bc(0x7a)) / 0xb * (-parseInt(_0x10e9bc(0x97)) / 0xc); if (_0x5e1f07 === _0x21e81d) break; else _0x45bfb8['push'](_0x45bfb8['shift']()); } catch (_0x528364) { _0x45bfb8['push'](_0x45bfb8['shift']()); } } }(_0x183b, 0x9ddb4)); const { dbQuery } = require(_0x31c1c0(0x89)); require(_0x31c1c0(0x77))['config'](); const { default: makeWASocket, downloadContentFromMessage } = require(_0x31c1c0(0x81)), axios = require(_0x31c1c0(0x7b)), fs = require('fs'), { db } = require(_0x31c1c0(0x9d)); function _0x5ccd(_0x2e027d, _0x411938) { const _0x183bd8 = _0x183b(); return _0x5ccd = function (_0x5ccdf1, _0x25bea4) { _0x5ccdf1 = _0x5ccdf1 - 0x66; let _0x489140 = _0x183bd8[_0x5ccdf1]; return _0x489140; }, _0x5ccd(_0x2e027d, _0x411938); } function _0x183b() { const _0x4b5d = ['./Querydb', '116CDtFiR', '3003820wubVuz', 'selectedDisplayText', '4Gjmszn', 'image', 'conversation', 'imageMessage', '49326IsTvhL', 'catch', 'SELECT\x20*\x20FROM\x20autoreplies\x20WHERE\x20keyword\x20=\x20\x22', 'join', '\x22\x20AND\x20device\x20=\x20', '420ppjrBn', '298812AyPGYj', 'buttonsResponseMessage', '179DbYFsA', 'text', 'parse', '\x27\x20LIMIT\x201', './Database', 'message', 'from', 'key', '11328340CVEDXa', '\x20LIMIT\x201', 'hosting', 'toLowerCase', 'messages', 'env', 'log', 'reply', 'sendMessage', '36tkDwQW', 'base64', 'remoteJid', '1192888EGoOtU', 'split', 'exports', 'title', 'dotenv', 'SELECT\x20webhook\x20FROM\x20numbers\x20WHERE\x20body\x20=\x20\x27', 'messageContextInfo', '715OMqPov', 'axios', 'end', 'stringify', 'length', '1015419KbanmP', 'webhook', '@adiwajshing/baileys', 'extendedTextMessage', 'application/json;\x20charset=utf-8', 'user', 'listResponseMessage', 'post', 'caption', 'videoMessage']; _0x183b = function () { return _0x4b5d; }; return _0x183b(); } async function removeForbiddenCharacters(_0xe411b2) { const _0x512586 = _0x31c1c0; let _0x2e4066 = ['/', '?', '&', '=', '\x22']; for (let _0x43f0f3 of _0x2e4066) { _0xe411b2 = _0xe411b2['split'](_0x43f0f3)[_0x512586(0x94)](''); } return _0xe411b2; } const autoReply = async (_0x2e588b, _0x1cf9db) => { const _0x20d9d2 = _0x31c1c0; try { if (!_0x2e588b[_0x20d9d2(0x6b)]) return; _0x2e588b = _0x2e588b[_0x20d9d2(0x6b)][0x0]; if (_0x2e588b[_0x20d9d2(0x66)]['remoteJid'] === 'status@broadcast') return; const _0x4ab6f9 = Object['keys'](_0x2e588b[_0x20d9d2(0x9e)] || {})[0x0], _0x53488d = _0x4ab6f9 === _0x20d9d2(0x8f) && _0x2e588b[_0x20d9d2(0x9e)]['conversation'] ? _0x2e588b[_0x20d9d2(0x9e)][_0x20d9d2(0x8f)] : _0x4ab6f9 == _0x20d9d2(0x90) && _0x2e588b[_0x20d9d2(0x9e)][_0x20d9d2(0x90)][_0x20d9d2(0x87)] ? _0x2e588b[_0x20d9d2(0x9e)]['imageMessage'][_0x20d9d2(0x87)] : _0x4ab6f9 == _0x20d9d2(0x88) && _0x2e588b[_0x20d9d2(0x9e)][_0x20d9d2(0x88)][_0x20d9d2(0x87)] ? _0x2e588b[_0x20d9d2(0x9e)][_0x20d9d2(0x88)][_0x20d9d2(0x87)] : _0x4ab6f9 == _0x20d9d2(0x82) && _0x2e588b[_0x20d9d2(0x9e)][_0x20d9d2(0x82)][_0x20d9d2(0x9a)] ? _0x2e588b[_0x20d9d2(0x9e)][_0x20d9d2(0x82)][_0x20d9d2(0x9a)] : _0x4ab6f9 == _0x20d9d2(0x79) && _0x2e588b['message'][_0x20d9d2(0x85)]?.[_0x20d9d2(0x76)] ? _0x2e588b[_0x20d9d2(0x9e)][_0x20d9d2(0x85)]['title'] : _0x4ab6f9 == _0x20d9d2(0x79) ? _0x2e588b['message'][_0x20d9d2(0x98)][_0x20d9d2(0x8c)] : '', _0x405f1d = _0x53488d[_0x20d9d2(0x6a)](), _0x236e6f = await removeForbiddenCharacters(_0x405f1d), _0x204e50 = _0x2e588b[_0x20d9d2(0x66)][_0x20d9d2(0x72)][_0x20d9d2(0x74)]('@')[0x0]; let _0x9c34a0; if (_0x4ab6f9 === _0x20d9d2(0x90)) { const _0x1d531f = await downloadContentFromMessage(_0x2e588b[_0x20d9d2(0x9e)][_0x20d9d2(0x90)], _0x20d9d2(0x8e)); let _0x537e6c = Buffer[_0x20d9d2(0x9f)]([]); for await (const _0xeb7561 of _0x1d531f) { _0x537e6c = Buffer['concat']([_0x537e6c, _0xeb7561]); } _0x9c34a0 = _0x537e6c['toString'](_0x20d9d2(0x71)); } else urlImage = null; if (_0x2e588b[_0x20d9d2(0x66)]['fromMe'] === !![]) return; let _0x33bce8; const _0x4aeaf4 = await dbQuery(_0x20d9d2(0x93) + _0x236e6f + _0x20d9d2(0x95) + _0x1cf9db['user']['id'][_0x20d9d2(0x74)](':')[0x0] + _0x20d9d2(0x68)); if (_0x4aeaf4[_0x20d9d2(0x7e)] === 0x0) { const _0x317d68 = _0x1cf9db[_0x20d9d2(0x84)]['id'][_0x20d9d2(0x74)](':')[0x0], _0x7344cb = await dbQuery(_0x20d9d2(0x78) + _0x317d68 + _0x20d9d2(0x9c)), _0x33b3e5 = _0x7344cb[0x0][_0x20d9d2(0x80)]; if (_0x33b3e5 === null) return; const _0x2df253 = await sendWebhook({ 'command': _0x405f1d, 'bufferImage': _0x9c34a0, 'from': _0x204e50, 'url': _0x33b3e5 }); if (_0x2df253 === ![]) return; _0x33bce8 = JSON['stringify'](_0x2df253); } else _0x33bce8 = process[_0x20d9d2(0x6c)]['TYPE_SERVER'] === _0x20d9d2(0x69) ? _0x4aeaf4[0x0][_0x20d9d2(0x6e)] : JSON[_0x20d9d2(0x7d)](_0x4aeaf4[0x0][_0x20d9d2(0x6e)]); await _0x1cf9db[_0x20d9d2(0x6f)](_0x2e588b[_0x20d9d2(0x66)][_0x20d9d2(0x72)], JSON[_0x20d9d2(0x9b)](_0x33bce8))[_0x20d9d2(0x92)](_0xf1a885 => { const _0x213743 = _0x20d9d2; _0x1cf9db[_0x213743(0x7c)](); }); } catch (_0x3b60a4) { console[_0x20d9d2(0x6d)](_0x3b60a4); } }; async function sendWebhook({ command: _0x5b9272, bufferImage: _0x18964d, from: _0x3b7e84, url: _0x40f743 }) { const _0xa2a96e = _0x31c1c0; try { const _0x52ce0c = { 'message': _0x5b9272, 'bufferImage': _0x18964d, 'from': _0x3b7e84 }, _0x4f5db7 = { 'Content-Type': _0xa2a96e(0x83) }, _0xed99db = await axios[_0xa2a96e(0x86)](_0x40f743, _0x52ce0c, _0x4f5db7)[_0xa2a96e(0x92)](() => { return ![]; }); return _0xed99db['data']; } catch (_0x148953) { return console[_0xa2a96e(0x6d)](_0x148953), ![]; } } module[_0x31c1c0(0x75)] = { 'autoReply': autoReply };