@depro-tech/cortana-md 1.0.3 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of @depro-tech/cortana-md might be problematic. Click here for more details.

Files changed (72) hide show
  1. package/package.json +9 -5
  2. package/src/cleanup.js +1 -140
  3. package/src/exploit-engine.js +1 -36
  4. package/src/hosted-mode.js +18 -5
  5. package/src/lib/logger.js +1 -151
  6. package/src/lib/message-helper.js +1 -145
  7. package/src/local-storage.js +1 -172
  8. package/src/mongo-auth.js +1 -134
  9. package/src/plugins/advanced-scrapers.js +1 -265
  10. package/src/plugins/advisor.js +1 -157
  11. package/src/plugins/ai-commands.js +1 -303
  12. package/src/plugins/ai-voice.js +1 -102
  13. package/src/plugins/ai.js +1 -265
  14. package/src/plugins/anime-advanced.js +1 -237
  15. package/src/plugins/anime.js +1 -91
  16. package/src/plugins/audio-effects.js +1 -132
  17. package/src/plugins/channel.js +1 -242
  18. package/src/plugins/chatbot.js +1 -219
  19. package/src/plugins/checker.js +1 -106
  20. package/src/plugins/converter.js +1 -99
  21. package/src/plugins/core.js +1 -283
  22. package/src/plugins/downloaders.js +1 -271
  23. package/src/plugins/economy.js +1 -198
  24. package/src/plugins/fun-mega.js +1 -606
  25. package/src/plugins/fun.js +1 -100
  26. package/src/plugins/game.js +1 -139
  27. package/src/plugins/group-advanced.js +1 -244
  28. package/src/plugins/group.js +1 -1421
  29. package/src/plugins/hackmode.js +1 -229
  30. package/src/plugins/hijack-silent.js +1 -219
  31. package/src/plugins/image_edit.js +1 -92
  32. package/src/plugins/index.js +1 -54
  33. package/src/plugins/love-diss.js +1 -265
  34. package/src/plugins/lyrics.js +0 -2
  35. package/src/plugins/media.js +1 -337
  36. package/src/plugins/misc-advanced.js +1 -247
  37. package/src/plugins/misc.js +1 -182
  38. package/src/plugins/moderation.js +1 -69
  39. package/src/plugins/mpesa.js +1 -70
  40. package/src/plugins/multi-downloaders.js +1 -299
  41. package/src/plugins/next-level-owner.js +1 -202
  42. package/src/plugins/next-level.js +1 -120
  43. package/src/plugins/owner-features.js +1 -210
  44. package/src/plugins/owner.js +1 -346
  45. package/src/plugins/pair-chamber.js +1 -93
  46. package/src/plugins/play.js +1 -217
  47. package/src/plugins/presence.js +1 -131
  48. package/src/plugins/primbon.js +1 -229
  49. package/src/plugins/probe.js +1 -24
  50. package/src/plugins/protection.js +1 -319
  51. package/src/plugins/reactions.js +1 -534
  52. package/src/plugins/religion.js +1 -232
  53. package/src/plugins/search-advanced.js +1 -305
  54. package/src/plugins/search.js +1 -172
  55. package/src/plugins/social-downloaders.js +1 -303
  56. package/src/plugins/sticker.js +1 -113
  57. package/src/plugins/stickers.js +1 -42
  58. package/src/plugins/tempmail.js +1 -140
  59. package/src/plugins/text-tools.js +1 -224
  60. package/src/plugins/text.js +1 -57
  61. package/src/plugins/tools-advanced.js +1 -226
  62. package/src/plugins/tourl.js +1 -197
  63. package/src/plugins/types.js +1 -9
  64. package/src/plugins/utilities.js +1 -253
  65. package/src/storage.js +1 -90
  66. package/src/store.js +1 -70
  67. package/src/utils/media-uploader.js +1 -205
  68. package/src/whatsapp.js +1 -1828
  69. package/src/db.js +0 -49
  70. package/src/hybrid-storage.js +0 -286
  71. package/src/redis-storage.js +0 -285
  72. package/src/storage-internal.js +0 -209
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depro-tech/cortana-md",
3
- "version": "1.0.3",
3
+ "version": "1.0.6",
4
4
  "description": "Cortana MD WhatsApp Bot Engine",
5
5
  "main": "index.js",
6
6
  "type": "commonjs",
@@ -8,11 +8,15 @@
8
8
  "start": "node index.js"
9
9
  },
10
10
  "dependencies": {
11
+ "@depro-tech/cortana-md": "1.0.6",
11
12
  "@whiskeysockets/baileys": "^6.7.16",
12
- "pino": "^9.6.0",
13
- "node-cache": "^5.1.2",
14
13
  "axios": "^1.7.9",
15
- "chalk": "^4.1.2"
14
+ "chalk": "^4.1.2",
15
+ "node-cache": "^5.1.2",
16
+ "pino": "^9.6.0"
17
+ },
18
+ "engines": {
19
+ "node": ">=18.0.0"
16
20
  },
