forked from franceking1/Flash-Md
-
Notifications
You must be signed in to change notification settings - Fork 2
/
antibot.js
1 lines (1 loc) · 5.57 KB
/
antibot.js
1
const _0x7addc3=_0xf060;(function(_0x55e5c3,_0x3b4214){const _0x44de5d=_0xf060,_0x9a8fcc=_0x55e5c3();while(!![]){try{const _0x27ffb4=parseInt(_0x44de5d(0xc5))/0x1+-parseInt(_0x44de5d(0xbd))/0x2+parseInt(_0x44de5d(0xc7))/0x3+parseInt(_0x44de5d(0xb3))/0x4+-parseInt(_0x44de5d(0xaa))/0x5*(-parseInt(_0x44de5d(0xa4))/0x6)+-parseInt(_0x44de5d(0xad))/0x7*(parseInt(_0x44de5d(0xbe))/0x8)+-parseInt(_0x44de5d(0xb8))/0x9*(parseInt(_0x44de5d(0xa6))/0xa);if(_0x27ffb4===_0x3b4214)break;else _0x9a8fcc['push'](_0x9a8fcc['shift']());}catch(_0x232b41){_0x9a8fcc['push'](_0x9a8fcc['shift']());}}}(_0x2916,0x3b62c),require('dotenv')[_0x7addc3(0xc1)]());const {Pool}=require('pg');let s=require(_0x7addc3(0xac));var dbUrl=s['DATABASE_URL']?s[_0x7addc3(0xb4)]:_0x7addc3(0xaf);const proConfig={'connectionString':dbUrl,'ssl':{'rejectUnauthorized':![]}},pool=new Pool(proConfig);async function createAntibotTable(){const _0x1acdda=_0x7addc3,_0x1e40ac=await pool[_0x1acdda(0xc2)]();try{await _0x1e40ac[_0x1acdda(0xa8)]('\x0a\x20\x20\x20\x20\x20\x20CREATE\x20TABLE\x20IF\x20NOT\x20EXISTS\x20antibot\x20(\x0a\x20\x20\x20\x20\x20\x20\x20\x20jid\x20text\x20PRIMARY\x20KEY,\x0a\x20\x20\x20\x20\x20\x20\x20\x20etat\x20text,\x0a\x20\x20\x20\x20\x20\x20\x20\x20action\x20text\x0a\x20\x20\x20\x20\x20\x20);\x0a\x20\x20\x20\x20'),console[_0x1acdda(0xa9)](_0x1acdda(0xa7));}catch(_0x2d58fa){console[_0x1acdda(0xbb)]('Une\x20erreur\x20est\x20survenue\x20lors\x20de\x20la\x20création\x20de\x20la\x20table\x20\x27antibot\x27:',_0x2d58fa);}finally{_0x1e40ac[_0x1acdda(0xb2)]();}}createAntibotTable();async function atbajouterOuMettreAJourJid(_0x2ca4bb,_0x157f44){const _0x2e3124=_0x7addc3,_0x45fa27=await pool[_0x2e3124(0xc2)]();try{const _0x370821=await _0x45fa27[_0x2e3124(0xa8)](_0x2e3124(0xba),[_0x2ca4bb]),_0x1c6d55=_0x370821['rows'][_0x2e3124(0xa5)]>0x0;_0x1c6d55?await _0x45fa27['query'](_0x2e3124(0xb6),[_0x157f44,_0x2ca4bb]):await _0x45fa27['query'](_0x2e3124(0xb0),[_0x2ca4bb,_0x157f44,_0x2e3124(0xab)]),console['log'](_0x2e3124(0xb7)+_0x2ca4bb+_0x2e3124(0xc0));}catch(_0x15ce6a){console['error'](_0x2e3124(0xc3),_0x15ce6a);}finally{_0x45fa27[_0x2e3124(0xb2)]();}};async function atbmettreAJourAction(_0x26d92e,_0x240cce){const _0x3f18cf=_0x7addc3,_0x1033ce=await pool['connect']();try{const _0x44d08d=await _0x1033ce[_0x3f18cf(0xa8)](_0x3f18cf(0xba),[_0x26d92e]),_0x2799dc=_0x44d08d['rows'][_0x3f18cf(0xa5)]>0x0;_0x2799dc?await _0x1033ce[_0x3f18cf(0xa8)](_0x3f18cf(0xb5),[_0x240cce,_0x26d92e]):await _0x1033ce['query'](_0x3f18cf(0xb0),[_0x26d92e,_0x3f18cf(0xb1),_0x240cce]),console[_0x3f18cf(0xa9)](_0x3f18cf(0xae)+_0x26d92e+'\x20dans\x20la\x20table\x20\x27antibot\x27.');}catch(_0x38fe9f){console[_0x3f18cf(0xbb)](_0x3f18cf(0xc6),_0x38fe9f);}finally{_0x1033ce[_0x3f18cf(0xb2)]();}};async function atbverifierEtatJid(_0x51f861){const _0x5809bc=_0x7addc3,_0x3a25f5=await pool[_0x5809bc(0xc2)]();try{const _0x3c18af=await _0x3a25f5[_0x5809bc(0xa8)]('SELECT\x20etat\x20FROM\x20antibot\x20WHERE\x20jid\x20=\x20$1',[_0x51f861]);if(_0x3c18af['rows']['length']>0x0){const _0x5246ed=_0x3c18af['rows'][0x0]['etat'];return _0x5246ed===_0x5809bc(0xbf);}else return![];}catch(_0x25b7f8){return console[_0x5809bc(0xbb)](_0x5809bc(0xbc),_0x25b7f8),![];}finally{_0x3a25f5[_0x5809bc(0xb2)]();}};async function atbrecupererActionJid(_0x16a002){const _0x1d886f=_0x7addc3,_0x24177b=await pool[_0x1d886f(0xc2)]();try{const _0x2cd996=await _0x24177b[_0x1d886f(0xa8)](_0x1d886f(0xc8),[_0x16a002]);if(_0x2cd996['rows'][_0x1d886f(0xa5)]>0x0){const _0xa42282=_0x2cd996[_0x1d886f(0xc4)][0x0]['action'];return _0xa42282;}else return _0x1d886f(0xab);}catch(_0x3aebb1){return console[_0x1d886f(0xbb)](_0x1d886f(0xb9),_0x3aebb1),_0x1d886f(0xab);}finally{_0x24177b[_0x1d886f(0xb2)]();}};module['exports']={'atbmettreAJourAction':atbmettreAJourAction,'atbajouterOuMettreAJourJid':atbajouterOuMettreAJourJid,'atbverifierEtatJid':atbverifierEtatJid,'atbrecupererActionJid':atbrecupererActionJid};function _0xf060(_0x1edae9,_0x164962){const _0x29167c=_0x2916();return _0xf060=function(_0xf060de,_0xd89a2){_0xf060de=_0xf060de-0xa4;let _0x2c6d16=_0x29167c[_0xf060de];return _0x2c6d16;},_0xf060(_0x1edae9,_0x164962);}function _0x2916(){const _0x2c2af4=['DATABASE_URL','UPDATE\x20antibot\x20SET\x20action\x20=\x20$1\x20WHERE\x20jid\x20=\x20$2','UPDATE\x20antibot\x20SET\x20etat\x20=\x20$1\x20WHERE\x20jid\x20=\x20$2','JID\x20','2935485QWDoCK','Erreur\x20lors\x20de\x20la\x20récupération\x20de\x20l\x27action\x20du\x20JID\x20dans\x20la\x20table\x20:','SELECT\x20*\x20FROM\x20antibot\x20WHERE\x20jid\x20=\x20$1','error','Erreur\x20lors\x20de\x20la\x20vérification\x20de\x20l\x27état\x20du\x20JID\x20dans\x20la\x20table\x20','703626PjWfNS','2797672YMYYQC','oui','\x20ajouté\x20ou\x20mis\x20à\x20jour\x20avec\x20succès\x20dans\x20la\x20table\x20\x27antibot\x27.','config','connect','Erreur\x20lors\x20de\x20l\x27ajout\x20ou\x20de\x20la\x20mise\x20à\x20jour\x20du\x20JID\x20dans\x20la\x20table\x20,','rows','375574oXEeBr','Erreur\x20lors\x20de\x20la\x20mise\x20à\x20jour\x20de\x20l\x27action\x20pour\x20le\x20JID\x20dans\x20la\x20table\x20\x20:','455343DMsNHd','SELECT\x20action\x20FROM\x20antibot\x20WHERE\x20jid\x20=\x20$1','6dvtmXl','length','10oZIvXj','La\x20table\x20\x27antibot\x27\x20a\x20été\x20créée\x20avec\x20succès.','query','log','1392655XlNBZQ','supp','../set','7fknnIK','Action\x20mise\x20à\x20jour\x20avec\x20succès\x20pour\x20le\x20JID\x20','postgres://db_7xp9_user:6hwmTN7rGPNsjlBEHyX49CXwrG7cDeYi@dpg-cj7ldu5jeehc73b2p7g0-a.oregon-postgres.render.com/db_7xp9','INSERT\x20INTO\x20antibot\x20(jid,\x20etat,\x20action)\x20VALUES\x20($1,\x20$2,\x20$3)','non','release','1860180ANpXRd'];_0x2916=function(){return _0x2c2af4;};return _0x2916();}