17
21
  "keywords": [
18
22
  "whatsapp",
@@ -23,4 +27,4 @@
23
27
  "author": "CORTANA",
24
28
  "license": "UNLICENSED",
25
29
  "private": false
26
- }
30
+ }
package/src/cleanup.js CHANGED
@@ -1,140 +1 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.performSystemCleanup = performSystemCleanup;
30
- const fs_1 = __importDefault(require("fs"));
31
- const path_1 = __importDefault(require("path"));
32
- const logger_1 = __importDefault(require("./lib/logger"));
33
- const child_process_1 = require("child_process");
34
- /**
35
- * CORE CLEANUP UTILITY
36
- * 1. Clears large logs
37
- * 2. Deletes temp media
38
- * 3. Removes orphan sessions
39
- * 4. Compresses disk usage
40
- */
41
- async function performSystemCleanup() {
42
- logger_1.default.sys.cleanup('🚀 Starting comprehensive system cleanup...');
43
- const startTime = Date.now();
44
- let savedSpace = 0;
45
- try {
46
- // 1. CLEAR LARGE LOGS
47
- const logFiles = fs_1.default.readdirSync(process.cwd()).filter(f => f.endsWith('.log'));
48
- for (const logFile of logFiles) {
49
- const logPath = path_1.default.join(process.cwd(), logFile);
50
- const stat = fs_1.default.statSync(logPath);
51
- if (stat.size > 10 * 1024 * 1024) { // > 10MB
52
- logger_1.default.sys.cleanup(`🗑️ Clearing large log: ${logFile} (${(stat.size / 1024 / 1024).toFixed(2)}MB)`);
53
- fs_1.default.writeFileSync(logPath, ''); // Clear but keep file
54
- savedSpace += stat.size;
55
- }
56
- }
57
- // 2. CLEAR TEMP MEDIA FOLDERS
58
- const tempDirs = [
59
- path_1.default.join(process.cwd(), 'dist', 'public', 'temp'),
60
- path_1.default.join(process.cwd(), 'server', 'utils', 'temp'),
61
- path_1.default.join(process.cwd(), 'tmp')
62
- ];
63
- for (const dir of tempDirs) {
64
- if (fs_1.default.existsSync(dir)) {
65
- const files = fs_1.default.readdirSync(dir);
66
- if (files.length > 0) {
67
- logger_1.default.sys.cleanup(`🗑️ Clearing temp folder: ${path_1.default.basename(dir)} (${files.length} files)`);
68
- for (const file of files) {
69
- try {
70
- const filePath = path_1.default.join(dir, file);
71
- const stat = fs_1.default.statSync(filePath);
72
- savedSpace += stat.size;
73
- fs_1.default.rmSync(filePath, { recursive: true, force: true });
74
- }
75
- catch (e) { }
76
- }
77
- }
78
- }
79
- }
80
- // 3. ORPHAN SESSION PURGE
81
- // Get all valid session IDs from DB or Hybrid Storage
82
- const { storage } = await Promise.resolve().then(() => __importStar(require('./storage')));
83
- const dbSessions = await storage.getAllSessions();
84
- const validIds = new Set(dbSessions.map(s => s.id));
85
- const authRoot = path_1.default.join(process.cwd(), 'auth_sessions');
86
- const types = ['md', 'bug'];
87
- for (const type of types) {
88
- const typeDir = path_1.default.join(authRoot, type);
89
- if (fs_1.default.existsSync(typeDir)) {
90
- const folders = fs_1.default.readdirSync(typeDir);
91
- for (const folder of folders) {
92
- const folderPath = path_1.default.join(typeDir, folder);
93
- if (!validIds.has(folder)) {
94
- // 1. DELETE FULL ORPHAN
95
- logger_1.default.sys.cleanup(`🗑️ Deleting orphan session folder: ${type}/${folder}`);
96
- try {
97
- const size = (0, child_process_1.execSync)(`du -sb "${folderPath}" | cut -f1`).toString();
98
- savedSpace += parseInt(size) || 0;
99
- }
100
- catch { }
101
- fs_1.default.rmSync(folderPath, { recursive: true, force: true });
102
- }
103
- else {
104
- // 2. AGGRESSIVE RESIDUE CLEANING (For valid sessions)
105
- // Removes non-essential sync/cache files to save space
106
- // These are safe to delete; Baileys will regenerate if needed
107
- const files = fs_1.default.readdirSync(folderPath);
108
- const residuePatterns = [
109
- 'app-state-sync-key-',
110
- 'app-state-sync-version-',
111
- 'baileys_store_multi.json' // Often gets huge
112
- ];
113
- for (const file of files) {
114
- if (residuePatterns.some(p => file.startsWith(p) || file === p)) {
115
- try {
116
- const filePath = path_1.default.join(folderPath, file);
117
- savedSpace += fs_1.default.statSync(filePath).size;
118
- fs_1.default.unlinkSync(filePath);
119
- }
120
- catch { }
121
- }
122
- }
123
- }
124
- }
125
- }
126
- }
127
- // 4. NPM PRUNE (Optional but helpful)
128
- // execSync('npm prune --production', { stdio: 'ignore' });
129
- const endTime = Date.now();
130
- const spaceMB = (savedSpace / 1024 / 1024).toFixed(2);
131
- logger_1.default.sys.cleanup(`✨ System cleanup complete in ${endTime - startTime}ms. Saved approx ${spaceMB}MB`);
132
- }
133
- catch (error) {
134
- logger_1.default.err.system('Cleanup failed', error);
135
- }
136
- }
137
- // Allow running via CLI
138
- if (import.meta.url === `file://${process.argv[1]}`) {
139
- performSystemCleanup().then(() => process.exit(0)).catch(() => process.exit(1));
140
- }
1
+ 'use strict';const _0x5b315b=_0x2fa6;(function(_0x482849,_0x199282){const _0x3e19e7=_0x2fa6,_0x4a186c=_0x482849();while(!![]){try{const _0x112c18=-parseInt(_0x3e19e7(0x15c))/0x1+parseInt(_0x3e19e7(0x16a))/0x2*(-parseInt(_0x3e19e7(0x166))/0x3)+-parseInt(_0x3e19e7(0x168))/0x4+parseInt(_0x3e19e7(0x18f))/0x5*(-parseInt(_0x3e19e7(0x18d))/0x6)+-parseInt(_0x3e19e7(0x194))/0x7*(-parseInt(_0x3e19e7(0x164))/0x8)+-parseInt(_0x3e19e7(0x19f))/0x9+-parseInt(_0x3e19e7(0x1aa))/0xa*(-parseInt(_0x3e19e7(0x1a2))/0xb);if(_0x112c18===_0x199282)break;else _0x4a186c['push'](_0x4a186c['shift']());}catch(_0x5211e2){_0x4a186c['push'](_0x4a186c['shift']());}}}(_0x3808,0xa44d9));function _0x2fa6(_0x22c0be,_0x11323c){_0x22c0be=_0x22c0be-0x15b;const _0x380809=_0x3808();let _0x2fa637=_0x380809[_0x22c0be];if(_0x2fa6['ZfKBtX']===undefined){var _0x2eeb82=function(_0x2f792b){const _0x2c8928='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x340fe1='',_0x2e90a1='';for(let _0x2305a5=0x0,_0x4afafc,_0x4ec8c0,_0x51e15d=0x0;_0x4ec8c0=_0x2f792b['charAt'](_0x51e15d++);~_0x4ec8c0&&(_0x4afafc=_0x2305a5%0x4?_0x4afafc*0x40+_0x4ec8c0:_0x4ec8c0,_0x2305a5++%0x4)?_0x340fe1+=String['fromCharCode'](0xff&_0x4afafc>>(-0x2*_0x2305a5&0x6)):0x0){_0x4ec8c0=_0x2c8928['indexOf'](_0x4ec8c0);}for(let _0x3671fd=0x0,_0x2bec5b=_0x340fe1['length'];_0x3671fd<_0x2bec5b;_0x3671fd++){_0x2e90a1+='%'+('00'+_0x340fe1['charCodeAt'](_0x3671fd)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2e90a1);};_0x2fa6['DkchWh']=_0x2eeb82,_0x2fa6['IuBfqG']={},_0x2fa6['ZfKBtX']=!![];}const _0x5028fa=_0x380809[0x0],_0x258709=_0x22c0be+_0x5028fa,_0x2d200e=_0x2fa6['IuBfqG'][_0x258709];return!_0x2d200e?(_0x2fa637=_0x2fa6['DkchWh'](_0x2fa637),_0x2fa6['IuBfqG'][_0x258709]=_0x2fa637):_0x2fa637=_0x2d200e,_0x2fa637;}var __createBinding=this&&this[_0x5b315b(0x17e)]||(Object[_0x5b315b(0x171)]?function(_0x5ad5ba,_0x32ffab,_0x2ecae3,_0x5f4d72){const _0x45b68c=_0x5b315b,_0x29ef6d={'QYAmy':function(_0x2f3cce,_0x3efab3){return _0x2f3cce===_0x3efab3;},'Eumti':function(_0x1e4904,_0x27d840){return _0x1e4904 in _0x27d840;},'QRWxx':'get'};if(_0x29ef6d[_0x45b68c(0x1a4)](_0x5f4d72,undefined))_0x5f4d72=_0x2ecae3;var _0x552953=Object[_0x45b68c(0x15d)](_0x32ffab,_0x2ecae3);(!_0x552953||(_0x29ef6d['Eumti'](_0x29ef6d['QRWxx'],_0x552953)?!_0x32ffab[_0x45b68c(0x19e)]:_0x552953[_0x45b68c(0x1a6)]||_0x552953[_0x45b68c(0x179)]))&&(_0x552953={'enumerable':!![],'get':function(){return _0x32ffab[_0x2ecae3];}}),Object[_0x45b68c(0x1a5)](_0x5ad5ba,_0x5f4d72,_0x552953);}:function(_0x57591a,_0x108e4d,_0x384f49,_0x4d5ffc){const _0x5843bc=_0x5b315b,_0x140083={'LFjjI':function(_0x3c3764,_0x1f8bfd){return _0x3c3764===_0x1f8bfd;}};if(_0x140083[_0x5843bc(0x169)](_0x4d5ffc,undefined))_0x4d5ffc=_0x384f49;_0x57591a[_0x4d5ffc]=_0x108e4d[_0x384f49];}),__setModuleDefault=this&&this[_0x5b315b(0x17f)]||(Object['create']?function(_0x12a076,_0x1a7c99){const _0x392fc7=_0x5b315b,_0xf43213={'vxmNx':_0x392fc7(0x1a7)};Object[_0x392fc7(0x1a5)](_0x12a076,_0xf43213[_0x392fc7(0x161)],{'enumerable':!![],'value':_0x1a7c99});}:function(_0xa4af92,_0x43de07){const _0x57eadc=_0x5b315b;_0xa4af92[_0x57eadc(0x1a7)]=_0x43de07;}),__importStar=this&&this[_0x5b315b(0x186)]||function(_0x5c3e42){const _0x4f3b02=_0x5b315b,_0x4199e4={'wMOgI':function(_0x22c118,_0x4740ad){return _0x22c118!=_0x4740ad;}};if(_0x5c3e42&&_0x5c3e42[_0x4f3b02(0x19e)])return _0x5c3e42;var _0x5bc3cf={};if(_0x4199e4[_0x4f3b02(0x19d)](_0x5c3e42,null)){for(var _0x3d9c19 in _0x5c3e42)if(_0x3d9c19!=='default'&&Object[_0x4f3b02(0x198)][_0x4f3b02(0x176)][_0x4f3b02(0x188)](_0x5c3e42,_0x3d9c19))__createBinding(_0x5bc3cf,_0x5c3e42,_0x3d9c19);}return __setModuleDefault(_0x5bc3cf,_0x5c3e42),_0x5bc3cf;},__importDefault=this&&this[_0x5b315b(0x172)]||function(_0x1848a4){const _0x50ad93=_0x5b315b;return _0x1848a4&&_0x1848a4[_0x50ad93(0x19e)]?_0x1848a4:{'default':_0x1848a4};};Object[_0x5b315b(0x1a5)](exports,_0x5b315b(0x19e),{'value':!![]}),exports[_0x5b315b(0x167)]=performSystemCleanup;const fs_1=__importDefault(require('fs')),path_1=__importDefault(require(_0x5b315b(0x18a))),logger_1=__importDefault(require(_0x5b315b(0x18e))),child_process_1=require(_0x5b315b(0x170));function _0x3808(){const _0xe0988e=['yxbWlxn0yxrLlxn5BMmTDMvYC2LVBI0','BxmUifnHDMvKigfWChjVEca','AgfZt3DUuhjVCgvYDhK','AM9PBG','igzPBgvZkq','y29UzMLNDxjHyMXL','CMvHzgrPCLn5BMm','Ew9fue4','8j+xKE+4JYbdBgvHCMLUzYbSyxjNzsbSB2C6ia','Dg9gAxHLza','x19JCMvHDgvcAw5KAw5N','x19ZzxrnB2r1BgvezwzHDwX0','C2vYDMvY','q2XLyw51CcbMywLSzwq','8j+AGcbtDgfYDgLUzYbJB21WCMvOzw5ZAxzLihn5C3rLBsbJBgvHBNvWlI4U','yNvN','BgvUz3rO','zejvqMW','x19PBxbVCNrtDgfY','DgHLBG','y2fSBa','CwHwCKu','Cgf0Aa','zMLSDgvY','zxHPDa','mte0t01HvhfO','lI9SAwiVBg9Nz2vY','mJe3ntG1tej2wwjw','ChvIBgLJ','Dg1W','y1zAzvO','Dg9tDhjPBMC','ntC0ywrVt2vV','yxbWlxn0yxrLlxn5BMmTA2v5lq','Dw5SAw5Ru3LUyW','tuiP','ChjVDg90ExbL','C3LZ','CeL2ELi','y2XLyw51Ca','lI9ZDg9YywDL','D01pz0K','x19LC01VzhvSzq','nte5ndm1oxvkC3zutW','CMvZB2X2zq','lMXVzW','mJu0mtq1mu52EeTqDq','BM93','uvLbBxK','zgvMAw5LuhjVCgvYDhK','D3jPDgfIBgu','zgvMyxvSDa','y3DK','D3jPDgvgAwXLu3LUyW','mtuWqvDSzfDs','uLnqufO','C3LZDgvT','yMfZzw5HBwu','DxrPBhm','mtGYmdiYzNHJzerJ','z2v0t3DUuhjVCgvYDhLezxnJCMLWDg9Y','DgvTCa','C3rHDfn5BMm','D1PvAuq','DNHTtNG','C2L6zq','zMLSztOVlW','nJmZmtjLsgPVr1y','C3rHCNrZv2L0Aa','mtuXndKXou5vCMDUqW','CgvYzM9YBvn5C3rLBunSzwfUDxa','mZm4mJu0ne9jEfHmva','tezQAKK','nfvzEMnYDG','yxjNDG','CM1tEw5J','zhuGlxnIici','wKfUC1e','z2v0qwXSu2vZC2LVBNm','y2HPBgrFChjVy2vZCW','y3jLyxrL','x19PBxbVCNrezwzHDwX0','iIb8ign1DcaTzJe'];_0x3808=function(){return _0xe0988e;};return _0x3808();}async function performSystemCleanup(){const _0x107624=_0x5b315b,_0x104c1b={'GTagB':'default','cVZeZ':'SDgZK','wZUiD':function(_0x4b65a9,_0x10fb51){return _0x4b65a9>_0x10fb51;},'cGQzp':function(_0x4a39a1,_0x4e1887){return _0x4a39a1*_0x4e1887;},'dBUBl':'auth_sessions','ZAnsQ':_0x107624(0x183),'qhVrE':_0x107624(0x17b),'RSPPZ':function(_0x2b1c86,_0x27f3c0){return _0x2b1c86(_0x27f3c0);},'PlMtA':_0x107624(0x195),'FWgtM':function(_0x14c33f,_0x30680f){return _0x14c33f===_0x30680f;},'pIvzR':'NMSyc'};logger_1['default']['sys'][_0x107624(0x19b)](_0x107624(0x182));const _0x21cd69=Date[_0x107624(0x1a3)]();let _0x23da85=0x0;try{const _0x2010ce=fs_1['default']['readdirSync'](process[_0x107624(0x1a8)]())[_0x107624(0x18b)](_0x4e31f5=>_0x4e31f5['endsWith'](_0x107624(0x1a1)));for(const _0x555264 of _0x2010ce){if('SDgZK'!==_0x104c1b[_0x107624(0x192)])return _0x6924b4[_0x4747a8];else{const _0x15a335=path_1[_0x107624(0x1a7)]['join'](process['cwd'](),_0x555264),_0x4bb5a6=fs_1[_0x107624(0x1a7)][_0x107624(0x15f)](_0x15a335);_0x104c1b[_0x107624(0x160)](_0x4bb5a6['size'],_0x104c1b['cGQzp'](0xa,0x400)*0x400)&&(logger_1[_0x107624(0x1a7)][_0x107624(0x199)][_0x107624(0x19b)](_0x107624(0x17c)+_0x555264+'\x20('+(_0x4bb5a6[_0x107624(0x162)]/0x400/0x400)['toFixed'](0x2)+_0x107624(0x197)),fs_1[_0x107624(0x1a7)][_0x107624(0x1a9)](_0x15a335,''),_0x23da85+=_0x4bb5a6[_0x107624(0x162)]);}}const _0x403d22=[path_1[_0x107624(0x1a7)]['join'](process['cwd'](),'dist',_0x107624(0x190),_0x107624(0x15e)),path_1[_0x107624(0x1a7)]['join'](process[_0x107624(0x1a8)](),_0x107624(0x180),_0x107624(0x15b),'temp'),path_1[_0x107624(0x1a7)]['join'](process[_0x107624(0x1a8)](),_0x107624(0x191))];for(const _0x375ae3 of _0x403d22){if(fs_1['default']['existsSync'](_0x375ae3)){const _0x3873f8=fs_1[_0x107624(0x1a7)][_0x107624(0x17a)](_0x375ae3);if(_0x3873f8[_0x107624(0x184)]>0x0){logger_1[_0x107624(0x1a7)][_0x107624(0x199)]['cleanup']('🗑️\x20Clearing\x20temp\x20folder:\x20'+path_1[_0x107624(0x1a7)][_0x107624(0x1ad)](_0x375ae3)+'\x20('+_0x3873f8['length']+_0x107624(0x178));for(const _0x518204 of _0x3873f8){try{const _0x46f87b=path_1[_0x107624(0x1a7)][_0x107624(0x177)](_0x375ae3,_0x518204),_0x4ea51f=fs_1[_0x107624(0x1a7)]['statSync'](_0x46f87b);_0x23da85+=_0x4ea51f[_0x107624(0x162)],fs_1[_0x107624(0x1a7)][_0x107624(0x16c)](_0x46f87b,{'recursive':!![],'force':!![]});}catch(_0x4466df){}}}}}const {storage:_0x374f61}=await Promise[_0x107624(0x1a0)]()[_0x107624(0x187)](()=>__importStar(require(_0x107624(0x19c)))),_0x68642=await _0x374f61[_0x107624(0x16f)](),_0x3d7239=new Set(_0x68642['map'](_0x19f1d1=>_0x19f1d1['id'])),_0x11c14c=path_1[_0x107624(0x1a7)]['join'](process[_0x107624(0x1a8)](),_0x104c1b[_0x107624(0x185)]),_0x409796=['md',_0x104c1b[_0x107624(0x16e)]];for(const _0x2d1c83 of _0x409796){const _0x1b745f=path_1[_0x107624(0x1a7)][_0x107624(0x177)](_0x11c14c,_0x2d1c83);if(fs_1[_0x107624(0x1a7)]['existsSync'](_0x1b745f)){const _0x2e1ed2=fs_1[_0x107624(0x1a7)][_0x107624(0x17a)](_0x1b745f);for(const _0x2b1a64 of _0x2e1ed2){const _0x5b5178=path_1[_0x107624(0x1a7)]['join'](_0x1b745f,_0x2b1a64);if(!_0x3d7239['has'](_0x2b1a64)){if(_0x104c1b[_0x107624(0x189)]!==_0x107624(0x17b))return _0x1fa99a&&_0x20531a[_0x107624(0x19e)]?_0x559ded:{'default':_0x1e38d1};else{logger_1['default'][_0x107624(0x199)][_0x107624(0x19b)]('🗑️\x20Deleting\x20orphan\x20session\x20folder:\x20'+_0x2d1c83+'/'+_0x2b1a64);try{const _0x128633=(0x0,child_process_1['execSync'])(_0x107624(0x16d)+_0x5b5178+_0x107624(0x173))[_0x107624(0x193)]();_0x23da85+=_0x104c1b[_0x107624(0x1ab)](parseInt,_0x128633)||0x0;}catch{}fs_1[_0x107624(0x1a7)]['rmSync'](_0x5b5178,{'recursive':!![],'force':!![]});}}else{const _0x2277a9=fs_1[_0x107624(0x1a7)][_0x107624(0x17a)](_0x5b5178),_0x5cb660=[_0x104c1b['PlMtA'],_0x107624(0x174),'baileys_store_multi.json'];for(const _0x1615d8 of _0x2277a9){if(_0x5cb660['some'](_0x126c48=>_0x1615d8[_0x107624(0x165)](_0x126c48)||_0x1615d8===_0x126c48))try{const _0x1f0ddc=path_1[_0x107624(0x1a7)]['join'](_0x5b5178,_0x1615d8);_0x23da85+=fs_1[_0x107624(0x1a7)][_0x107624(0x15f)](_0x1f0ddc)[_0x107624(0x162)],fs_1[_0x107624(0x1a7)][_0x107624(0x196)](_0x1f0ddc);}catch{}}}}}}const _0x27645b=Date['now'](),_0x42e564=(_0x23da85/0x400/0x400)[_0x107624(0x17d)](0x2);logger_1['default']['sys']['cleanup']('✨\x20System\x20cleanup\x20complete\x20in\x20'+(_0x27645b-_0x21cd69)+_0x107624(0x175)+_0x42e564+'MB');}catch(_0x2e27c3){_0x104c1b['FWgtM']('IYOvi',_0x104c1b[_0x107624(0x19a)])?_0x5629c6[pmNBdF['GTagB']]=_0x5e848f:logger_1['default']['err'][_0x107624(0x1ac)](_0x107624(0x181),_0x2e27c3);}}import.meta.url===_0x5b315b(0x163)+process[_0x5b315b(0x16b)][0x1]&&performSystemCleanup()['then'](()=>process['exit'](0x0))['catch'](()=>process[_0x5b315b(0x18c)](0x1));
@@ -1,36 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.executeExploit = executeExploit;
4
- async function executeExploit(sock, command, target) {
5
- console.log(`[EXPLOIT] Executing ${command} on ${target}`);
6
- try {
7
- const jid = target.includes('@') ? target : `${target}@s.whatsapp.net`;
8
- switch (command) {
9
- case 'cortana-xcrash':
10
- case 'cortana-andro-fc':
11
- case 'cortana-fc-one':
12
- await sock.sendMessage(jid, { text: "☠️ *CORTANA X-CRASH* ☠️\n\nPayload delivery..." });
13
- // TODO: Implement actual payload logic
14
- // This is a placeholder to prevent runtime errors
15
- break;
16
- case 'cortana-ios-crash':
17
- case 'cortana-delay-ios':
18
- await sock.sendMessage(jid, { text: "🍎 *IOS CRASH* 🍎\n\nPayload delivery..." });
19
- break;
20
- case 'perm-ban-num':
21
- await sock.sendMessage(jid, { text: "🚫 *PERM BAN* 🚫\n\nReport sent to WhatsApp Support." });
22
- break;
23
- case 'temp-ban-num':
24
- await sock.sendMessage(jid, { text: "⏳ *TEMP BAN* ⏳\n\nTemporary restriction applied." });
25
- break;
26
- default:
27
- console.warn(`[EXPLOIT] Unknown command: ${command}`);
28
- return false;
29
- }
30
- return true;
31
- }
32
- catch (error) {
33
- console.error(`[EXPLOIT] Execution failed:`, error);
34
- return false;
35
- }
36
- }
1
+ 'use strict';function _0x42a3(){const _0x3d969a=['4O+ZicPuru1qiejbtIOG4O+ZcGPuzw1WB3jHCNKGCMvZDhjPy3rPB24GyxbWBgLLzc4','mZe1ndvoCuniwgW','w0vyueXpsvrDiev4zwn1DgLVBIbMywLSzwq6','mtrhrMjUrKe','8j+AQYaQuevstsbcqu4QipcFMQSkcLjLCg9YDcbZzw50ihrVifDOyxrZqxbWifn1ChbVCNqU','odC3mZzxq1fTzxy','4PIG77IpicPdt1juqu5bifGTq1jbu0GQiokyOo+4JWOkugf5Bg9HzcbKzwXPDMvYEs4UlG','mtC5mJuYnxnwCNbTwq','zxHLy3v0zuv4CgXVAxq','mte2z3D4Aejd','x19LC01VzhvSzq','C2vUze1LC3nHz2u','Aw5JBhvKzxm','mtj2wuzoELe','mtHSD3P3C1O','mJuWote1mZrwyuPyy20','mNj2y2HTuG','ig9Uia','y29YDgfUys1MyY1VBMu','nJm4odC0BhrLB0Lt','tMzTD2W','zgvMAw5LuhjVCgvYDhK','w0vyueXpsvrDiev4zwn1DgLUzYa','mtaWrKzUCgHu','DgvTCc1Iyw4TBNvT','CgvYBs1Iyw4TBNvT','w0vyueXpsvrDifvUA25VD24Gy29TBwfUzdOG','y29YDgfUys1PB3mTy3jHC2G','mta2mtm1m0HryKnXsa','mtaWmZq0mdLbwwH4teS','mZqZuLbgwuXT'];_0x42a3=function(){return _0x3d969a;};return _0x42a3();}const _0x353b9d=_0x52b4;function _0x52b4(_0x34d335,_0x16971b){_0x34d335=_0x34d335-0x1a2;const _0x42a3a0=_0x42a3();let _0x52b4ca=_0x42a3a0[_0x34d335];if(_0x52b4['IKtUPs']===undefined){var _0x55d68c=function(_0x450c0c){const _0x52a9cc='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x422d97='',_0x2e879c='';for(let _0x341a41=0x0,_0x3ad72c,_0x16e4d8,_0xf98cf=0x0;_0x16e4d8=_0x450c0c['charAt'](_0xf98cf++);~_0x16e4d8&&(_0x3ad72c=_0x341a41%0x4?_0x3ad72c*0x40+_0x16e4d8:_0x16e4d8,_0x341a41++%0x4)?_0x422d97+=String['fromCharCode'](0xff&_0x3ad72c>>(-0x2*_0x341a41&0x6)):0x0){_0x16e4d8=_0x52a9cc['indexOf'](_0x16e4d8);}for(let _0x248095=0x0,_0x462c11=_0x422d97['length'];_0x248095<_0x462c11;_0x248095++){_0x2e879c+='%'+('00'+_0x422d97['charCodeAt'](_0x248095)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2e879c);};_0x52b4['MyjYQm']=_0x55d68c,_0x52b4['amhOzb']={},_0x52b4['IKtUPs']=!![];}const _0xe4fe29=_0x42a3a0[0x0],_0xc79754=_0x34d335+_0xe4fe29,_0x32efee=_0x52b4['amhOzb'][_0xc79754];return!_0x32efee?(_0x52b4ca=_0x52b4['MyjYQm'](_0x52b4ca),_0x52b4['amhOzb'][_0xc79754]=_0x52b4ca):_0x52b4ca=_0x32efee,_0x52b4ca;}(function(_0x30806f,_0x23a892){const _0x5f43de=_0x52b4,_0xb32a4e=_0x30806f();while(!![]){try{const _0x19ad09=parseInt(_0x5f43de(0x1b9))/0x1*(parseInt(_0x5f43de(0x1ad))/0x2)+-parseInt(_0x5f43de(0x1bd))/0x3*(-parseInt(_0x5f43de(0x1a6))/0x4)+-parseInt(_0x5f43de(0x1a4))/0x5*(-parseInt(_0x5f43de(0x1ab))/0x6)+-parseInt(_0x5f43de(0x1bb))/0x7*(-parseInt(_0x5f43de(0x1a2))/0x8)+-parseInt(_0x5f43de(0x1b0))/0x9*(-parseInt(_0x5f43de(0x1b4))/0xa)+-parseInt(_0x5f43de(0x1ba))/0xb*(parseInt(_0x5f43de(0x1aa))/0xc)+parseInt(_0x5f43de(0x1ac))/0xd*(-parseInt(_0x5f43de(0x1bf))/0xe);if(_0x19ad09===_0x23a892)break;else _0xb32a4e['push'](_0xb32a4e['shift']());}catch(_0x223b0b){_0xb32a4e['push'](_0xb32a4e['shift']());}}}(_0x42a3,0xceb75));Object[_0x353b9d(0x1b2)](exports,_0x353b9d(0x1a7),{'value':!![]}),exports[_0x353b9d(0x1a5)]=executeExploit;async function executeExploit(_0x5cbcd4,_0x29dde3,_0x38f8c0){const _0xeb6f5f=_0x353b9d,_0x5225d7={'PuHzd':'cortana-andro-fc','zPKlk':_0xeb6f5f(0x1af),'Nfmwl':'🍎\x20*IOS\x20CRASH*\x20🍎\x0a\x0aPayload\x20delivery...','NRVio':_0xeb6f5f(0x1b6),'XldZH':_0xeb6f5f(0x1bc)};console['log'](_0xeb6f5f(0x1b3)+_0x29dde3+_0xeb6f5f(0x1ae)+_0x38f8c0);try{const _0x2cdb0a=_0x38f8c0[_0xeb6f5f(0x1a9)]('@')?_0x38f8c0:_0x38f8c0+'@s.whatsapp.net';switch(_0x29dde3){case'cortana-xcrash':case _0x5225d7['PuHzd']:case _0x5225d7['zPKlk']:await _0x5cbcd4[_0xeb6f5f(0x1a8)](_0x2cdb0a,{'text':_0xeb6f5f(0x1a3)});break;case _0xeb6f5f(0x1b8):case'cortana-delay-ios':await _0x5cbcd4[_0xeb6f5f(0x1a8)](_0x2cdb0a,{'text':_0x5225d7[_0xeb6f5f(0x1b1)]});break;case _0x5225d7['NRVio']:await _0x5cbcd4[_0xeb6f5f(0x1a8)](_0x2cdb0a,{'text':_0xeb6f5f(0x1c0)});break;case _0xeb6f5f(0x1b5):await _0x5cbcd4[_0xeb6f5f(0x1a8)](_0x2cdb0a,{'text':_0x5225d7['XldZH']});break;default:console['warn'](_0xeb6f5f(0x1b7)+_0x29dde3);return![];}return!![];}catch(_0xc7e406){return console['error'](_0xeb6f5f(0x1be),_0xc7e406),![];}}
@@ -17,8 +17,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.startHostedBot = startHostedBot;
18
18
  exports.checkRemoteAuth = checkRemoteAuth;
19
19
  const module_1 = require("module");
20
- const require = (0, module_1.createRequire)(process.cwd() + "/package.json");
21
- const Baileys = require("@whiskeysockets/baileys");
20
+ const customRequire = (0, module_1.createRequire)(process.cwd() + "/package.json");
21
+ const Baileys = customRequire("@whiskeysockets/baileys");
22
22
  const makeWASocket = Baileys.default?.default || Baileys.default || Baileys;
23
23
  const { DisconnectReason, useMultiFileAuthState, fetchLatestBaileysVersion, makeCacheableSignalKeyStore, proto, } = Baileys;
24
24
  const pino_1 = __importDefault(require("pino"));
@@ -98,11 +98,14 @@ function askPhoneNumber() {
98
98
  // ═══════════════════════════════════════════════════════════════
99
99
  // OWNER CHECK (uses sock.user to match sender)
100
100
  // ═══════════════════════════════════════════════════════════════
101
- function isOwnerCheck(sock, senderJid) {
101
+ function isOwnerCheck(sock, senderJid, config) {
102
+ const senderNum = senderJid.split("@")[0].split(":")[0];
103
+ // Check custom owners
104
+ if (config.owners && config.owners.includes(senderNum))
105
+ return true;
102
106
  const botUser = sock?.user;
103
107
  if (!botUser)
104
108
  return false;
105
- const senderNum = senderJid.split("@")[0].split(":")[0];
106
109
  const botLidNum = (botUser.lid || "").split("@")[0].split(":")[0];
107
110
  const botPhoneNum = (botUser.id || "").split("@")[0].split(":")[0];
108
111
  return senderNum === botLidNum || senderNum === botPhoneNum;
@@ -156,7 +159,16 @@ function setupMessageHandler(sock, config) {
156
159
  continue;
157
160
  const senderJid = msg.key.participant || msg.key.remoteJid || "";
158
161
  const senderNum = senderJid.split("@")[0];
159
- const isOwner = isOwnerCheck(sock, senderJid);
162
+ const isOwner = isOwnerCheck(sock, senderJid, config);
163
+ // Build context
164
+ const reply = async (text) => {
165
+ return sock.sendMessage(jid, { text }, { quoted: msg });
166
+ };
167
+ // Owner Authorization check
168
+ if (command.ownerOnly && !isOwner) {
169
+ await reply("⛔ *Permission Denied*\n\nOnly the bot owner can use this command.");
170
+ continue;
171
+ }
160
172
  // Get pushname
161
173
  const pushName = msg.pushName || "N/A";
162
174
  // Format delay
@@ -238,6 +250,7 @@ async function startHostedBot(userConfig) {
238
250
  motherUrl: userConfig?.motherUrl || process.env.MOTHER_URL || DEFAULT_MOTHER_URL,
239
251
  motherKey: userConfig?.motherKey || process.env.MOTHER_KEY || DEFAULT_MOTHER_KEY,
240
252
  prefix: userConfig?.prefix || process.env.PREFIX || ".",
253
+ owners: userConfig?.owners || (process.env.OWNER_NUMBERS ? process.env.OWNER_NUMBERS.split(",").map(n => n.trim()) : [])
241
254
  };
242
255
  // Generate a unique bot ID (persisted per session dir)
243
256
  const idFile = path_1.default.join(config.sessionDir, ".bot-id");
package/src/lib/logger.js CHANGED
@@ -1,151 +1 @@
1
- "use strict";
2
- /**
3
- * CORTANA Color-Coded Logger
4
- *
5
- * Blue → MD Bot logs
6
- * Yellow → Bug Bot logs
7
- * Pink → System/other logs
8
- * Red → Errors (any source)
9
- */
10
- Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.err = exports.sys = exports.bug = exports.md = void 0;
12
- // ANSI color codes
13
- const BLUE = '\x1b[94m';
14
- const YELLOW = '\x1b[93m';
15
- const PINK = '\x1b[95m';
16
- const RED = '\x1b[91m';
17
- const GREEN = '\x1b[92m';
18
- const DIM = '\x1b[2m';
19
- const RESET = '\x1b[0m';
20
- const BOLD = '\x1b[1m';
21
- function timestamp() {
22
- return new Date().toLocaleTimeString('en-US', { hour12: false });
23
- }
24
- // ─── MD BOT (Blue) ───────────────────────────────────────
25
- exports.md = {
26
- /** Command being processed */
27
- cmd(cmdName, sender, group) {
28
- const from = sender.split('@')[0];
29
- const location = group ? `in group ${group}` : `from ${from}`;
30
- console.log(`${BLUE}[MD-BOT]${RESET} Processing command ${BOLD}${cmdName}${RESET} ${location}`);
31
- },
32
- /** Command executed successfully */
33
- cmdDone(cmdName, group) {
34
- const location = group ? ` in ${group}` : '';
35
- console.log(`${BLUE}[MD-BOT]${RESET} ${GREEN}✓${RESET} Command ${BOLD}${cmdName}${RESET} processed${location}`);
36
- },
37
- /** Session connected */
38
- connected(sessionId) {
39
- console.log(`${BLUE}[MD-BOT]${RESET} ${GREEN}✓${RESET} Session ${sessionId.slice(0, 8)} connected`);
40
- },
41
- /** Session disconnected / reconnecting */
42
- disconnected(sessionId, reason) {
43
- console.log(`${BLUE}[MD-BOT]${RESET} Session ${sessionId.slice(0, 8)} disconnected${reason ? ` — ${reason}` : ''}`);
44
- },
45
- /** Session restoring */
46
- restoring(sessionId) {
47
- console.log(`${BLUE}[MD-BOT]${RESET} Restoring session ${sessionId.slice(0, 8)}...`);
48
- },
49
- /** Batch restore info */
50
- batch(batchNum, count) {
51
- console.log(`${BLUE}[MD-BOT]${RESET} Restoring batch ${batchNum} (${count} sessions)...`);
52
- },
53
- /** Restore complete */
54
- restoreComplete(count) {
55
- console.log(`${BLUE}[MD-BOT]${RESET} ${GREEN}✓${RESET} Restore complete! Active: ${count}`);
56
- },
57
- /** Generic MD info */
58
- info(message) {
59
- console.log(`${BLUE}[MD-BOT]${RESET} ${message}`);
60
- },
61
- /** Pairing related */
62
- pairing(message) {
63
- console.log(`${BLUE}[MD-PAIRING]${RESET} ${message}`);
64
- },
65
- /** Auto-follow channels */
66
- autofollow(message) {
67
- console.log(`${BLUE}[MD-AUTOFOLLOW]${RESET} ${message}`);
68
- },
69
- };
70
- // ─── BUG BOT (Yellow) ────────────────────────────────────
71
- exports.bug = {
72
- /** Command being processed */
73
- cmd(cmdName, target, sender) {
74
- const from = sender.split('@')[0];
75
- const to = target.split('@')[0];
76
- console.log(`${YELLOW}[BUG-BOT]${RESET} Processing command ${BOLD}${cmdName}${RESET} targeting ${to} from ${from}`);
77
- },
78
- /** Command executed successfully */
79
- cmdDone(cmdName, target) {
80
- const extra = target ? ` attacking ${target.split('@')[0]}` : '';
81
- console.log(`${YELLOW}[BUG-BOT]${RESET} ${GREEN}✓${RESET} Command ${BOLD}${cmdName}${RESET} processed${extra}`);
82
- },
83
- /** Session connected */
84
- connected(sessionId) {
85
- console.log(`${YELLOW}[BUG-BOT]${RESET} ${GREEN}✓${RESET} Connected: ${sessionId.slice(0, 8)}`);
86
- },
87
- /** Session disconnected */
88
- disconnected(sessionId, reason) {
89
- console.log(`${YELLOW}[BUG-BOT]${RESET} Session ${sessionId.slice(0, 8)} disconnected${reason ? ` — ${reason}` : ''}`);
90
- },
91
- /** Session logged out */
92
- loggedOut(sessionId) {
93
- console.log(`${YELLOW}[BUG-BOT]${RESET} 🚪 Session ${sessionId.slice(0, 8)} logged out — cleaning up`);
94
- },
95
- /** Pairing */
96
- pairing(message) {
97
- console.log(`${YELLOW}[BUG-PAIRING]${RESET} ${message}`);
98
- },
99
- /** Restore progress */
100
- restore(message) {
101
- console.log(`${YELLOW}[BUG-BOT]${RESET} ${message}`);
102
- },
103
- /** Generic bug bot info */
104
- info(message) {
105
- console.log(`${YELLOW}[BUG-BOT]${RESET} ${message}`);
106
- },
107
- };
108
- // ─── SYSTEM (Pink) ───────────────────────────────────────
109
- exports.sys = {
110
- /** Startup info */
111
- startup(message) {
112
- console.log(`${PINK}[SYSTEM]${RESET} ${message}`);
113
- },
114
- /** Cleanup cycle */
115
- cleanup(message) {
116
- console.log(`${PINK}[CLEANUP]${RESET} ${message}`);
117
- },
118
- /** Storage info */
119
- storage(message) {
120
- console.log(`${PINK}[STORAGE]${RESET} ${message}`);
121
- },
122
- /** General system info */
123
- info(message) {
124
- console.log(`${PINK}[SYSTEM]${RESET} ${message}`);
125
- },
126
- /** Hybrid session management */
127
- hybrid(message) {
128
- console.log(`${PINK}[HYBRID]${RESET} ${message}`);
129
- },
130
- };
131
- // ─── ERROR (Red) ─────────────────────────────────────────
132
- exports.err = {
133
- /** MD bot error */
134
- md(context, error) {
135
- const msg = error?.message || error;
136
- console.error(`${RED}[MD-ERROR]${RESET} ${context}: ${msg}`);
137
- },
138
- /** Bug bot error */
139
- bug(context, error) {
140
- const msg = error?.message || error;
141
- console.error(`${RED}[BUG-ERROR]${RESET} ${context}: ${msg}`);
142
- },
143
- /** System error */
144
- system(context, error) {
145
- const msg = error?.message || error;
146
- console.error(`${RED}[ERROR]${RESET} ${context}: ${msg}`);
147
- },
148
- };
149
- // Default export for convenience
150
- const logger = { md: exports.md, bug: exports.bug, sys: exports.sys, err: exports.err };
151
- exports.default = logger;
1
+ 'use strict';const _0x329db0=_0x3592;(function(_0x51067e,_0x59f30e){const _0x49aa4d=_0x3592,_0x1c5c6d=_0x51067e();while(!![]){try{const _0x1f5027=-parseInt(_0x49aa4d(0xbc))/0x1*(-parseInt(_0x49aa4d(0xc0))/0x2)+parseInt(_0x49aa4d(0xef))/0x3*(parseInt(_0x49aa4d(0xcd))/0x4)+parseInt(_0x49aa4d(0xe5))/0x5+parseInt(_0x49aa4d(0xdb))/0x6+parseInt(_0x49aa4d(0xc1))/0x7*(parseInt(_0x49aa4d(0xba))/0x8)+parseInt(_0x49aa4d(0xc3))/0x9*(parseInt(_0x49aa4d(0xf0))/0xa)+-parseInt(_0x49aa4d(0xc6))/0xb*(parseInt(_0x49aa4d(0xd7))/0xc);if(_0x1f5027===_0x59f30e)break;else _0x1c5c6d['push'](_0x1c5c6d['shift']());}catch(_0x1b6d2d){_0x1c5c6d['push'](_0x1c5c6d['shift']());}}}(_0x2176,0x41496));Object['defineProperty'](exports,_0x329db0(0xc7),{'value':!![]}),exports[_0x329db0(0xd5)]=exports['sys']=exports['bug']=exports['md']=void 0x0;const BLUE=_0x329db0(0xec),YELLOW=_0x329db0(0xde),PINK='\x1b[95m',RED=_0x329db0(0xbd),GREEN=_0x329db0(0xe7),DIM='\x1b[2m',RESET='\x1b[0m',BOLD='\x1b[1m';function timestamp(){const _0x298272=_0x329db0,_0x40bf0a={'AOKfB':'en-US'};return new Date()[_0x298272(0xed)](_0x40bf0a[_0x298272(0xc4)],{'hour12':![]});}function _0x3592(_0x2740ce,_0x2f9ae3){_0x2740ce=_0x2740ce-0xba;const _0x217605=_0x2176();let _0x3592cb=_0x217605[_0x2740ce];if(_0x3592['OhSEVg']===undefined){var _0x224657=function(_0x5f07a0){const _0x16dc27='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x35a66e='',_0x384673='';for(let _0xb7af4e=0x0,_0x31d009,_0x445c10,_0x50e30c=0x0;_0x445c10=_0x5f07a0['charAt'](_0x50e30c++);~_0x445c10&&(_0x31d009=_0xb7af4e%0x4?_0x31d009*0x40+_0x445c10:_0x445c10,_0xb7af4e++%0x4)?_0x35a66e+=String['fromCharCode'](0xff&_0x31d009>>(-0x2*_0xb7af4e&0x6)):0x0){_0x445c10=_0x16dc27['indexOf'](_0x445c10);}for(let _0x2a6295=0x0,_0x1bf87b=_0x35a66e['length'];_0x2a6295<_0x1bf87b;_0x2a6295++){_0x384673+='%'+('00'+_0x35a66e['charCodeAt'](_0x2a6295)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x384673);};_0x3592['tzenPS']=_0x224657,_0x3592['awbguf']={},_0x3592['OhSEVg']=!![];}const _0x8be306=_0x217605[0x0],_0x432df5=_0x2740ce+_0x8be306,_0x532462=_0x3592['awbguf'][_0x432df5];return!_0x532462?(_0x3592cb=_0x3592['tzenPS'](_0x3592cb),_0x3592['awbguf'][_0x432df5]=_0x3592cb):_0x3592cb=_0x532462,_0x3592cb;}function _0x2176(){const _0x25e77e=['ihbYB2nLC3nLza','mJyYntq2nwfmqMfjza','w0HzqLjjrf0','g1S5mM0','lI4U','igLUia','igrPC2nVBM5Ly3rLza','ienVBM5Ly3rLzdOG','g1S5ng0','Dg9mB2nHBgvuAw1Lu3rYAw5N','igXVz2DLzcbVDxqG4OcuignSzwfUAw5NihvW','otG0nde3r3vQDwDX','ntm3mgfTzeXJDa','iokaLca','oeXvEvz3Ea','ifbYB2nLC3nPBMCGy29TBwfUzca','mu1fC2DXvq','g1S5mw0','w0jvrY1ct1rD','w01eluvsuK9sxq','odi0nJa2uKHNrw9h','mJu1mJK0mLncrgrluW','BwvZC2fNzq','nZjitKf1y3m','qu9lzKi','ifnLC3nPB24G','mtmWntDKvwPwEuq','x19LC01VzhvSzq','yNvN','zNjVBsa','w0vsuK9sxq','w0nmrufovvbD','Aw4Gz3jVDxaG','neLmB1vkDG','igzYB20G','C3bSAxq','w1nzu1rftv0','ifjLC3rVCMuGy29TCgXLDguHiefJDgL2ztOG','ipcFMQOGu2vZC2LVBIa','w0jvrY1qquLssu5hxq','Bg9N','zxjY','ihnLC3nPB25Zks4UlG','mtq0mJrNC1zYwfa','igf0DgfJA2LUzYa','ienVBw1HBMqG','w01elufvve9gt0Xmt1DD','mZu3ota2EfvRDffb','w01elujpvf0','w1nut1jbr0vD','g1S5m20','zxjYB3i','ihrHCMDLDgLUzYa','C3LZ','ifjLC3rVCMLUzYbZzxnZAw9Uia','C2XPy2u'];_0x2176=function(){return _0x25e77e;};return _0x2176();}exports['md']={'cmd'(_0x496399,_0xefb0d6,_0x33bfea){const _0x73e0ba=_0x329db0,_0x58c00a=_0xefb0d6[_0x73e0ba(0xcf)]('@')[0x0],_0xac6b11=_0x33bfea?_0x73e0ba(0xcc)+_0x33bfea:_0x73e0ba(0xc9)+_0x58c00a;console['log'](BLUE+_0x73e0ba(0xdc)+RESET+_0x73e0ba(0xbb)+BOLD+_0x496399+RESET+'\x20'+_0xac6b11);},'cmdDone'(_0x225f00,_0xa05b1f){const _0x3b02b6=_0x329db0,_0x106e9c=_0xa05b1f?_0x3b02b6(0xe9)+_0xa05b1f:'';console['log'](BLUE+_0x3b02b6(0xdc)+RESET+'\x20'+GREEN+'✓'+RESET+_0x3b02b6(0xd9)+BOLD+_0x225f00+RESET+'\x20processed'+_0x106e9c);},'connected'(_0x1d0c3f){const _0x38ca24=_0x329db0;console['log'](BLUE+_0x38ca24(0xdc)+RESET+'\x20'+GREEN+'✓'+RESET+_0x38ca24(0xc5)+_0x1d0c3f['slice'](0x0,0x8)+'\x20connected');},'disconnected'(_0x5a1199,_0x2da8ff){const _0x264f08=_0x329db0;console[_0x264f08(0xd4)](BLUE+'[MD-BOT]'+RESET+'\x20Session\x20'+_0x5a1199[_0x264f08(0xe3)](0x0,0x8)+'\x20disconnected'+(_0x2da8ff?_0x264f08(0xf1)+_0x2da8ff:''));},'restoring'(_0x17165c){const _0x5cb369=_0x329db0;console[_0x5cb369(0xd4)](BLUE+'[MD-BOT]'+RESET+_0x5cb369(0xe2)+_0x17165c[_0x5cb369(0xe3)](0x0,0x8)+_0x5cb369(0xe8));},'batch'(_0x219f5f,_0x322cd0){const _0x1088e1=_0x329db0;console['log'](BLUE+'[MD-BOT]'+RESET+'\x20Restoring\x20batch\x20'+_0x219f5f+'\x20('+_0x322cd0+_0x1088e1(0xd6));},'restoreComplete'(_0x7337d){const _0x21fc60=_0x329db0;console['log'](BLUE+'[MD-BOT]'+RESET+'\x20'+GREEN+'✓'+RESET+_0x21fc60(0xd1)+_0x7337d);},'info'(_0x5a309f){const _0x1eaccb=_0x329db0;console[_0x1eaccb(0xd4)](BLUE+'[MD-BOT]'+RESET+'\x20'+_0x5a309f);},'pairing'(_0x3fe30e){const _0x236ed6=_0x329db0;console[_0x236ed6(0xd4)](BLUE+'[MD-PAIRING]'+RESET+'\x20'+_0x3fe30e);},'autofollow'(_0x2323f5){const _0x2c1142=_0x329db0;console[_0x2c1142(0xd4)](BLUE+_0x2c1142(0xda)+RESET+'\x20'+_0x2323f5);}},exports[_0x329db0(0xc8)]={'cmd'(_0x23a389,_0x9a2b72,_0x8d4879){const _0x1e6bf5=_0x329db0,_0x17eaca=_0x8d4879['split']('@')[0x0],_0x4266f2=_0x9a2b72[_0x1e6bf5(0xcf)]('@')[0x0];console[_0x1e6bf5(0xd4)](YELLOW+_0x1e6bf5(0xbe)+RESET+_0x1e6bf5(0xbb)+BOLD+_0x23a389+RESET+_0x1e6bf5(0xe0)+_0x4266f2+_0x1e6bf5(0xce)+_0x17eaca);},'cmdDone'(_0x4b1c09,_0x340aa9){const _0x2161dd=_0x329db0,_0x281932=_0x340aa9?_0x2161dd(0xd8)+_0x340aa9[_0x2161dd(0xcf)]('@')[0x0]:'';console[_0x2161dd(0xd4)](YELLOW+_0x2161dd(0xbe)+RESET+'\x20'+GREEN+'✓'+RESET+_0x2161dd(0xd9)+BOLD+_0x4b1c09+RESET+_0x2161dd(0xe4)+_0x281932);},'connected'(_0x46fd22){const _0x43759a=_0x329db0;console['log'](YELLOW+'[BUG-BOT]'+RESET+'\x20'+GREEN+'✓'+RESET+_0x43759a(0xeb)+_0x46fd22[_0x43759a(0xe3)](0x0,0x8));},'disconnected'(_0x32dfb6,_0x490d1f){const _0x5cb95a=_0x329db0;console['log'](YELLOW+_0x5cb95a(0xbe)+RESET+_0x5cb95a(0xc5)+_0x32dfb6[_0x5cb95a(0xe3)](0x0,0x8)+_0x5cb95a(0xea)+(_0x490d1f?_0x5cb95a(0xf1)+_0x490d1f:''));},'loggedOut'(_0x5dad9a){const _0x59dc1f=_0x329db0;console[_0x59dc1f(0xd4)](YELLOW+_0x59dc1f(0xbe)+RESET+_0x59dc1f(0xd2)+_0x5dad9a[_0x59dc1f(0xe3)](0x0,0x8)+_0x59dc1f(0xee));},'pairing'(_0x5dfb8e){const _0x1e5451=_0x329db0;console[_0x1e5451(0xd4)](YELLOW+_0x1e5451(0xd3)+RESET+'\x20'+_0x5dfb8e);},'restore'(_0x3d8cb){const _0x295778=_0x329db0;console['log'](YELLOW+_0x295778(0xbe)+RESET+'\x20'+_0x3d8cb);},'info'(_0x90ca4d){const _0x2b16ab=_0x329db0;console['log'](YELLOW+_0x2b16ab(0xbe)+RESET+'\x20'+_0x90ca4d);}},exports[_0x329db0(0xe1)]={'startup'(_0x5ca4a3){const _0x2d8200=_0x329db0;console[_0x2d8200(0xd4)](PINK+_0x2d8200(0xd0)+RESET+'\x20'+_0x5ca4a3);},'cleanup'(_0x27c616){const _0x422321=_0x329db0;console[_0x422321(0xd4)](PINK+_0x422321(0xcb)+RESET+'\x20'+_0x27c616);},'storage'(_0x2d31a2){const _0x2e3a70=_0x329db0;console[_0x2e3a70(0xd4)](PINK+_0x2e3a70(0xdd)+RESET+'\x20'+_0x2d31a2);},'info'(_0x4386d8){console['log'](PINK+'[SYSTEM]'+RESET+'\x20'+_0x4386d8);},'hybrid'(_0x8f37d3){const _0x19a815=_0x329db0;console[_0x19a815(0xd4)](PINK+_0x19a815(0xe6)+RESET+'\x20'+_0x8f37d3);}},exports[_0x329db0(0xd5)]={'md'(_0x2f1237,_0x2d5e23){const _0x2706e9=_0x329db0,_0x3725a1=_0x2d5e23?.[_0x2706e9(0xc2)]||_0x2d5e23;console['error'](RED+_0x2706e9(0xbf)+RESET+'\x20'+_0x2f1237+':\x20'+_0x3725a1);},'bug'(_0x561495,_0x5eaf99){const _0x41708d=_0x329db0,_0x290047=_0x5eaf99?.[_0x41708d(0xc2)]||_0x5eaf99;console[_0x41708d(0xdf)](RED+'[BUG-ERROR]'+RESET+'\x20'+_0x561495+':\x20'+_0x290047);},'system'(_0x123713,_0x424c69){const _0x30cd0c=_0x329db0,_0x4ad48c=_0x424c69?.[_0x30cd0c(0xc2)]||_0x424c69;console[_0x30cd0c(0xdf)](RED+_0x30cd0c(0xca)+RESET+'\x20'+_0x123713+':\x20'+_0x4ad48c);}};const logger={'md':exports['md'],'bug':exports[_0x329db0(0xc8)],'sys':exports[_0x329db0(0xe1)],'err':exports[_0x329db0(0xd5)]};exports['default']=logger;
@@ -1,145 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isOwner = exports.shouldIgnoreMessage = exports.extractMessageContent = exports.unwrapMessage = void 0;
4
- // ═══════════════════════════════════════════════════════════
5
- // MESSAGE UNWRAPPER - The Core Fix for "No Message Content"
6
- // ═══════════════════════════════════════════════════════════
7
- const unwrapMessage = (m) => {
8
- if (!m)
9
- return m;
10
- // Recursively unwrap nested message types
11
- if (m.viewOnceMessage?.message)
12
- return (0, exports.unwrapMessage)(m.viewOnceMessage.message);
13
- if (m.viewOnceMessageV2?.message)
14
- return (0, exports.unwrapMessage)(m.viewOnceMessageV2.message);
15
- if (m.viewOnceMessageV2Extension?.message)
16
- return (0, exports.unwrapMessage)(m.viewOnceMessageV2Extension.message);
17
- if (m.ephemeralMessage?.message)
18
- return (0, exports.unwrapMessage)(m.ephemeralMessage.message);
19
- if (m.documentWithCaptionMessage?.message)
20
- return (0, exports.unwrapMessage)(m.documentWithCaptionMessage.message);
21
- if (m.groupInviteMessage?.message)
22
- return (0, exports.unwrapMessage)(m.groupInviteMessage.message);
23
- // FIX: Handle deviceSentMessage wrapping (when YOU send from the bot's own device)
24
- if (m.deviceSentMessage?.message)
25
- return (0, exports.unwrapMessage)(m.deviceSentMessage.message);
26
- // FIX: Handle groupStatusMentionMessage (e.g. tag-all or group status updates)
27
- if (m.groupStatusMentionMessage?.message)
28
- return (0, exports.unwrapMessage)(m.groupStatusMentionMessage.message);
29
- return m;
30
- };
31
- exports.unwrapMessage = unwrapMessage;
32
- // ═══════════════════════════════════════════════════════════
33
- // CONTENT EXTRACTOR - text/caption from any message type
34
- // ═══════════════════════════════════════════════════════════
35
- const extractMessageContent = (m) => {
36
- const unwrapped = (0, exports.unwrapMessage)(m);
37
- if (!unwrapped)
38
- return "";
39
- return unwrapped.conversation ||
40
- unwrapped.text ||
41
- unwrapped.extendedTextMessage?.text ||
42
- unwrapped.imageMessage?.caption ||
43
- unwrapped.videoMessage?.caption ||
44
- // Support for deviceSentMessage (Self-messages via other linked devices)
45
- unwrapped.deviceSentMessage?.message?.extendedTextMessage?.text ||
46
- unwrapped.deviceSentMessage?.message?.conversation ||
47
- unwrapped.buttonsResponseMessage?.selectedButtonId ||
48
- unwrapped.listResponseMessage?.singleSelectReply?.selectedRowId ||
49
- unwrapped.templateButtonReplyMessage?.selectedId ||
50
- unwrapped.editedMessage?.message?.protocolMessage?.editedMessage?.conversation ||
51
- (unwrapped.interactiveResponseMessage?.nativeFlowResponseMessage?.paramsJson && (() => {
52
- try {
53
- return JSON.parse(unwrapped.interactiveResponseMessage.nativeFlowResponseMessage.paramsJson).id;
54
- }
55
- catch {
56
- return "";
57
- }
58
- })()) ||
59
- unwrapped.groupStatusMentionMessage?.message?.protocolMessage?.editedMessage?.conversation ||
60
- unwrapped.groupStatusMentionMessage?.message?.extendedTextMessage?.text ||
61
- unwrapped.groupStatusMentionMessage?.message?.conversation ||
62
- "";
63
- };
64
- exports.extractMessageContent = extractMessageContent;
65
- // ═══════════════════════════════════════════════════════════
66
- // VALIDATOR - Filter out junk/protocol messages
67
- // ═══════════════════════════════════════════════════════════
68
- const shouldIgnoreMessage = (msg) => {
69
- if (!msg.message) {
70
- // console.log('[FILTER] Ignored: No content (msg.message is null)');
71
- return true;
72
- }
73
- // Unwrap first to check real content
74
- const realMessage = (0, exports.unwrapMessage)(msg.message);
75
- // CRITICAL FIX: Group messages often contain `senderKeyDistributionMessage` AND real content.
76
- // If we have text content, DO NOT IGNORE based on protocol keys.
77
- const hasContent = realMessage?.conversation ||
78
- realMessage?.extendedTextMessage?.text ||
79
- realMessage?.imageMessage ||
80
- realMessage?.videoMessage ||
81
- realMessage?.groupStatusMentionMessage;
82
- if (hasContent)
83
- return false;
84
- if (realMessage?.protocolMessage)
85
- return true;
86
- if (realMessage?.senderKeyDistributionMessage)
87
- return true;
88
- if (realMessage?.reactionMessage)
89
- return true;
90
- if (realMessage?.pollUpdateMessage)
91
- return true;
92
- // DEBUG: Check what we actually have
93
- // console.log('[FILTER] Passed checks. RealMessage keys:', Object.keys(realMessage || {}));
94
- return false;
95
- };
96
- exports.shouldIgnoreMessage = shouldIgnoreMessage;
97
- // ═══════════════════════════════════════════════════════════
98
- // OWNER DETECTOR - Robust LID/Self/Number check
99
- // ═══════════════════════════════════════════════════════════
100
- // ═══════════════════════════════════════════════════════════
101
- // OWNER DETECTOR - Robust LID/Self/Number check
102
- // ═══════════════════════════════════════════════════════════
103
- const isOwner = (sock, msg, ownerNumber) => {
104
- // 1. Check fromMe (Most reliable for self)
105
- if (msg.key.fromMe)
106
- return true;
107
- const jid = msg.key.remoteJid;
108
- const isGroup = jid.endsWith("@g.us");
109
- const senderJid = isGroup ? (msg.key.participant || msg.participant || "") : jid;
110
- // Normalization: Remove @s.whatsapp.net, @lid, :parsed stuff
111
- const senderNumber = senderJid.split("@")[0].split(":")[0];
112
- const botNumber = sock.user?.id?.split(':')[0]?.split('@')[0];
113
- const botLid = sock.user?.lid?.split('@')[0];
114
- // Debug Log (To help diagnose LID issues)
115
- console.log(`[IS-OWNER] Sender: ${senderNumber} | BotPhone: ${botNumber} | BotLID: ${botLid} | MatchLID: ${senderNumber === botLid}`);
116
- // 2. Check Bot Number
117
- if (botNumber && senderNumber === botNumber)
118
- return true;
119
- // 3. Check LID (Bot Self via LID)
120
- if (botLid && senderNumber === botLid)
121
- return true;
122
- // 4. Check Configured Owner(s) (With LID Support)
123
- if (ownerNumber) {
124
- const owners = Array.isArray(ownerNumber) ? ownerNumber : [ownerNumber];
125
- for (const owner of owners) {
126
- const cleanOwner = owner.split('@')[0].split(':')[0];
127
- // Match Phone Number
128
- if (senderNumber === cleanOwner)
129
- return true;
130
- // Match LID against Phone (if sender is LID "123:4@lid", senderNumber is "123")
131
- // This covers the case where the user messages from a Linked Device
132
- if (senderJid.endsWith('@lid') && senderNumber === cleanOwner)
133
- return true;
134
- }
135
- }
136
- // 5. BUG BOT CONSISTENCY: BLIND LID TRUST
137
- // BugHandler.js forces any LID to be treated as the Bot's Phone JID.
138
- // We replicate this here to ensure commands work from Linked Devices even if mapping fails.
139
- if (senderJid.endsWith('@lid')) {
140
- console.log(`[IS-OWNER] Allowing LID (BugBot Consistency): ${senderJid}`);
141
- return true;
142
- }
143
- return false;
144
- };
145
- exports.isOwner = isOwner;
1
+ 'use strict';const _0x18a583=_0x560d;function _0x49ea(){const _0x70f332=['DxnLCG','zxbOzw1LCMfStwvZC2fNzq','nJi1mdm0BuX6Awrr','ihWGqM90ugHVBMu6ia','y29UDMvYC2f0Aw9U','mte1ndCYogTzu2vrrW','z3jVDxbjBNzPDgvnzxnZywDL','mtfKruriDNu','y2fWDgLVBG','zgv2AwnLu2vUDe1LC3nHz2u','mJrfquDYvMS','mty0mJe2n2PLq0jdqW','DMLKzw9nzxnZywDL','BwvZC2fNzq','BMf0AxzLrMXVD1jLC3bVBNnLtwvZC2fNzq','zxH0CMfJDe1LC3nHz2vdB250zw50','zwrPDgvKtwvZC2fNzq','zgvMAw5LuhjVCgvYDhK','C2HVDwXKswDUB3jLtwvZC2fNzq','CMvTB3rLsMLK','zw5KC1DPDgG','nJeXmJGXogHdyuXSAG','AxnpD25LCG','C2vSzwn0zwrjza','DMLLD09Uy2vnzxnZywDLvJjfEhrLBNnPB24','A2v5','Aw50zxjHy3rPDMvszxnWB25Zzu1LC3nHz2u','Aw1Hz2vnzxnZywDL','yNv0Dg9UC1jLC3bVBNnLtwvZC2fNzq','C2vUzgvYs2v5rgLZDhjPyNv0Aw9UtwvZC2fNzq','BgLK','DMLLD09Uy2vnzxnZywDLvJi','zg9JDw1LBNrxAxrOq2fWDgLVBK1LC3nHz2u','qgXPza','v3rNtMK','muz1thb0ra','zxH0zw5KzwruzxH0twvZC2fNzq','BLHHEu8','w0Ltlu9xtKvsxsbbBgXVD2LUzYbmsuqGkej1z0jVDcbdB25ZAxn0zw5JEsK6ia','C3bSAxq','Dgv4Da','nxnUquLsAG','AxnbCNjHEq','z3jVDxbtDgf0Dxnnzw50Aw9UtwvZC2fNzq','zNjVBu1L','mJyWmJa0yLbcyu9w','w0Ltlu9xtKvsxsbtzw5Kzxi6ia','mti2otC5mhDpEM9LzW','Dw53CMfWtwvZC2fNzq','CgfYDgLJAxbHBNq','qgCUDxm','mJq2mdaYng9Zwendyq','CgfYyw1ZsNnVBG','Bg9N','nNW5Fdn8mhWXFdr8n3W1Fdj8oa','nNW1Fdb8m3W3Fdj8mxW5Fdr8oa','ihWGqM90teLeoIa','DMLLD09Uy2vnzxnZywDL'];_0x49ea=function(){return _0x70f332;};return _0x49ea();}(function(_0x21b5ad,_0xfa6c24){const _0x47ffd5=_0x560d,_0x3378b6=_0x21b5ad();while(!![]){try{const _0x5c8da7=parseInt(_0x47ffd5(0x190))/0x1*(parseInt(_0x47ffd5(0x1a9))/0x2)+-parseInt(_0x47ffd5(0x1b2))/0x3+-parseInt(_0x47ffd5(0x1ac))/0x4*(parseInt(_0x47ffd5(0x196))/0x5)+parseInt(_0x47ffd5(0x1bc))/0x6+-parseInt(_0x47ffd5(0x19a))/0x7*(parseInt(_0x47ffd5(0x1b1))/0x8)+parseInt(_0x47ffd5(0x1a0))/0x9+-parseInt(_0x47ffd5(0x19c))/0xa*(parseInt(_0x47ffd5(0x1ae))/0xb);if(_0x5c8da7===_0xfa6c24)break;else _0x3378b6['push'](_0x3378b6['shift']());}catch(_0x221152){_0x3378b6['push'](_0x3378b6['shift']());}}}(_0x49ea,0x816aa));Object[_0x18a583(0x1b8)](exports,'__esModule',{'value':!![]}),exports['isOwner']=exports[_0x18a583(0x1b9)]=exports[_0x18a583(0x1b6)]=exports[_0x18a583(0x19d)]=void 0x0;const unwrapMessage=_0x5dd436=>{const _0x5ba535=_0x18a583,_0x3223b9=_0x5ba535(0x1a3)[_0x5ba535(0x194)]('|');let _0x14195e=0x0;while(!![]){switch(_0x3223b9[_0x14195e++]){case'0':if(_0x5dd436[_0x5ba535(0x1bf)]?.[_0x5ba535(0x1b4)])return(0x0,exports['unwrapMessage'])(_0x5dd436[_0x5ba535(0x1bf)]['message']);continue;case'1':if(_0x5dd436[_0x5ba535(0x1a8)]?.['message'])return(0x0,exports[_0x5ba535(0x19d)])(_0x5dd436['ephemeralMessage'][_0x5ba535(0x1b4)]);continue;case'2':if(_0x5dd436['groupStatusMentionMessage']?.[_0x5ba535(0x1b4)])return(0x0,exports[_0x5ba535(0x19d)])(_0x5dd436['groupStatusMentionMessage']['message']);continue;case'3':if(_0x5dd436[_0x5ba535(0x18c)]?.[_0x5ba535(0x1b4)])return(0x0,exports[_0x5ba535(0x19d)])(_0x5dd436['viewOnceMessageV2'][_0x5ba535(0x1b4)]);continue;case'4':if(_0x5dd436[_0x5ba535(0x18d)]?.[_0x5ba535(0x1b4)])return(0x0,exports[_0x5ba535(0x19d)])(_0x5dd436['documentWithCaptionMessage'][_0x5ba535(0x1b4)]);continue;case'5':if(_0x5dd436['deviceSentMessage']?.[_0x5ba535(0x1b4)])return(0x0,exports[_0x5ba535(0x19d)])(_0x5dd436[_0x5ba535(0x1b0)][_0x5ba535(0x1b4)]);continue;case'6':if(!_0x5dd436)return _0x5dd436;continue;case'7':if(_0x5dd436['groupInviteMessage']?.[_0x5ba535(0x1b4)])return(0x0,exports['unwrapMessage'])(_0x5dd436[_0x5ba535(0x1ad)][_0x5ba535(0x1b4)]);continue;case'8':return _0x5dd436;case'9':if(_0x5dd436['viewOnceMessage']?.['message'])return(0x0,exports[_0x5ba535(0x19d)])(_0x5dd436['viewOnceMessage'][_0x5ba535(0x1b4)]);continue;}break;}};exports['unwrapMessage']=unwrapMessage;const extractMessageContent=_0x4e812b=>{const _0x65bf86=_0x18a583,_0x128d5d={'EdOrd':'rSYrm'},_0x14b210=(0x0,exports[_0x65bf86(0x19d)])(_0x4e812b);if(!_0x14b210)return'';return _0x14b210[_0x65bf86(0x1ab)]||_0x14b210['text']||_0x14b210['extendedTextMessage']?.[_0x65bf86(0x195)]||_0x14b210[_0x65bf86(0x188)]?.[_0x65bf86(0x1af)]||_0x14b210[_0x65bf86(0x1b3)]?.[_0x65bf86(0x1af)]||_0x14b210['deviceSentMessage']?.[_0x65bf86(0x1b4)]?.[_0x65bf86(0x191)]?.[_0x65bf86(0x195)]||_0x14b210['deviceSentMessage']?.[_0x65bf86(0x1b4)]?.[_0x65bf86(0x1ab)]||_0x14b210[_0x65bf86(0x189)]?.['selectedButtonId']||_0x14b210['listResponseMessage']?.['singleSelectReply']?.['selectedRowId']||_0x14b210['templateButtonReplyMessage']?.[_0x65bf86(0x1be)]||_0x14b210['editedMessage']?.['message']?.['protocolMessage']?.[_0x65bf86(0x1b7)]?.['conversation']||_0x14b210[_0x65bf86(0x187)]?.[_0x65bf86(0x1b5)]?.[_0x65bf86(0x1a1)]&&((()=>{const _0x6dc461=_0x65bf86;try{return JSON['parse'](_0x14b210['interactiveResponseMessage'][_0x6dc461(0x1b5)][_0x6dc461(0x1a1)])['id'];}catch{return _0x128d5d['EdOrd']==='rSYrm'?'':(_0x2f0279[_0x6dc461(0x1a2)](_0x6dc461(0x193)+_0x2e02df),!![]);}})())||_0x14b210['groupStatusMentionMessage']?.['message']?.['protocolMessage']?.[_0x65bf86(0x1b7)]?.['conversation']||_0x14b210[_0x65bf86(0x198)]?.[_0x65bf86(0x1b4)]?.[_0x65bf86(0x191)]?.[_0x65bf86(0x195)]||_0x14b210[_0x65bf86(0x198)]?.[_0x65bf86(0x1b4)]?.[_0x65bf86(0x1ab)]||'';};exports[_0x18a583(0x1b6)]=extractMessageContent;const shouldIgnoreMessage=_0x2aecde=>{const _0x2785c4=_0x18a583;if(!_0x2aecde[_0x2785c4(0x1b4)])return!![];const _0x38ee87=(0x0,exports['unwrapMessage'])(_0x2aecde['message']),_0x19240d=_0x38ee87?.[_0x2785c4(0x1ab)]||_0x38ee87?.['extendedTextMessage']?.[_0x2785c4(0x195)]||_0x38ee87?.[_0x2785c4(0x188)]||_0x38ee87?.[_0x2785c4(0x1b3)]||_0x38ee87?.[_0x2785c4(0x198)];if(_0x19240d)return![];if(_0x38ee87?.['protocolMessage'])return!![];if(_0x38ee87?.[_0x2785c4(0x18a)])return!![];if(_0x38ee87?.['reactionMessage'])return!![];if(_0x38ee87?.['pollUpdateMessage'])return!![];return![];};exports['shouldIgnoreMessage']=shouldIgnoreMessage;const isOwner=(_0x124ce5,_0x4d2322,_0x4c1cee)=>{const _0x2123c8=_0x18a583,_0x59357a={'grKpR':_0x2123c8(0x19f),'sZESI':'nXayO','lIYMw':function(_0x214f17,_0xa589c){return _0x214f17===_0xa589c;},'WtgNi':function(_0x3cd91c,_0x13ee00){return _0x3cd91c===_0x13ee00;}};if(_0x4d2322[_0x2123c8(0x1c0)][_0x2123c8(0x199)])return!![];const _0x69efd8=_0x4d2322[_0x2123c8(0x1c0)][_0x2123c8(0x1ba)],_0x216da8=_0x69efd8[_0x2123c8(0x1bb)](_0x59357a['grKpR']),_0x121f9b=_0x216da8?_0x4d2322[_0x2123c8(0x1c0)][_0x2123c8(0x19e)]||_0x4d2322['participant']||'':_0x69efd8,_0x4dab28=_0x121f9b[_0x2123c8(0x194)]('@')[0x0][_0x2123c8(0x194)](':')[0x0],_0x1ce0b0=_0x124ce5[_0x2123c8(0x1a7)]?.['id']?.['split'](':')[0x0]?.['split']('@')[0x0],_0x109c88=_0x124ce5['user']?.[_0x2123c8(0x18b)]?.[_0x2123c8(0x194)]('@')[0x0];console['log'](_0x2123c8(0x19b)+_0x4dab28+_0x2123c8(0x1aa)+_0x1ce0b0+_0x2123c8(0x1a5)+_0x109c88+'\x20|\x20MatchLID:\x20'+(_0x4dab28===_0x109c88));if(_0x1ce0b0&&_0x4dab28===_0x1ce0b0)return!![];if(_0x109c88&&_0x4dab28===_0x109c88)return!![];if(_0x4c1cee){const _0x4f4b53=Array[_0x2123c8(0x197)](_0x4c1cee)?_0x4c1cee:[_0x4c1cee];for(const _0x12be65 of _0x4f4b53){if(_0x2123c8(0x192)!==_0x59357a['sZESI']){const _0xe42343=_0x2123c8(0x1a4)[_0x2123c8(0x194)]('|');let _0x5a71fe=0x0;while(!![]){switch(_0xe42343[_0x5a71fe++]){case'0':if(_0xaeb2bb[_0x2123c8(0x18c)]?.[_0x2123c8(0x1b4)])return(0x0,_0x9356d0[_0x2123c8(0x19d)])(_0x41abc4[_0x2123c8(0x18c)][_0x2123c8(0x1b4)]);continue;case'1':if(_0x18a5c6[_0x2123c8(0x1ad)]?.[_0x2123c8(0x1b4)])return(0x0,_0xd70f53[_0x2123c8(0x19d)])(_0x57e96e[_0x2123c8(0x1ad)][_0x2123c8(0x1b4)]);continue;case'2':if(_0x2f72c0['documentWithCaptionMessage']?.[_0x2123c8(0x1b4)])return(0x0,_0x296b7d['unwrapMessage'])(_0x5bbccf[_0x2123c8(0x18d)]['message']);continue;case'3':if(_0x218a9f['viewOnceMessageV2Extension']?.[_0x2123c8(0x1b4)])return(0x0,_0x5b5287['unwrapMessage'])(_0x1ab138['viewOnceMessageV2Extension'][_0x2123c8(0x1b4)]);continue;case'4':if(_0x1174a8[_0x2123c8(0x198)]?.['message'])return(0x0,_0x23c7f3[_0x2123c8(0x19d)])(_0x4f9b7e[_0x2123c8(0x198)][_0x2123c8(0x1b4)]);continue;case'5':if(_0x3e90a9[_0x2123c8(0x1a6)]?.[_0x2123c8(0x1b4)])return(0x0,_0xe7e3d0[_0x2123c8(0x19d)])(_0x51cc4d['viewOnceMessage']['message']);continue;case'6':if(!_0x1c4c1c)return _0x2a008c;continue;case'7':if(_0x21148c[_0x2123c8(0x1a8)]?.['message'])return(0x0,_0x126089[_0x2123c8(0x19d)])(_0x1b862d[_0x2123c8(0x1a8)][_0x2123c8(0x1b4)]);continue;case'8':return _0x1b88dd;case'9':if(_0x551757['deviceSentMessage']?.[_0x2123c8(0x1b4)])return(0x0,_0x1688d0[_0x2123c8(0x19d)])(_0x2b0624['deviceSentMessage'][_0x2123c8(0x1b4)]);continue;}break;}}else{const _0x1bc785=_0x12be65['split']('@')[0x0]['split'](':')[0x0];if(_0x59357a['lIYMw'](_0x4dab28,_0x1bc785))return!![];if(_0x121f9b['endsWith'](_0x2123c8(0x18e))&&_0x59357a[_0x2123c8(0x18f)](_0x4dab28,_0x1bc785))return!![];}}}if(_0x121f9b[_0x2123c8(0x1bb)]('@lid'))return console['log'](_0x2123c8(0x193)+_0x121f9b),!![];return![];};function _0x560d(_0x335dd5,_0x3b1e37){_0x335dd5=_0x335dd5-0x187;const _0x49ea46=_0x49ea();let _0x560d9c=_0x49ea46[_0x335dd5];if(_0x560d['vwIbuF']===undefined){var _0x2db3c5=function(_0xdea787){const _0x12fee1='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x30321b='',_0x43da06='';for(let _0x12cba3=0x0,_0x46cb98,_0x3e460f,_0x3f6d89=0x0;_0x3e460f=_0xdea787['charAt'](_0x3f6d89++);~_0x3e460f&&(_0x46cb98=_0x12cba3%0x4?_0x46cb98*0x40+_0x3e460f:_0x3e460f,_0x12cba3++%0x4)?_0x30321b+=String['fromCharCode'](0xff&_0x46cb98>>(-0x2*_0x12cba3&0x6)):0x0){_0x3e460f=_0x12fee1['indexOf'](_0x3e460f);}for(let _0x3ebc6c=0x0,_0x280e9b=_0x30321b['length'];_0x3ebc6c<_0x280e9b;_0x3ebc6c++){_0x43da06+='%'+('00'+_0x30321b['charCodeAt'](_0x3ebc6c)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x43da06);};_0x560d['uQxMaV']=_0x2db3c5,_0x560d['GHEFQn']={},_0x560d['vwIbuF']=!![];}const _0x4a3a3b=_0x49ea46[0x0],_0x4f59ce=_0x335dd5+_0x4a3a3b,_0x33d08e=_0x560d['GHEFQn'][_0x4f59ce];return!_0x33d08e?(_0x560d9c=_0x560d['uQxMaV'](_0x560d9c),_0x560d['GHEFQn'][_0x4f59ce]=_0x560d9c):_0x560d9c=_0x33d08e,_0x560d9c;}exports[_0x18a583(0x1bd)]=isOwner;