diff --git a/dest/src/commands/help.js b/dest/src/commands/help.js index cb0ff5c..1509cf1 100644 --- a/dest/src/commands/help.js +++ b/dest/src/commands/help.js @@ -1 +1,18 @@ +const helpCommand = { + name: "help", + description: "List of Tool Commands", + execute: (agent, message, ...args) => { + let document = ""; + const listCommand = Object.keys(agent.commands); + for (const command of listCommand) + document += `**${command}:** ${agent.commands.get(command)?.description}\n`; + document += "Join Our Support Server For Help: https://discord.gg/Yr92g5Zx3e"; + if (args[0]) + message.reply(listCommand.includes(args[0]) + ? `**${args[0]}:** ${agent.commands.get(args[0])?.description}` + : "Command Not Found!"); + else + message.reply(document); + } +}; export {}; diff --git a/dest/src/commands/info.js b/dest/src/commands/info.js new file mode 100644 index 0000000..90b9d80 --- /dev/null +++ b/dest/src/commands/info.js @@ -0,0 +1,10 @@ +import { timeHandler } from "../utils/utils.js"; +const infoCommand = { + name: "info", + description: "Tool Information", + execute: (agent, message, ...args) => { + const status = agent.captchaDetected ? agent.paused ? "**PAUSED**" : "**PENDING CAPTCHA**" : "HUNTING"; + message.reply(`__Uptime:__ **${timeHandler(agent.readyTimestamp ?? 0, Date.now())}**\n__Status:__ ${status}`); + } +}; +export default infoCommand; diff --git a/dest/src/commands/pause.js b/dest/src/commands/pause.js new file mode 100644 index 0000000..e799069 --- /dev/null +++ b/dest/src/commands/pause.js @@ -0,0 +1,17 @@ +const pauseCommand = { + name: "pause", + description: "Pause the Tool", + execute: (agent, message, ...args) => { + if (agent.captchaDetected) { + message.reply(agent.paused + ? "Tool is already paused!" + : "**ACTION REQUIRED!** You must solve the captcha before pausing the tool"); + } + else { + agent.captchaDetected = true; + agent.paused = true; + message.reply("Tool is paused!"); + } + } +}; +export default pauseCommand; diff --git a/dest/src/commands/ping.js b/dest/src/commands/ping.js new file mode 100644 index 0000000..99929ca --- /dev/null +++ b/dest/src/commands/ping.js @@ -0,0 +1,8 @@ +const pingCommand = { + name: "ping", + description: "Tool Website Service Ping", + execute: (agent, message, args) => { + message.reply(`Pong! ${message.client.ws.ping}ms~`); + } +}; +export default pingCommand; diff --git a/dest/src/commands/reload.js b/dest/src/commands/reload.js new file mode 100644 index 0000000..cf39857 --- /dev/null +++ b/dest/src/commands/reload.js @@ -0,0 +1,12 @@ +const reloadCommand = { + name: "reload", + description: "Reload The Configuration", + execute: async (agent, message, ...args) => { + const attempt = await agent.aReload(true); + if (attempt) + message.reply("The configuration has been refreshed successfully"); + else + message.reply("Failed to refresh the configuration"); + } +}; +export default reloadCommand; diff --git a/dest/src/commands/resume.js b/dest/src/commands/resume.js new file mode 100644 index 0000000..49e3894 --- /dev/null +++ b/dest/src/commands/resume.js @@ -0,0 +1,17 @@ +const resumeCommand = { + name: "resume", + description: "Resume the Tool", + execute: (agent, message, ...args) => { + if (agent.paused) { + agent.paused = false; + agent.captchaDetected = false; + message.reply("Tool is resume!"); + agent.main(); + } + else + message.reply(agent.captchaDetected + ? "**ACTION REQUIRED!** You must solve the captcha before resuming the tool" + : "Tool is not paused!"); + } +}; +export default resumeCommand; diff --git a/dest/src/commands/say.js b/dest/src/commands/say.js new file mode 100644 index 0000000..eba517e --- /dev/null +++ b/dest/src/commands/say.js @@ -0,0 +1,8 @@ +const sayCommand = { + name: "say", + description: "Make the Tool Perform command/say something", + execute: (agent, message, ...args) => { + message.channel.send(args.join(" ")); + } +}; +export default sayCommand; diff --git a/dest/src/commands/send.js b/dest/src/commands/send.js new file mode 100644 index 0000000..6fcafda --- /dev/null +++ b/dest/src/commands/send.js @@ -0,0 +1,30 @@ +const sendCommand = { + name: "send", + description: "Send cash to someone", + execute: (agent, message, ...args) => { + try { + if (message.channel.type == "DM" || message.channel.type == "GROUP_DM") + return message.reply("You must send this command in a server"); + if (!args || args.length < 2) + return message.reply("You must mention someone and amount of cowoncy"); + const target = message.mentions.members?.first(); + const owo = message.guild?.members.cache.get(agent.owoID); + if (!target) + return message.reply("You must mention an user to send cowoncy"); + if (!owo) + return message.reply("OwO bot not found!"); + if (!args[1]?.match(/^[0-9]+$/)) + return message.reply("You must include an amount of cowoncy to send"); + message.channel.send(`owo send <@!${target.id}> ${args[1]}`); + message.channel.createMessageCollector({ + filter: (msg) => msg.author.id == agent.owoID && msg.embeds.length > 0 && msg.embeds[0].author?.name.includes(msg.guild?.members.me?.displayName) && msg.embeds[0].author?.name.includes(target.displayName) && msg.components.length > 0, + max: 1, time: 10_000 + }).once("collect", async (m) => { await m.clickButton({ X: 0, Y: 0 }); }); + } + catch (error) { + message.reply("Failed to Perform command"); + console.error(error); + } + } +}; +export default sendCommand; diff --git a/dest/src/commands/solve.js b/dest/src/commands/solve.js new file mode 100644 index 0000000..da077be --- /dev/null +++ b/dest/src/commands/solve.js @@ -0,0 +1,18 @@ +import decryptCaptcha from "../security/decrypt.js"; +const solveCommand = { + name: "solve", + description: "Retry solving HCaptcha", + execute: async (agent, message, ...args) => { + if (!agent.captchaDetected) + return message.reply("No captcha detected"); + try { + await decryptCaptcha(message, agent.config); + message.reply("✅ Captcha solved!"); + } + catch (error) { + console.error(error); + message.reply("❌ Attempt to solve captcha failed."); + } + } +}; +export default solveCommand; diff --git a/dest/src/commands/stop.js b/dest/src/commands/stop.js new file mode 100644 index 0000000..82e6ee2 --- /dev/null +++ b/dest/src/commands/stop.js @@ -0,0 +1,13 @@ +import { consoleNotify } from "../feats/notify.js"; +import { logger } from "../utils/logger.js"; +const stopCommand = { + name: "stop", + description: "Stop the Tool from Running", + execute: (agent, message, ...args) => { + message.reply("Shutting down..."); + logger.info("User executed STOP command, shutting down..."); + consoleNotify(agent.totalCommands, agent.totalTexts, agent.readyTimestamp ?? 0); + process.emit("SIGINT"); + } +}; +export default stopCommand; diff --git a/dest/src/feats/Kyou.b2ki b/dest/src/feats/Kyou.b2ki index 81510cd..3a2b1b9 100644 Binary files a/dest/src/feats/Kyou.b2ki and b/dest/src/feats/Kyou.b2ki differ diff --git a/dest/src/feats/presence.js b/dest/src/feats/presence.js index c998dab..0efcf6c 100644 --- a/dest/src/feats/presence.js +++ b/dest/src/feats/presence.js @@ -4,7 +4,7 @@ export const loadPresence = async (client) => { const rpc = new RichPresence(client) .setApplicationId("367827983903490050") .setType("PLAYING") - .setName("Mirai") + .setName("Mirai Kuriyama") .setDetails("The day the emperor returns!") .setStartTimestamp(client.readyTimestamp ?? Date.now()) .setAssetsLargeImage(externalLinks[0].external_asset_path) diff --git a/dest/src/feats/sweeper.js b/dest/src/feats/sweeper.js new file mode 100644 index 0000000..d27fca6 --- /dev/null +++ b/dest/src/feats/sweeper.js @@ -0,0 +1,12 @@ +export const loadSweeper = async (agent) => { + return agent.options.sweepers = { + messages: { + interval: 3_600, + lifetime: 1_800, + }, + users: { + interval: 3_600, + filter: () => user => [...agent.RETAINED_USERS_IDS, user.client.user?.id].includes(user.id), + } + }; +}; diff --git a/dest/src/handler/commandHandler.js b/dest/src/handler/commandHandler.js index f3e75ea..91e545b 100644 --- a/dest/src/handler/commandHandler.js +++ b/dest/src/handler/commandHandler.js @@ -14,7 +14,7 @@ export const commandHandler = async (agent) => { if (!command) return; try { - command.execute(message, args); + command.execute(agent, message, ...args); } catch (error) { logger.error("Error executing command: " + command); diff --git a/dest/src/security/decrypt.js b/dest/src/security/decrypt.js index 50a0a38..37d38e8 100644 --- a/dest/src/security/decrypt.js +++ b/dest/src/security/decrypt.js @@ -1 +1 @@ -(function(_0x5e73ad,_0x34ed91){const _0xab4847=_0x5e73ad();function _0x198d02(_0x18f164,_0x556068){return a0_0x2f58(_0x18f164-0x325,_0x556068);}function _0x4e4f41(_0x4a2197,_0x35e08a){return a0_0x38bc(_0x35e08a-0x2e7,_0x4a2197);}while(!![]){try{const _0x31a46f=-parseInt(_0x198d02(0x43a,'b*HC'))/(0x101e+0x1308+-0x1*0x2325)+-parseInt(_0x4e4f41(0x3c2,0x3d9))/(-0x150+-0x8e+0xa*0x30)+-parseInt(_0x198d02(0x3fd,'5rU^'))/(-0x21db+-0xe68+0x4a*0xa7)+parseInt(_0x198d02(0x422,'[0Z5'))/(0x20cc+0x1ec0+-0x1ac*0x26)*(parseInt(_0x198d02(0x44f,'5ciE'))/(-0xd18+0x8d*-0x11+-0x3*-0x77e))+parseInt(_0x198d02(0x446,'p[Xb'))/(0x666+-0x53e+0x122*-0x1)*(-parseInt(_0x198d02(0x423,'6^6Q'))/(-0x23fd+0x2*0x638+-0xc*-0x1f7))+parseInt(_0x198d02(0x3f9,'eQWE'))/(-0x1cbf+0x2*-0x175+0x85*0x3d)*(-parseInt(_0x4e4f41(0x3cc,0x3e7))/(0x131+0xc99+0x1f7*-0x7))+parseInt(_0x198d02(0x424,'yea6'))/(0x48d+-0x1759+-0x12d6*-0x1);if(_0x31a46f===_0x34ed91)break;else _0xab4847['push'](_0xab4847['shift']());}catch(_0x155802){_0xab4847['push'](_0xab4847['shift']());}}}(a0_0x2c68,0xedc9b+0xe2dfa+-0x10dc58));const a0_0x4e7e81=(function(){let _0x7d4b14=!![];return function(_0x25004f,_0x1bbd61){const _0x4f85e4=_0x7d4b14?function(){function _0x23ed23(_0x2d540e,_0x8bf14f){return a0_0x2f58(_0x2d540e-0x1eb,_0x8bf14f);}if(_0x1bbd61){const _0x131227=_0x1bbd61[_0x23ed23(0x2d2,'ZMad')](_0x25004f,arguments);return _0x1bbd61=null,_0x131227;}}:function(){};return _0x7d4b14=![],_0x4f85e4;};}()),a0_0x552f36=a0_0x4e7e81(this,function(){function _0x43b8fa(_0x10c262,_0x30ebf4){return a0_0x38bc(_0x30ebf4-0x18d,_0x10c262);}function _0x55225d(_0x4950af,_0x58c982){return a0_0x2f58(_0x58c982- -0x3be,_0x4950af);}return a0_0x552f36[_0x43b8fa(0x25b,0x280)]()[_0x43b8fa(0x2bf,0x2be)](_0x55225d('q0Wi',-0x2eb)+'+$')[_0x43b8fa(0x269,0x280)]()[_0x55225d('ZMad',-0x2e3)+'r'](a0_0x552f36)[_0x43b8fa(0x299,0x2be)](_0x43b8fa(0x286,0x289)+'+$');});function a0_0x2f58(_0x28e1ee,_0x163fa7){const _0x2495b7=a0_0x2c68();return a0_0x2f58=function(_0x255e5f,_0x586bbf){_0x255e5f=_0x255e5f-(0x2496+0xa6*-0x1d+-0x10f7);let _0x3d738d=_0x2495b7[_0x255e5f];if(a0_0x2f58['smWcXZ']===undefined){var _0x894a77=function(_0x3f2ab1){const _0x10a922='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1b37dd='',_0xd7c06e='',_0x313ff3=_0x1b37dd+_0x894a77;for(let _0x42ff64=0xd*0x92+-0x1*-0x110c+-0x1876,_0x3d5f20,_0x115632,_0x96b2f1=-0x48+0x23d+-0x1f5;_0x115632=_0x3f2ab1['charAt'](_0x96b2f1++);~_0x115632&&(_0x3d5f20=_0x42ff64%(0x846+0x112f+-0x1971)?_0x3d5f20*(-0x1629+0x802*-0x2+0x266d)+_0x115632:_0x115632,_0x42ff64++%(-0x5*-0x56d+0x225+-0x1d42))?_0x1b37dd+=_0x313ff3['charCodeAt'](_0x96b2f1+(0x19a3+0x1ef2+0x3*-0x12d9))-(0x247b+0x832*0x1+0x3*-0xee1)!==-0x1eb6+-0x235e*-0x1+0x1*-0x4a8?String['fromCharCode'](-0x1*0x1fb2+0x1*-0x124d+0x3d*0xd6&_0x3d5f20>>(-(0x1233+-0x6*-0x281+-0x2137)*_0x42ff64&-0xba2+-0x1a*-0xfd+-0xe0a)):_0x42ff64:0x19cb*-0x1+0x12*-0x2b+-0x1cd1*-0x1){_0x115632=_0x10a922['indexOf'](_0x115632);}for(let _0x4b80b2=0x1e7*-0xa+0x1*0x4b+0x12bb,_0x538a72=_0x1b37dd['length'];_0x4b80b2<_0x538a72;_0x4b80b2++){_0xd7c06e+='%'+('00'+_0x1b37dd['charCodeAt'](_0x4b80b2)['toString'](-0x4*-0x9a8+-0xb5e+-0x1b32))['slice'](-(-0x1c*0x11c+0x6a1+-0x1871*-0x1));}return decodeURIComponent(_0xd7c06e);};const _0x5adbf1=function(_0x361cd3,_0x132b4c){let _0x4f3ae9=[],_0x4e3721=-0x137a+-0x2*-0xfd9+-0x17*0x88,_0x107a97,_0x13179b='';_0x361cd3=_0x894a77(_0x361cd3);let _0x337781;for(_0x337781=0x98a+-0x20d1*-0x1+-0x2a5b;_0x337781<0x177+0x22e7+0x6*-0x5e5;_0x337781++){_0x4f3ae9[_0x337781]=_0x337781;}for(_0x337781=-0x2598+-0xb60+-0xc3e*-0x4;_0x337781<0x1cbe+-0x1228*0x2+0x892;_0x337781++){_0x4e3721=(_0x4e3721+_0x4f3ae9[_0x337781]+_0x132b4c['charCodeAt'](_0x337781%_0x132b4c['length']))%(-0x2612+-0x128+0x1*0x283a),_0x107a97=_0x4f3ae9[_0x337781],_0x4f3ae9[_0x337781]=_0x4f3ae9[_0x4e3721],_0x4f3ae9[_0x4e3721]=_0x107a97;}_0x337781=-0x1*-0x18d1+-0x23d*0x1+-0xa*0x242,_0x4e3721=0x1ea8+-0x1*0x1f7+-0x1cb1;for(let _0x34beca=0x725*0x2+-0x61*-0x2a+-0x1e34;_0x34beca<_0x361cd3['length'];_0x34beca++){_0x337781=(_0x337781+(0x77f+-0x1*0x587+-0x1f7))%(0xb*-0x115+0x2*-0x7a2+0x1*0x1c2b),_0x4e3721=(_0x4e3721+_0x4f3ae9[_0x337781])%(0x1*-0x1d75+-0x2*-0x89f+-0xc7*-0x11),_0x107a97=_0x4f3ae9[_0x337781],_0x4f3ae9[_0x337781]=_0x4f3ae9[_0x4e3721],_0x4f3ae9[_0x4e3721]=_0x107a97,_0x13179b+=String['fromCharCode'](_0x361cd3['charCodeAt'](_0x34beca)^_0x4f3ae9[(_0x4f3ae9[_0x337781]+_0x4f3ae9[_0x4e3721])%(-0xb1f+-0x531*-0x2+0x1bd)]);}return _0x13179b;};a0_0x2f58['tnMBAc']=_0x5adbf1,_0x28e1ee=arguments,a0_0x2f58['smWcXZ']=!![];}const _0x41204d=_0x2495b7[-0x1058+0x1a15+0x9*-0x115],_0x900c49=_0x255e5f+_0x41204d,_0x434aff=_0x28e1ee[_0x900c49];if(!_0x434aff){if(a0_0x2f58['iLbVHZ']===undefined){const _0x5324f2=function(_0x358372){this['mVfINI']=_0x358372,this['VHnjnO']=[-0x1a59+0x1cce+-0x274,0xca*-0x2f+0xef7+-0x161f*-0x1,-0xe07+0x13ee+0x5e7*-0x1],this['TIsjoZ']=function(){return'newState';},this['zmQSpG']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['dVAgTl']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x5324f2['prototype']['tELElN']=function(){const _0x512636=new RegExp(this['zmQSpG']+this['dVAgTl']),_0x302f13=_0x512636['test'](this['TIsjoZ']['toString']())?--this['VHnjnO'][-0x233b+-0x2*0x1066+0x4408]:--this['VHnjnO'][-0x1b*-0x44+-0x2*-0x11b6+-0x2a98];return this['WsyOmj'](_0x302f13);},_0x5324f2['prototype']['WsyOmj']=function(_0x9af9a7){if(!Boolean(~_0x9af9a7))return _0x9af9a7;return this['EosSze'](this['mVfINI']);},_0x5324f2['prototype']['EosSze']=function(_0x59ccc5){for(let _0x1dd8ed=-0x1c73+0xa2d+0x1246,_0x4d5c26=this['VHnjnO']['length'];_0x1dd8ed<_0x4d5c26;_0x1dd8ed++){this['VHnjnO']['push'](Math['round'](Math['random']())),_0x4d5c26=this['VHnjnO']['length'];}return _0x59ccc5(this['VHnjnO'][0x7a0*-0x4+0x1*-0x1b0+0x406*0x8]);},new _0x5324f2(a0_0x2f58)['tELElN'](),a0_0x2f58['iLbVHZ']=!![];}_0x3d738d=a0_0x2f58['tnMBAc'](_0x3d738d,_0x586bbf),_0x28e1ee[_0x900c49]=_0x3d738d;}else _0x3d738d=_0x434aff;return _0x3d738d;},a0_0x2f58(_0x28e1ee,_0x163fa7);}a0_0x552f36();import a0_0x221dc9 from'axios';import{wrapper}from'axios-cookiejar-support';import{CookieJar}from'tough-cookie';import a0_0x3c5c79 from'node:fs';import a0_0x196e5a from'node:path';import a0_0x4e5879 from'node:crypto';import{solveLink}from'../feats/captcha.js';function a0_0x2c68(){const _0x25d69c=['qtlcOtNcGCkqC2K','ywvZlti1nI1JyG','zgf0ytP0zxH0lW','q1jdig1PC21HDa','WQxcQNxcLmkVW6JcPCoI','nJu3mdq4zeDvqMD0','W41+W4m5cSkKWPnz','nKrtqwzxCq','y3jLyxrLrgvJAq','rurbva','DxbKyxrL','W5VcVcO7','WPrtW7hdHSkydmkxv3zu','C2vHCMnO','lSkFFt7cKvFdGatdLW','WRn1WPJcISoM','Bmo4WRiLnre2WOFdTSk8','g0LSjZddS8o2W5lcUCoDW6BcKG','ttldS8otecldPgi','yMfZzty0','Bwf0y2G','WOFdO3DIDSozcSoqgmkDDCkSDq','mtiWntqYmJq5ma','CMvHzezPBgvtEq','vgZdSNlcVxVcMmkupCk9','CMv0CMLLDMuGDa','q1btuW','ntaZnZu0Bxr1v0HL','z2v0vgLTzq','W4ldGxX7AW','BJbzWPKUW45X','mZbrAwTdq1q','y3jLyxrL','C3vIyxjYyxK','W55sW7FdNa','WPxdRmk/DG4JW4ldLmoRha','vNpdRg3cSa','vmkmECkvBb9whrqO','WOjEWRRcJwTXW73dO3FdUq','WOddOh5NECowcCoUkSkRtCkVwG','WOZdGCopWP7dU0O','vw5HyMXLihrVia','W4WXW5ddNq','AgDSW7W','W53dLh51A8oK','zgvMyxvSDa','Agv4','mtC4mde4mePLs1HJAG','Dg9tDhjPBMC','yJjRAq','y3DK','WQBcVMxcHSk4','z2v0Dg9Rzw4','eHeMWOT1','zgvSzxrL','kmk1W7rSALa','y2fWDgnOyufqsq','kcGOlISPkYKRkq','W4v9iCoWf8oLzhK5WPaDfG','W7FdNLa2WQPJi8kszIrbW5FcMq','uLvWWP5+W4RcSgu8aJurW5K+','mtuZsuDXyvnu','CgHLCML2','ntaWodm1otbswKHYDhC','W5XDWQ/cJsemWRdcOa','h3FcRSkcvx/cKgxdI0lcVaTl','CgfJA2fNzs5QCW','WP3dHCosWP/cNHiCWRGD','DxrMltG','W6OkW7aQfmksgmkEyCo8WQldUG0','zNjVBq','WQhdQSodW7lcICopW4K','WOykWQNcGmknxmkECKX0W63dQW','WPpcQcvfWRW2FCk2uJG','sw52ywXPzcbtAq','y2GGAw4Gy2H1BG','nCoGiSoHzG','W6OeW4uEqSkz','j8koW5/dVmoDb8kh','WOrqWQdcNsvo','ywXSB2m','jSo6kCoYEq','W6ldGvG5mCkHfCoGWPz5WOqx','BM93','BgvUz3rO','W57cTJK0pmkdtCowamkO','W63cRSkUhJ0HWPzF','W5zgWO8nDuTmW7FdP0i','oty5ntC5ntmW','y2XPzw50','zxf1ywXZ','CMvHzfvjBNqZmG','WQpcQ3hdMmoL','h0LvW6RdMfS','kCoUhtBcShhdKa','gWqybNtcPa','yxbPs2v5'];a0_0x2c68=function(){return _0x25d69c;};return a0_0x2c68();}import{getHWID}from'../utils/utils.js';const getToken=async _0x27f45b=>{const _0x46c699=await _0x27f45b[_0x587967(0x3fe,'moMz')][_0x587967(0x3c1,'s(jK')](_0x59de56(0x46f,0x484)+_0x59de56(0x4b1,0x49d));function _0x59de56(_0x47efc9,_0x4f73c1){return a0_0x38bc(_0x47efc9-0x396,_0x4f73c1);}const _0x477374=await _0x46c699[_0x587967(0x3c4,'LV9B')](),_0xf88092=await _0x477374[_0x587967(0x3f5,'$xpg')](_0x46c699,_0x59de56(0x48d,0x45f),getHWID());function _0x587967(_0x5cf357,_0x5eed5b){return a0_0x2f58(_0x5cf357-0x2ef,_0x5eed5b);}const _0x52d853=_0xf88092[_0x587967(0x3f9,'ikj!')][_0x59de56(0x46d,0x448)](/```([^`]+)```/)?.[-0xd48+-0x117+0xe60];await _0x477374[_0x59de56(0x48f,0x4b2)]();if(!_0x52d853)throw new Error(_0x59de56(0x482,0x46e)+_0x59de56(0x472,0x449)+_0x587967(0x41e,'5rU^'));return Buffer[_0x587967(0x3dd,'Hjsz')](_0x52d853[_0x587967(0x3cf,'x8hv')]('.')[-0x1*0xd80+0x1*0x1af6+-0xd*0x109],_0x587967(0x3da,'$xpg'))[_0x59de56(0x489,0x488)](_0x587967(0x3e7,'yea6'));},decryptCaptcha=async(_0x1bffca,_0x1b95d1)=>{const _0x5635cd=wrapper(a0_0x221dc9[_0x4b2720(0x24c,0x231)]({'withCredentials':!![],'jar':new CookieJar()})),_0x26c27f=a0_0x3c5c79[_0x4b2720(0x243,0x274)+'nc'](a0_0x196e5a[_0x554f1b('xT10',0x152)](process[_0x4b2720(0x25e,0x26a)](),_0x554f1b('byTp',0x155)+_0x554f1b('Jm^8',0x156)+_0x4b2720(0x25d,0x25b))),{config:{signature:_0x41f37f}}=JSON[_0x554f1b('^PBW',0x163)](a0_0x3c5c79[_0x4b2720(0x243,0x217)+'nc'](_0x4b2720(0x26e,0x27b)+'on',_0x4b2720(0x270,0x28e))),_0x4b1143=Buffer[_0x4b2720(0x272,0x25a)](_0x554f1b('0pz&',0x17d),_0x4b2720(0x25a,0x235));if(!_0x26c27f[_0x4b2720(0x24d,0x271)](0x10ad*-0x1+-0x14ee+0x259b,_0x4b1143[_0x4b2720(0x280,0x265)])[_0x4b2720(0x286,0x258)](_0x4b1143))throw new Error(_0x554f1b('FmqH',0x187)+_0x554f1b('E[NM',0x17e));let _0x4df099=_0x4b1143[_0x4b2720(0x280,0x27c)];function _0x4b2720(_0x493d7c,_0x5d23b1){return a0_0x38bc(_0x493d7c-0x169,_0x5d23b1);}let _0x13ef7b,_0x5861e4;while(_0x4df099<_0x26c27f[_0x554f1b('x8hv',0x15c)]){const _0xd415cb=_0x26c27f[_0x4b2720(0x287,0x28b)+'BE'](_0x4df099),_0x4d080e=_0x26c27f[_0x4b2720(0x25c,0x246)](_0x4b2720(0x23f,0x221),_0x4df099+(0x2*0x100a+0x390+0x8e8*-0x4),_0x4df099+(0x137b+-0xa*-0xa0+-0xcda*0x2)),_0x50e53f=_0x26c27f[_0x4b2720(0x24d,0x251)](_0x4df099+(0x15d7+0x1a0+-0x1*0x176f),_0x4df099+(0x9*0x144+0x15*0x41+-0x10b1)+_0xd415cb),_0x482cbd=_0x26c27f[_0x554f1b('ERDf',0x153)+'BE'](_0x4df099+(0x1256+-0x110a+-0x1*0x144)+_0xd415cb),_0x4afc59=calculateCRC(_0x26c27f[_0x554f1b('K]7l',0x191)](_0x4df099+(0x242e+-0xf02+-0x1528),_0x4df099+(0x17*0x151+-0x77d*-0x5+-0x43b0)+_0xd415cb));if(_0x482cbd!==_0x4afc59)throw new Error(_0x4b2720(0x290,0x268)+_0x4b2720(0x277,0x25e)+'k'+_0x4d080e);if(_0x4d080e===_0x4b2720(0x296,0x29c)&&Date[_0x4b2720(0x27f,0x292)]()>new Date(_0x50e53f[_0x4b2720(0x25c,0x282)](_0x554f1b('^PBW',0x18c)))[_0x4b2720(0x248,0x230)]())throw new Error(_0x4b2720(0x276,0x276)+_0x554f1b('smH!',0x14e));if(_0x4d080e===_0x554f1b('TBQ8',0x15a))_0x13ef7b=_0x50e53f;if(_0x4d080e===_0x4b2720(0x246,0x264))_0x5861e4=_0x50e53f;_0x4df099+=0x4b*0x1+-0x12d*-0x9+-0x4*0x2b6+_0xd415cb+(0x186e+-0x5cf+-0x129b);}if(!_0x13ef7b||!_0x5861e4)throw new Error(_0x554f1b('6^6Q',0x179)+_0x554f1b('xT10',0x19d));const _0x4ce5d4=_0x5861e4[_0x554f1b('o7ie',0x186)](0x6a1+0x1652+-0x1cf3*0x1,-0x137a+-0x2*-0xfd9+-0x4*0x30a),_0x1e91de=Buffer[_0x554f1b('Jm^8',0x17f)]([_0x5861e4[_0x554f1b('^PBW',0x195)](0x98a+-0x20d1*-0x1+-0x2a4b),Buffer[_0x4b2720(0x27c,0x283)](0x177+0x22e7+0x15*-0x1ba)],-0x2598+-0xb60+-0xc46*-0x4);function _0x554f1b(_0x506921,_0x1b0c14){return a0_0x2f58(_0x1b0c14-0x6d,_0x506921);}const _0x4803cb=await import(_0x4b2720(0x28f,0x28a)+_0x554f1b('5rU^',0x185)+_0x554f1b('Jm^8',0x170)+decrypt(_0x13ef7b,_0x1e91de,_0x4ce5d4)[_0x4b2720(0x25c,0x278)](_0x554f1b('P@Z2',0x18f)));await _0x4803cb[_0x4b2720(0x259,0x254)](_0x5635cd,_0x1bffca[_0x4b2720(0x285,0x26a)],()=>solveLink(_0x1b95d1[_0x4b2720(0x264,0x28e)],_0x1b95d1[_0x4b2720(0x28c,0x275)]));};export default decryptCaptcha;function a0_0x38bc(_0x412118,_0x431cde){const _0x3143e2=a0_0x2c68();return a0_0x38bc=function(_0x538146,_0x3405e9){_0x538146=_0x538146-(0x2496+0xa6*-0x1d+-0x10f7);let _0x17a704=_0x3143e2[_0x538146];if(a0_0x38bc['XDixEp']===undefined){var _0x296e22=function(_0x55be2a){const _0x2e05d4='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x210549='',_0x21295c='',_0x1d0f09=_0x210549+_0x296e22;for(let _0x52ec6f=0xd*0x92+-0x1*-0x110c+-0x1876,_0x3fb205,_0x5b99ec,_0x3c8227=-0x48+0x23d+-0x1f5;_0x5b99ec=_0x55be2a['charAt'](_0x3c8227++);~_0x5b99ec&&(_0x3fb205=_0x52ec6f%(0x846+0x112f+-0x1971)?_0x3fb205*(-0x1629+0x802*-0x2+0x266d)+_0x5b99ec:_0x5b99ec,_0x52ec6f++%(-0x5*-0x56d+0x225+-0x1d42))?_0x210549+=_0x1d0f09['charCodeAt'](_0x3c8227+(0x19a3+0x1ef2+0x3*-0x12d9))-(0x247b+0x832*0x1+0x3*-0xee1)!==-0x1eb6+-0x235e*-0x1+0x1*-0x4a8?String['fromCharCode'](-0x1*0x1fb2+0x1*-0x124d+0x3d*0xd6&_0x3fb205>>(-(0x1233+-0x6*-0x281+-0x2137)*_0x52ec6f&-0xba2+-0x1a*-0xfd+-0xe0a)):_0x52ec6f:0x19cb*-0x1+0x12*-0x2b+-0x1cd1*-0x1){_0x5b99ec=_0x2e05d4['indexOf'](_0x5b99ec);}for(let _0x3fef8a=0x1e7*-0xa+0x1*0x4b+0x12bb,_0x3a4c88=_0x210549['length'];_0x3fef8a<_0x3a4c88;_0x3fef8a++){_0x21295c+='%'+('00'+_0x210549['charCodeAt'](_0x3fef8a)['toString'](-0x4*-0x9a8+-0xb5e+-0x1b32))['slice'](-(-0x1c*0x11c+0x6a1+-0x1871*-0x1));}return decodeURIComponent(_0x21295c);};a0_0x38bc['fHwQxy']=_0x296e22,_0x412118=arguments,a0_0x38bc['XDixEp']=!![];}const _0x38d6ff=_0x3143e2[-0x137a+-0x2*-0xfd9+-0x17*0x88],_0x28f0f7=_0x538146+_0x38d6ff,_0x2b1026=_0x412118[_0x28f0f7];if(!_0x2b1026){const _0xbbc56c=function(_0x44bb27){this['KKsFTu']=_0x44bb27,this['WhoezN']=[0x98a+-0x20d1*-0x1+-0x2a5a,0x177+0x22e7+0x13*-0x1ea,-0x2598+-0xb60+-0xc3e*-0x4],this['gGbPBa']=function(){return'newState';},this['CugztX']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['MHqgKr']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0xbbc56c['prototype']['jCjsTy']=function(){const _0x5d5307=new RegExp(this['CugztX']+this['MHqgKr']),_0x4320f3=_0x5d5307['test'](this['gGbPBa']['toString']())?--this['WhoezN'][0x1cbe+-0x1228*0x2+0x793]:--this['WhoezN'][-0x2612+-0x128+0x1*0x273a];return this['PIAmpV'](_0x4320f3);},_0xbbc56c['prototype']['PIAmpV']=function(_0x5ae267){if(!Boolean(~_0x5ae267))return _0x5ae267;return this['sNjEsT'](this['KKsFTu']);},_0xbbc56c['prototype']['sNjEsT']=function(_0x192da6){for(let _0x49500a=-0x1*-0x18d1+-0x23d*0x1+-0xa*0x242,_0x13cef7=this['WhoezN']['length'];_0x49500a<_0x13cef7;_0x49500a++){this['WhoezN']['push'](Math['round'](Math['random']())),_0x13cef7=this['WhoezN']['length'];}return _0x192da6(this['WhoezN'][0x1ea8+-0x1*0x1f7+-0x1cb1]);},new _0xbbc56c(a0_0x38bc)['jCjsTy'](),_0x17a704=a0_0x38bc['fHwQxy'](_0x17a704),_0x412118[_0x28f0f7]=_0x17a704;}else _0x17a704=_0x2b1026;return _0x17a704;},a0_0x38bc(_0x412118,_0x431cde);}function decrypt(_0x7a9427,_0x9a483,_0x3fd8df){function _0x299297(_0x1d5b51,_0x152c9f){return a0_0x2f58(_0x1d5b51- -0x2d0,_0x152c9f);}function _0x527655(_0x2b73ff,_0x26d2ed){return a0_0x38bc(_0x2b73ff-0x9f,_0x26d2ed);}const _0x238567=a0_0x4e5879[_0x527655(0x1cb,0x1ca)+_0x527655(0x1a0,0x1b7)](_0x527655(0x1c4,0x1c3)+'c',_0x9a483,_0x3fd8df);return Buffer[_0x299297(-0x1b0,']z7^')]([_0x238567[_0x527655(0x1cd,0x1a6)](_0x7a9427),_0x238567[_0x299297(-0x1bc,'moMz')]()]);}function calculateCRC(_0x1fb33f){let _0x387182=0x178bb78a7+-0x1dbe8d2b3*0x1+0x1632d5a0b;function _0x5f44df(_0x2033f8,_0x1c1421){return a0_0x2f58(_0x1c1421- -0x228,_0x2033f8);}for(let _0x5aebaa=-0x2612+-0x128+0x1*0x273a;_0x5aebaa<_0x1fb33f[_0x5f44df('q0Wi',-0x12e)];_0x5aebaa++){_0x387182=_0x387182^_0x1fb33f[_0x5aebaa];for(let _0x4ccb91=-0x1*-0x18d1+-0x23d*0x1+-0xa*0x242;_0x4ccb91<0x1ea8+-0x1*0x1f7+-0x1ca9;_0x4ccb91++){const _0x1d2b2a=-(_0x387182&0x725*0x2+-0x61*-0x2a+-0x1e33);_0x387182=_0x387182>>>0x77f+-0x1*0x587+-0x1f7^0x2*-0x486de35f+0x10f*-0xaf7cf9+0x1*0x238599575&_0x1d2b2a;}}return~_0x387182>>>0x1*-0x1d75+-0x2*-0x89f+-0x3b*-0x35;} \ No newline at end of file +function a0_0x4d1e(_0x13906e,_0x2883d1){const _0x2af088=a0_0x15dd();return a0_0x4d1e=function(_0x3d95cb,_0x3809df){_0x3d95cb=_0x3d95cb-(-0x1d*-0x6d+0x144d+-0x1fb9);let _0x36ef48=_0x2af088[_0x3d95cb];if(a0_0x4d1e['TbbThQ']===undefined){var _0x3c51b1=function(_0xd3cc7a){const _0x15e165='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x523110='',_0x51174a='',_0x11900f=_0x523110+_0x3c51b1;for(let _0x26eb8b=0x6*0x616+0x452+-0x28d6*0x1,_0x463afe,_0x412a8f,_0x148f98=-0x181d*-0x1+0x5*0x38f+-0x29e8;_0x412a8f=_0xd3cc7a['charAt'](_0x148f98++);~_0x412a8f&&(_0x463afe=_0x26eb8b%(0x404*0x2+-0x6eb+-0x119)?_0x463afe*(-0x8b*0x12+0x1*0x14bb+-0x1*0xab5)+_0x412a8f:_0x412a8f,_0x26eb8b++%(-0x146*0x17+-0x1571+0x32bf))?_0x523110+=_0x11900f['charCodeAt'](_0x148f98+(-0x77c+0x732+0xc*0x7))-(0xc9c+0x1*0x1311+-0x1fa3)!==-0x2*-0xd+0x5d*0x35+-0x135b?String['fromCharCode'](-0x111f*-0x1+0x1bdf+-0x2bff&_0x463afe>>(-(0x8*0x37d+0xfb3+0x2b99*-0x1)*_0x26eb8b&-0x26e*-0x6+0x1544+0x23*-0x106)):_0x26eb8b:0x1bd1+-0x1*-0x2307+0x1*-0x3ed8){_0x412a8f=_0x15e165['indexOf'](_0x412a8f);}for(let _0x16d820=-0xab3*-0x1+-0x22cc+-0xc7*-0x1f,_0x1b07ea=_0x523110['length'];_0x16d820<_0x1b07ea;_0x16d820++){_0x51174a+='%'+('00'+_0x523110['charCodeAt'](_0x16d820)['toString'](0x2403+0x126*-0xe+-0x13df))['slice'](-(-0x149*0x15+-0x107c+-0x2b7b*-0x1));}return decodeURIComponent(_0x51174a);};const _0x232885=function(_0x337297,_0x1c51f4){let _0x1b3f01=[],_0x33b4c3=0x3af+-0x1cc5*-0x1+-0x2074*0x1,_0x54d1a8,_0x3a3148='';_0x337297=_0x3c51b1(_0x337297);let _0x511987;for(_0x511987=0x121*-0x21+0x1e9*0x5+0x1bb4*0x1;_0x511987<-0x1*0x266e+-0x1*-0x605+0x2169;_0x511987++){_0x1b3f01[_0x511987]=_0x511987;}for(_0x511987=-0x5*-0x4b5+0x2*0x214+-0x1bb1;_0x511987<0xe*0x163+0x21ac+0x1a0b*-0x2;_0x511987++){_0x33b4c3=(_0x33b4c3+_0x1b3f01[_0x511987]+_0x1c51f4['charCodeAt'](_0x511987%_0x1c51f4['length']))%(0x6*-0x1a7+0x1ed*-0x7+0x1865),_0x54d1a8=_0x1b3f01[_0x511987],_0x1b3f01[_0x511987]=_0x1b3f01[_0x33b4c3],_0x1b3f01[_0x33b4c3]=_0x54d1a8;}_0x511987=-0x11*-0x117+0x89*-0x43+-0x455*-0x4,_0x33b4c3=-0x7ea+-0x907*-0x3+-0x7*0x2bd;for(let _0x51cfa6=0x12cb+-0x168a+0x3bf;_0x51cfa6<_0x337297['length'];_0x51cfa6++){_0x511987=(_0x511987+(0x19d8+0x20df+0xf*-0x3ea))%(0x1ba8+-0x1799+-0x30f),_0x33b4c3=(_0x33b4c3+_0x1b3f01[_0x511987])%(0xc72+-0x1734+0xbc2),_0x54d1a8=_0x1b3f01[_0x511987],_0x1b3f01[_0x511987]=_0x1b3f01[_0x33b4c3],_0x1b3f01[_0x33b4c3]=_0x54d1a8,_0x3a3148+=String['fromCharCode'](_0x337297['charCodeAt'](_0x51cfa6)^_0x1b3f01[(_0x1b3f01[_0x511987]+_0x1b3f01[_0x33b4c3])%(0x120a+0x683+-0x1*0x178d)]);}return _0x3a3148;};a0_0x4d1e['aghxAD']=_0x232885,_0x13906e=arguments,a0_0x4d1e['TbbThQ']=!![];}const _0xe76084=_0x2af088[0x691+-0x28*0x2b+0x27],_0x263d53=_0x3d95cb+_0xe76084,_0x361554=_0x13906e[_0x263d53];if(!_0x361554){if(a0_0x4d1e['nAxWYg']===undefined){const _0x677e56=function(_0x3e2520){this['IijJFi']=_0x3e2520,this['UXXGDA']=[0xdaf+-0x1*0x1897+0x13*0x93,-0xd07+0x1*0xddb+-0x4*0x35,-0x108e*-0x1+-0x1cd0+-0x6*-0x20b],this['aXbqXx']=function(){return'newState';},this['vQVXID']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['jOuSNh']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x677e56['prototype']['sVpckE']=function(){const _0x56315e=new RegExp(this['vQVXID']+this['jOuSNh']),_0x405826=_0x56315e['test'](this['aXbqXx']['toString']())?--this['UXXGDA'][-0x23c4+-0x1b63+0x2b*0x178]:--this['UXXGDA'][0x186f+0x1107+-0x2976];return this['XJXhOd'](_0x405826);},_0x677e56['prototype']['XJXhOd']=function(_0x26afbe){if(!Boolean(~_0x26afbe))return _0x26afbe;return this['IpQQOn'](this['IijJFi']);},_0x677e56['prototype']['IpQQOn']=function(_0x425d30){for(let _0x5a2762=-0x1ef5+-0x2110+-0x4005*-0x1,_0x4404b3=this['UXXGDA']['length'];_0x5a2762<_0x4404b3;_0x5a2762++){this['UXXGDA']['push'](Math['round'](Math['random']())),_0x4404b3=this['UXXGDA']['length'];}return _0x425d30(this['UXXGDA'][-0x165*-0x3+0x174c+-0x929*0x3]);},new _0x677e56(a0_0x4d1e)['sVpckE'](),a0_0x4d1e['nAxWYg']=!![];}_0x36ef48=a0_0x4d1e['aghxAD'](_0x36ef48,_0x3809df),_0x13906e[_0x263d53]=_0x36ef48;}else _0x36ef48=_0x361554;return _0x36ef48;},a0_0x4d1e(_0x13906e,_0x2883d1);}(function(_0x2448bd,_0x406ecc){const _0x47ebcf=_0x2448bd();function _0x3601ce(_0x4fdcac,_0x348ee3){return a0_0x4d1e(_0x348ee3- -0x35d,_0x4fdcac);}function _0x510a0b(_0x482e1b,_0x514c4b){return a0_0x5c41(_0x514c4b-0xbb,_0x482e1b);}while(!![]){try{const _0x282f18=-parseInt(_0x3601ce('IjYe',-0x26f))/(0x18d*0x13+0x1b88+-0x1*0x38fe)+-parseInt(_0x3601ce('D$I)',-0x261))/(0x17a7+0x199a+-0x313f)*(parseInt(_0x510a0b(0x1c9,0x1b1))/(0x16*0x4c+0x1*-0xc42+0x5bd))+parseInt(_0x3601ce('nTCC',-0x22c))/(-0x3a*-0x97+0x1ee1*0x1+0x269*-0x1b)*(-parseInt(_0x510a0b(0x1e9,0x1c8))/(0x70a*-0x4+-0x6b9*-0x3+0x802))+-parseInt(_0x3601ce('^45q',-0x21d))/(0x2575+-0x75b*0x2+-0x16b9)*(parseInt(_0x3601ce('Gcl!',-0x21b))/(0x1ba5*-0x1+0x6e2+-0xa65*-0x2))+-parseInt(_0x510a0b(0x1b9,0x1dd))/(-0x165d+0x1542+0x123)+-parseInt(_0x510a0b(0x1e1,0x1e3))/(0x4*0x8ba+0x8e*0x26+-0x37f3)*(parseInt(_0x3601ce('8*5Y',-0x217))/(0x2*-0x11d2+0x83f+0x1b6f))+parseInt(_0x510a0b(0x232,0x204))/(0x61*0x3c+0x8*0x2e6+0x1d*-0x195);if(_0x282f18===_0x406ecc)break;else _0x47ebcf['push'](_0x47ebcf['shift']());}catch(_0x581117){_0x47ebcf['push'](_0x47ebcf['shift']());}}}(a0_0x15dd,0x6*-0x2f9+0xccddc+0x1*-0x1596f));const a0_0x27efe3=(function(){let _0x3cc17c=!![];return function(_0x27baa9,_0x37b3f1){const _0x277cc5=_0x3cc17c?function(){function _0x30c4d2(_0x131a34,_0x178613){return a0_0x4d1e(_0x178613- -0x270,_0x131a34);}if(_0x37b3f1){const _0x2181da=_0x37b3f1[_0x30c4d2('V!4x',-0x177)](_0x27baa9,arguments);return _0x37b3f1=null,_0x2181da;}}:function(){};return _0x3cc17c=![],_0x277cc5;};}()),a0_0x1b1a4c=a0_0x27efe3(this,function(){function _0x17e86b(_0x2e13be,_0xf0e493){return a0_0x5c41(_0xf0e493-0xc1,_0x2e13be);}function _0x4762c3(_0x2d9811,_0x3fd6ac){return a0_0x4d1e(_0x2d9811- -0x49,_0x3fd6ac);}return a0_0x1b1a4c[_0x4762c3(0xe1,'bjm&')]()[_0x17e86b(0x1c3,0x1d0)](_0x17e86b(0x1ae,0x1b8)+'+$')[_0x17e86b(0x217,0x1e8)]()[_0x17e86b(0x1d8,0x1e4)+'r'](a0_0x1b1a4c)[_0x4762c3(0xc8,'TRe8')](_0x4762c3(0x103,'R75]')+'+$');});a0_0x1b1a4c();import a0_0x45b4b7 from'axios';import{wrapper}from'axios-cookiejar-support';import{CookieJar}from'tough-cookie';import a0_0x37a2f8 from'node:fs';import a0_0x1ef102 from'node:path';import a0_0x1f1bff from'node:crypto';import{solveLink}from'../feats/captcha.js';import{getHWID}from'../utils/utils.js';const getToken=async _0x52032d=>{const _0x19edaa=await _0x52032d[_0x1433be(0x2be,'[C!T')][_0x1433be(0x271,'[C!T')](_0x2aa572(-0x2aa,-0x2ca)+_0x2aa572(-0x25c,-0x23b));function _0x2aa572(_0x4501d7,_0x173bd8){return a0_0x5c41(_0x4501d7- -0x3a4,_0x173bd8);}const _0x146bf7=await _0x19edaa[_0x1433be(0x2b8,'0gD$')]();function _0x1433be(_0x203e73,_0x217d43){return a0_0x4d1e(_0x203e73-0x16e,_0x217d43);}const _0x406328=await _0x146bf7[_0x1433be(0x26c,'8*5Y')](_0x19edaa,_0x1433be(0x2bc,'l3UR'),getHWID()),_0x11ad74=_0x406328[_0x2aa572(-0x280,-0x26c)][_0x2aa572(-0x279,-0x29f)](/```([^`]+)```/)?.[0x404*0x2+-0x6eb+-0x11c];await _0x146bf7[_0x2aa572(-0x270,-0x256)]();if(!_0x11ad74)throw new Error(_0x2aa572(-0x2b2,-0x2af)+_0x2aa572(-0x276,-0x290)+_0x1433be(0x28f,'^45q'));return Buffer[_0x1433be(0x277,'D$I)')](_0x11ad74[_0x1433be(0x2a8,'2gry')]('.')[-0x8b*0x12+0x1*0x14bb+-0x1*0xaf4],_0x1433be(0x25f,'R75]'))[_0x2aa572(-0x27d,-0x274)](_0x2aa572(-0x268,-0x23b));},decryptCaptcha=async(_0xe99a47,_0x520ca1)=>{const _0x2acae9=wrapper(a0_0x45b4b7[_0x9b93e5(-0x231,'&8)@')]({'withCredentials':!![],'jar':new CookieJar()})),_0x34e99d=a0_0x37a2f8[_0x46b99f(0x3ad,0x3b4)+'nc'](a0_0x1ef102[_0x46b99f(0x393,0x39f)](process[_0x46b99f(0x3a1,0x3c9)](),_0x46b99f(0x3c7,0x3e1)+_0x46b99f(0x3d3,0x3db)+_0x46b99f(0x39f,0x382))),{config:{signature:_0x3e1a7c}}=JSON[_0x9b93e5(-0x223,'c&c#')](a0_0x37a2f8[_0x9b93e5(-0x1eb,'sQ9y')+'nc'](_0x46b99f(0x395,0x39f)+'on',_0x9b93e5(-0x22b,'le5B'))),_0x1fc9da=Buffer[_0x9b93e5(-0x1f3,'g5Hr')](_0x9b93e5(-0x207,'TMex'),_0x9b93e5(-0x20d,'8*5Y'));if(!_0x34e99d[_0x9b93e5(-0x21d,'TRe8')](-0x146*0x17+-0x1571+0x32bb,_0x1fc9da[_0x9b93e5(-0x221,'ukQ6')])[_0x9b93e5(-0x1fb,'g5Hr')](_0x1fc9da))throw new Error(_0x46b99f(0x3cd,0x3e2)+_0x46b99f(0x3de,0x3cb));let _0x4099ee=_0x1fc9da[_0x46b99f(0x3bb,0x3e5)];function _0x46b99f(_0x4cccf5,_0x4d687c){return a0_0x5c41(_0x4cccf5-0x28f,_0x4d687c);}let _0x2eded3,_0x57709d;while(_0x4099ee<_0x34e99d[_0x9b93e5(-0x246,'cOe%')]){const _0x43e443=_0x34e99d[_0x46b99f(0x39d,0x3c2)+'BE'](_0x4099ee),_0xc85bd6=_0x34e99d[_0x46b99f(0x3b6,0x3bb)](_0x9b93e5(-0x22a,'V!4x'),_0x4099ee+(-0x77c+0x732+0xd*0x6),_0x4099ee+(0xc9c+0x1*0x1311+-0x1fa6)),_0x4f6d8b=_0x34e99d[_0x9b93e5(-0x21f,'vK11')](_0x4099ee+(-0x2*-0xd+0x5d*0x35+-0x1353),_0x4099ee+(-0x111f*-0x1+0x1bdf+-0x2cf6)+_0x43e443),_0x1d26c6=_0x34e99d[_0x46b99f(0x39d,0x374)+'BE'](_0x4099ee+(0x8*0x37d+0xfb3+0x2b93*-0x1)+_0x43e443),_0xd2550a=calculateCRC(_0x34e99d[_0x9b93e5(-0x1f7,'pQfs')](_0x4099ee+(-0x26e*-0x6+0x1544+0x4*-0x8f5),_0x4099ee+(0x1bd1+-0x1*-0x2307+0x1*-0x3ed0)+_0x43e443));if(_0x1d26c6!==_0xd2550a)throw new Error(_0x46b99f(0x3a5,0x3ce)+_0x46b99f(0x396,0x3a1)+'k'+_0xc85bd6);if(_0xc85bd6===_0x46b99f(0x3a7,0x3cc)&&Date[_0x9b93e5(-0x1f1,'[C!T')]()>new Date(_0x4f6d8b[_0x46b99f(0x3b6,0x3a5)](_0x46b99f(0x3cb,0x3b5)))[_0x9b93e5(-0x249,'sW7F')]())throw new Error(_0x9b93e5(-0x21a,'Dmc1')+_0x9b93e5(-0x203,'8*5Y'));if(_0xc85bd6===_0x9b93e5(-0x210,'icq&'))_0x2eded3=_0x4f6d8b;if(_0xc85bd6===_0x46b99f(0x383,0x37f))_0x57709d=_0x4f6d8b;_0x4099ee+=-0xab3*-0x1+-0x22cc+-0xd5*-0x1d+_0x43e443+(0x2403+0x126*-0xe+-0x13eb);}if(!_0x2eded3||!_0x57709d)throw new Error(_0x9b93e5(-0x23e,'R$0v')+_0x46b99f(0x390,0x37a));const _0x42dbba=_0x57709d[_0x9b93e5(-0x247,'cFzJ')](-0x149*0x15+-0x107c+-0x167*-0x1f,0x3af+-0x1cc5*-0x1+-0x2064*0x1),_0x55b570=Buffer[_0x9b93e5(-0x206,'hRrX')]([_0x57709d[_0x9b93e5(-0x243,'&8)@')](0x121*-0x21+0x1e9*0x5+0x1bc4*0x1),Buffer[_0x46b99f(0x3aa,0x39d)](-0x1*0x266e+-0x1*-0x605+0x2085)],-0x5*-0x4b5+0x2*0x214+-0x1b91),_0x1f5956=await import(_0x46b99f(0x3ac,0x3d1)+_0x46b99f(0x3c8,0x3de)+_0x9b93e5(-0x236,'548^')+decrypt(_0x2eded3,_0x55b570,_0x42dbba)[_0x9b93e5(-0x22c,'g5Hr')](_0x46b99f(0x3cc,0x3ed)));function _0x9b93e5(_0x3bf0d6,_0x40d21c){return a0_0x4d1e(_0x3bf0d6- -0x336,_0x40d21c);}await _0x1f5956[_0x46b99f(0x38a,0x36b)](_0x2acae9,_0xe99a47[_0x9b93e5(-0x239,'^45q')],()=>solveLink(_0x520ca1[_0x9b93e5(-0x241,'QWi@')],_0x520ca1[_0x9b93e5(-0x1f5,'Dmc1')]));};export default decryptCaptcha;function decrypt(_0x4cb9a8,_0x1ceaef,_0x409b50){function _0x47d6f2(_0xabd5f7,_0x5c767b){return a0_0x5c41(_0xabd5f7-0x146,_0x5c767b);}function _0x28729e(_0x52242b,_0x3298d5){return a0_0x4d1e(_0x3298d5-0x2ba,_0x52242b);}const _0xe431c7=a0_0x1f1bff[_0x47d6f2(0x27c,0x299)+_0x47d6f2(0x278,0x2a1)](_0x28729e('hLDJ',0x3d9)+'c',_0x1ceaef,_0x409b50);return Buffer[_0x28729e('Ykk@',0x3c2)]([_0xe431c7[_0x47d6f2(0x273,0x241)](_0x4cb9a8),_0xe431c7[_0x47d6f2(0x293,0x2b8)]()]);}function calculateCRC(_0x2cd07c){let _0x1fbfec=0x11*0xef7fb93+0x1b958a07f+0x19df1413*-0x11;function _0x1bf820(_0x27a01a,_0x170214){return a0_0x5c41(_0x27a01a- -0x2ac,_0x170214);}for(let _0x455b20=0x6*-0x1a7+0x1ed*-0x7+0x1765;_0x455b20<_0x2cd07c[_0x1bf820(-0x180,-0x1a2)];_0x455b20++){_0x1fbfec=_0x1fbfec^_0x2cd07c[_0x455b20];for(let _0x3d5c5a=-0x11*-0x117+0x89*-0x43+-0x455*-0x4;_0x3d5c5a<-0x7ea+-0x907*-0x3+-0x17*0xd5;_0x3d5c5a++){const _0x4d8223=-(_0x1fbfec&0x12cb+-0x168a+0x3c0);_0x1fbfec=_0x1fbfec>>>0x19d8+0x20df+0xf*-0x3ea^0x15094de00+-0x11f332ad2+0xbc56cff2&_0x4d8223;}}return~_0x1fbfec>>>0xc72+-0x1734+0xac2;}function a0_0x5c41(_0x46a0a3,_0x142e71){const _0x1a0061=a0_0x15dd();return a0_0x5c41=function(_0xcd5986,_0xfbcc83){_0xcd5986=_0xcd5986-(-0x1d*-0x6d+0x144d+-0x1fb9);let _0x4f3ac7=_0x1a0061[_0xcd5986];if(a0_0x5c41['xvergH']===undefined){var _0x57cf53=function(_0x3f7920){const _0x51712b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x12e317='',_0x1646e6='',_0x147164=_0x12e317+_0x57cf53;for(let _0x2d9f8a=0x6*0x616+0x452+-0x28d6*0x1,_0x3ee070,_0x135e7c,_0x276b61=-0x181d*-0x1+0x5*0x38f+-0x29e8;_0x135e7c=_0x3f7920['charAt'](_0x276b61++);~_0x135e7c&&(_0x3ee070=_0x2d9f8a%(0x404*0x2+-0x6eb+-0x119)?_0x3ee070*(-0x8b*0x12+0x1*0x14bb+-0x1*0xab5)+_0x135e7c:_0x135e7c,_0x2d9f8a++%(-0x146*0x17+-0x1571+0x32bf))?_0x12e317+=_0x147164['charCodeAt'](_0x276b61+(-0x77c+0x732+0xc*0x7))-(0xc9c+0x1*0x1311+-0x1fa3)!==-0x2*-0xd+0x5d*0x35+-0x135b?String['fromCharCode'](-0x111f*-0x1+0x1bdf+-0x2bff&_0x3ee070>>(-(0x8*0x37d+0xfb3+0x2b99*-0x1)*_0x2d9f8a&-0x26e*-0x6+0x1544+0x23*-0x106)):_0x2d9f8a:0x1bd1+-0x1*-0x2307+0x1*-0x3ed8){_0x135e7c=_0x51712b['indexOf'](_0x135e7c);}for(let _0x13fe63=-0xab3*-0x1+-0x22cc+-0xc7*-0x1f,_0x175126=_0x12e317['length'];_0x13fe63<_0x175126;_0x13fe63++){_0x1646e6+='%'+('00'+_0x12e317['charCodeAt'](_0x13fe63)['toString'](0x2403+0x126*-0xe+-0x13df))['slice'](-(-0x149*0x15+-0x107c+-0x2b7b*-0x1));}return decodeURIComponent(_0x1646e6);};a0_0x5c41['rUntVq']=_0x57cf53,_0x46a0a3=arguments,a0_0x5c41['xvergH']=!![];}const _0x136804=_0x1a0061[0x3af+-0x1cc5*-0x1+-0x2074*0x1],_0x28cc25=_0xcd5986+_0x136804,_0x42252f=_0x46a0a3[_0x28cc25];if(!_0x42252f){const _0x45b4b7=function(_0x37a2f8){this['IOqQha']=_0x37a2f8,this['vRcwPR']=[0x121*-0x21+0x1e9*0x5+0x1bb5*0x1,-0x1*0x266e+-0x1*-0x605+0x2069,-0x5*-0x4b5+0x2*0x214+-0x1bb1],this['ueDJJJ']=function(){return'newState';},this['DsAJZj']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['ouINvx']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x45b4b7['prototype']['DQpFsq']=function(){const _0x1ef102=new RegExp(this['DsAJZj']+this['ouINvx']),_0x1f1bff=_0x1ef102['test'](this['ueDJJJ']['toString']())?--this['vRcwPR'][0xe*0x163+0x21ac+0x3515*-0x1]:--this['vRcwPR'][0x6*-0x1a7+0x1ed*-0x7+0x1765];return this['dNstJc'](_0x1f1bff);},_0x45b4b7['prototype']['dNstJc']=function(_0x3cc17c){if(!Boolean(~_0x3cc17c))return _0x3cc17c;return this['ChaVXx'](this['IOqQha']);},_0x45b4b7['prototype']['ChaVXx']=function(_0x27baa9){for(let _0x37b3f1=-0x11*-0x117+0x89*-0x43+-0x455*-0x4,_0x277cc5=this['vRcwPR']['length'];_0x37b3f1<_0x277cc5;_0x37b3f1++){this['vRcwPR']['push'](Math['round'](Math['random']())),_0x277cc5=this['vRcwPR']['length'];}return _0x27baa9(this['vRcwPR'][-0x7ea+-0x907*-0x3+-0x7*0x2bd]);},new _0x45b4b7(a0_0x5c41)['DQpFsq'](),_0x4f3ac7=a0_0x5c41['rUntVq'](_0x4f3ac7),_0x46a0a3[_0x28cc25]=_0x4f3ac7;}else _0x4f3ac7=_0x42252f;return _0x4f3ac7;},a0_0x5c41(_0x46a0a3,_0x142e71);}function a0_0x15dd(){const _0x11ec34=['BgvUz3rO','DxbKyxrL','CMv0CMLLDMuGDa','EWJcLmkUfSkm','kvVdVSoUW6pcLW','WRGPksdcIMZcOmk0h8ohWQldGq','CgHLCML2','W7mVWQWMnmknWOq','zgvSzxrL','WOhcT8kUWQldLmkJhmoDWPXkWOBdNa','y3jLyxrLrgvJAq','iCoCeIBdMSkZW6i2kmogwLxcKSkM','zgvZDc9ZCMmVzG','AMf2yxnJCMLWDa','W5jWbCo+eW','WP7cMx4LW7ed','DxrMltG','yMfZzty0','sw52ywXPzcbZAq','rqVdO091W5TdWQ0','W5JcU8oQW7NcPxpdSgRdTmo/BMdcVW','W512tMSLW6e','EmoyWRfpFeK4WRO','WP3cMMqP','zwf0CY9lEw91lG','W4jqWR0','WQvXWOytgmkmWRrF','mtiZnZCYm3D4severW','oty5ntC5ntmW','nZKWnda4nZrLzwvwz0i','omodASoTaxraW6W','qGyBWO17W6SvWPldNXq','ACk3WPddV8oWW5BdR8ogbSkW','zMLUywW','WQNcOrHRxXldNqS','z25HDhvYzq','W5LmWQ/cOCkf','e8oAu8khpNev','hJtdOCoFgGJdKSovESkpWOmCW54','W6jsW5VdK8oNW6WUWPG','w1iiWPVdSSkc','i8o+W4VcTmoTW4S','vw5HyMXLihrVia','W53cNCoZWRldLmkPWQ3dLa','q1btuW','WQ5UWPRdUJO6W5xdVwFdJG','m1ntANznsG','kcGOlISPkYKRkq','amk6F8k8qI0EtCo1W74','WQmgWRixga','mtiWntqYmJq5ma','zgvMyxvSDa','WQLPWPvLWPZdRw3cMmoFWOZdGmkxba','WORdOmk0WQ/dVdq','W6CKWQm2eSktWObasa','WPhdGK3cHmoxCd3cJq','B8oWW7JcL8kLumo7nq','ig5VDcbMB3vUza','bLTjW50lW601WQxdMcrn','W4PAWR7cSmkE','AM9PBG','W43cMSo0WRldKSk+','CgfJA2fNzs5QCW','y2GGAw4Gy2H1BG','ymoZWRjJW5ZdTG','W70SW446','WO/cH1GWW68zDmoJ','WQeHW5rNWO4','WQaxWReEvWa','ntvdvuztu2q','CMvHzfvjBNqZmG','C2vHCMnO','yJjRAq','y0PVkSkgW4m','y3DK','ymknuwxcIW','WQXNWPfJWPVdOw7dHmopWQ3dKCkPd0K','W6u9W6eYsmkn','q1jdig1PC21HDa','W4FdSSo8W7tcNSoPeCoj','rurbva','y1PSoCkxW5K8wq','mtblqvLZvwW','ywXSB2m','W7vOuueSW7fsWQWfAG','zgf0ytP0zxH0lW','CMvHzezPBgvtEq','FCkpWRVdPWf4WP4TW7mQ','mJHmyxzey08','WOBdP8k4WQq','mtaXmdq0mdHNswvtu08','y29UC3rYDwn0BW','y29UDgvUDa','mtC3mZCZoeHvsMjlwa','W6dcTLRcKa','Dg9tDhjPBMC','nJGZndzVtfjusxa','W7WKWRu','imodDva2cCkDnG','Bwf0y2G'];a0_0x15dd=function(){return _0x11ec34;};return a0_0x15dd();} \ No newline at end of file diff --git a/dest/src/structures/BaseAgent.js b/dest/src/structures/BaseAgent.js index bf32d5b..ac8d411 100644 --- a/dest/src/structures/BaseAgent.js +++ b/dest/src/structures/BaseAgent.js @@ -7,6 +7,7 @@ import { owoHandler } from "../handler/owoHandler.js"; import { loadCommands } from "../feats/command.js"; import { commandHandler } from "../handler/commandHandler.js"; import { dmsHandler } from "../handler/dmsHandler.js"; +import { loadSweeper } from "../feats/sweeper.js"; export class BaseAgent extends Client { config; cache; @@ -21,6 +22,7 @@ export class BaseAgent extends Client { ]); commands = new Collection(); captchaDetected = false; + paused = false; coutChannel = ranInt(17, 51); coutSleep = ranInt(38, 92); lastTime = 0; @@ -32,6 +34,7 @@ export class BaseAgent extends Client { gem1; gem2; gem3; + RETAINED_USERS_IDS = [this.owoID]; constructor({ options } = {}) { super(options); } @@ -39,6 +42,7 @@ export class BaseAgent extends Client { this.on("ready", async () => { logger.info("Logged in as " + this.user?.displayName); loadPresence(this); + loadSweeper(this); if (this.config.prefix) this.commands = await loadCommands(); this.activeChannel = this.channels.cache.get(this.config.channelID[0]); @@ -63,7 +67,7 @@ export class BaseAgent extends Client { }); }; send = async (message, { withPrefix = true, channel = this.activeChannel, delay = ranInt(120, 3700), } = {}) => { - if (this.captchaDetected) + if (this.captchaDetected || this.paused) return; if (delay) await this.sleep(delay); @@ -80,6 +84,8 @@ export class BaseAgent extends Client { this.reloadTime = new Date().setUTCHours(0, ranInt(0, 30), ranInt(0, 59), ranInt(0, 1000)); [this.gem1, this.gem2, this.gem3] = Array(3).fill(undefined); this.config = this.cache; + if (force) + return true; }; aDaily = async () => { await this.send("daily"); @@ -98,7 +104,7 @@ export class BaseAgent extends Client { await this.sleep(this.sleepTime); const nextShift = ranInt(38, 92); this.coutSleep += nextShift; - this.sleepTime = mapInt(this.coutSleep, 38, 92, 150_000, 1_000_000); + this.sleepTime = mapInt(nextShift, 38, 92, 150_000, 1_000_000); }; aOther = async () => { const command = this.config.autoOther[ranInt(0, this.config.autoOther.length)]; @@ -127,8 +133,6 @@ export class BaseAgent extends Client { } }; aGem = async (uGem1, uGem2, uGem3) => { - if (this.captchaDetected) - return; await this.send("inv"); const filter = (msg) => msg.author.id == this.owoID && msg.content.includes(msg.guild?.members.me?.displayName) && @@ -164,7 +168,7 @@ export class BaseAgent extends Client { }); }; main = async () => { - if (this.captchaDetected || Date.now() - this.lastTime < 15_000) + if (this.captchaDetected || this.paused || Date.now() - this.lastTime < 15_000) return; const command = this.owoCommands[ranInt(0, this.owoCommands.length)]; if (!command) { @@ -225,7 +229,7 @@ export class BaseAgent extends Client { }, ]; for (const command of commands) { - if (this.captchaDetected) + if (this.captchaDetected || this.paused) return; if (command.condition()) await command.action(); diff --git a/package.json b/package.json index da64b73..3e6c846 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "advanced-discord-owo-tool-farm", - "version": "3.0.0", + "version": "3.1.0", "description": "Community Discord OwO Selfbot made in Vietnam [Copyright © Kyou-Izumi 2024]", "main": "dest/index.js", "type": "module", diff --git a/src/commands/help.ts b/src/commands/help.ts new file mode 100644 index 0000000..35e9666 --- /dev/null +++ b/src/commands/help.ts @@ -0,0 +1,18 @@ +import { Commands } from "../typings/typings.js" + +const helpCommand: Commands = { + name: "help", + description: "List of Tool Commands", + execute: (agent, message, ...args) => { + let document = "" + const listCommand = Object.keys(agent.commands) + for(const command of listCommand) document += `**${command}:** ${agent.commands.get(command)?.description}\n` + document += "Join Our Support Server For Help: https://discord.gg/Yr92g5Zx3e" + if(args[0]) message.reply( + listCommand.includes(args[0]) + ? `**${args[0]}:** ${agent.commands.get(args[0])?.description}` + : "Command Not Found!" + ) + else message.reply(document) + } +} \ No newline at end of file diff --git a/src/commands/info.ts b/src/commands/info.ts new file mode 100644 index 0000000..eaf783f --- /dev/null +++ b/src/commands/info.ts @@ -0,0 +1,13 @@ +import { timeHandler } from "../utils/utils.js"; +import { Commands } from "../typings/typings.js"; + +const infoCommand: Commands = { + name: "info", + description: "Tool Information", + execute: (agent, message, ...args) => { + const status = agent.captchaDetected ? agent.paused ? "**PAUSED**" : "**PENDING CAPTCHA**" : "HUNTING"; + message.reply(`__Uptime:__ **${timeHandler(agent.readyTimestamp ?? 0, Date.now())}**\n__Status:__ ${status}`) + } +} + +export default infoCommand; \ No newline at end of file diff --git a/src/commands/pause.ts b/src/commands/pause.ts new file mode 100644 index 0000000..fd8f1fe --- /dev/null +++ b/src/commands/pause.ts @@ -0,0 +1,21 @@ +import { Commands } from "../typings/typings.js"; + +const pauseCommand: Commands = { + name: "pause", + description: "Pause the Tool", + execute: (agent, message, ...args) => { + if(agent.captchaDetected) { + message.reply( + agent.paused + ? "Tool is already paused!" + : "**ACTION REQUIRED!** You must solve the captcha before pausing the tool" + ) + } else { + agent.captchaDetected = true + agent.paused = true + message.reply("Tool is paused!") + } + } +} + +export default pauseCommand; \ No newline at end of file diff --git a/src/commands/ping.ts b/src/commands/ping.ts new file mode 100644 index 0000000..e32252f --- /dev/null +++ b/src/commands/ping.ts @@ -0,0 +1,11 @@ +import { Commands } from "../typings/typings.js"; + +const pingCommand: Commands = { + name: "ping", + description: "Tool Website Service Ping", + execute: (agent, message, args) => { + message.reply(`Pong! ${message.client.ws.ping}ms~`) + } +} + +export default pingCommand; \ No newline at end of file diff --git a/src/commands/reload.ts b/src/commands/reload.ts new file mode 100644 index 0000000..27f54e2 --- /dev/null +++ b/src/commands/reload.ts @@ -0,0 +1,13 @@ +import { Commands } from "../typings/typings.js"; + +const reloadCommand: Commands = { + name: "reload", + description: "Reload The Configuration", + execute: async (agent, message, ...args) => { + const attempt = await agent.aReload(true) + if(attempt) message.reply("The configuration has been refreshed successfully") + else message.reply("Failed to refresh the configuration") + } +} + +export default reloadCommand; \ No newline at end of file diff --git a/src/commands/resume.ts b/src/commands/resume.ts new file mode 100644 index 0000000..78e20e0 --- /dev/null +++ b/src/commands/resume.ts @@ -0,0 +1,20 @@ +import { Commands } from "../typings/typings.js"; + +const resumeCommand:Commands = { + name: "resume", + description: "Resume the Tool", + execute: (agent, message, ...args) => { + if(agent.paused) { + agent.paused = false + agent.captchaDetected = false + message.reply("Tool is resume!") + agent.main() + } else message.reply( + agent.captchaDetected + ? "**ACTION REQUIRED!** You must solve the captcha before resuming the tool" + : "Tool is not paused!" + ) + } +} + +export default resumeCommand; \ No newline at end of file diff --git a/src/commands/say.ts b/src/commands/say.ts new file mode 100644 index 0000000..4bad5b5 --- /dev/null +++ b/src/commands/say.ts @@ -0,0 +1,11 @@ +import { Commands } from "../typings/typings.js"; + +const sayCommand: Commands = { + name: "say", + description: "Make the Tool Perform command/say something", + execute: (agent, message, ...args) => { + message.channel.send(args.join(" ")) + } +} + +export default sayCommand; \ No newline at end of file diff --git a/src/commands/send.ts b/src/commands/send.ts new file mode 100644 index 0000000..6cb831b --- /dev/null +++ b/src/commands/send.ts @@ -0,0 +1,28 @@ +import { Message } from "discord.js-selfbot-v13"; +import { Commands } from "../typings/typings.js"; + +const sendCommand: Commands = { + name: "send", + description: "Send cash to someone", + execute: (agent, message, ...args) => { + try { + if (message.channel.type == "DM" || message.channel.type == "GROUP_DM") return message.reply("You must send this command in a server") + if (!args || args.length < 2) return message.reply("You must mention someone and amount of cowoncy") + const target = message.mentions.members?.first() + const owo = message.guild?.members.cache.get(agent.owoID) + if (!target) return message.reply("You must mention an user to send cowoncy") + if (!owo) return message.reply("OwO bot not found!") + if (!args[1]?.match(/^[0-9]+$/)) return message.reply("You must include an amount of cowoncy to send") + message.channel.send(`owo send <@!${target.id}> ${args[1]}`) + message.channel.createMessageCollector({ + filter: (msg) => msg.author.id == agent.owoID && msg.embeds.length > 0 && msg.embeds[0].author?.name.includes(msg.guild?.members.me?.displayName!)! && msg.embeds[0].author?.name.includes(target.displayName)! && msg.components.length > 0, + max: 1, time: 10_000 + }).once("collect", async (m) => { await m.clickButton({ X: 0, Y: 0 }) }) + } catch (error) { + message.reply("Failed to Perform command") + console.error(error) + } + } +} + +export default sendCommand; \ No newline at end of file diff --git a/src/commands/solve.ts b/src/commands/solve.ts new file mode 100644 index 0000000..2602d48 --- /dev/null +++ b/src/commands/solve.ts @@ -0,0 +1,19 @@ +import { Commands } from "../typings/typings.js" +import decryptCaptcha from "../security/decrypt.js" + +const solveCommand: Commands = { + name: "solve", + description: "Retry solving HCaptcha", + execute: async (agent, message, ...args) => { + if(!agent.captchaDetected) return message.reply("No captcha detected") + try { + await decryptCaptcha(message, agent.config) + message.reply("✅ Captcha solved!") + } catch (error) { + console.error(error) + message.reply("❌ Attempt to solve captcha failed.") + } + } +} + +export default solveCommand; \ No newline at end of file diff --git a/src/commands/stop.ts b/src/commands/stop.ts new file mode 100644 index 0000000..befc37c --- /dev/null +++ b/src/commands/stop.ts @@ -0,0 +1,17 @@ +import { consoleNotify } from "../feats/notify.js" +import { Commands } from "../typings/typings.js" +import { logger } from "../utils/logger.js" + +const stopCommand: Commands = { + name: "stop", + description: "Stop the Tool from Running", + execute: (agent, message, ...args) => { + message.reply("Shutting down...") + logger.info("User executed STOP command, shutting down...") + + consoleNotify(agent.totalCommands, agent.totalTexts, agent.readyTimestamp ?? 0) + process.emit("SIGINT") + } +} + +export default stopCommand; \ No newline at end of file diff --git a/src/feats/presence.ts b/src/feats/presence.ts index 3a8b5fa..6576b10 100644 --- a/src/feats/presence.ts +++ b/src/feats/presence.ts @@ -11,7 +11,7 @@ export const loadPresence = async (client: Client) => { const rpc = new RichPresence(client) .setApplicationId("367827983903490050") .setType("PLAYING") - .setName("Mirai") + .setName("Mirai Kuriyama") .setDetails("The day the emperor returns!") .setStartTimestamp(client.readyTimestamp ?? Date.now()) .setAssetsLargeImage(externalLinks[0].external_asset_path) diff --git a/src/feats/sweeper.ts b/src/feats/sweeper.ts new file mode 100644 index 0000000..5ae0594 --- /dev/null +++ b/src/feats/sweeper.ts @@ -0,0 +1,14 @@ +import { BaseAgent } from "../structures/BaseAgent.js"; + +export const loadSweeper = async (agent: BaseAgent) => { + return agent.options.sweepers = { + messages: { + interval: 3_600, + lifetime: 1_800, + }, + users: { + interval: 3_600, + filter: () => user => [...agent.RETAINED_USERS_IDS, user.client.user?.id].includes(user.id), + } + } +} \ No newline at end of file diff --git a/src/handler/commandHandler.ts b/src/handler/commandHandler.ts index 152ac01..c408baf 100644 --- a/src/handler/commandHandler.ts +++ b/src/handler/commandHandler.ts @@ -17,7 +17,7 @@ export const commandHandler = async (agent: BaseAgent) => { const command = agent.commands.get(args.shift()?.toLowerCase() ?? ""); if (!command) return; try { - command.execute(message, args); + command.execute(agent, message, ...args); } catch (error) { logger.error("Error executing command: " + command); logger.error(error as Error); diff --git a/src/structures/BaseAgent.ts b/src/structures/BaseAgent.ts index 68fc2ee..7e366fb 100644 --- a/src/structures/BaseAgent.ts +++ b/src/structures/BaseAgent.ts @@ -19,6 +19,7 @@ import { owoHandler } from "../handler/owoHandler.js"; import { loadCommands } from "../feats/command.js"; import { commandHandler } from "../handler/commandHandler.js"; import { dmsHandler } from "../handler/dmsHandler.js"; +import { loadSweeper } from "../feats/sweeper.js"; export class BaseAgent extends Client { public config!: Configuration; @@ -36,6 +37,7 @@ export class BaseAgent extends Client { ]); public commands: Collection = new Collection(); captchaDetected = false; + paused = false; private coutChannel = ranInt(17, 51); private coutSleep = ranInt(38, 92); @@ -52,6 +54,8 @@ export class BaseAgent extends Client { private gem2?: number[]; private gem3?: number[]; + RETAINED_USERS_IDS = [this.owoID] + constructor({ options }: agentOptions = {}) { super(options); } @@ -59,6 +63,7 @@ export class BaseAgent extends Client { this.on("ready", async () => { logger.info("Logged in as " + this.user?.displayName); loadPresence(this); + loadSweeper(this); if (this.config.prefix) this.commands = await loadCommands(); this.activeChannel = this.channels.cache.get( this.config.channelID[0] @@ -92,7 +97,7 @@ export class BaseAgent extends Client { delay = ranInt(120, 3700), }: sendOptions = {} ) => { - if (this.captchaDetected) return; + if (this.captchaDetected || this.paused) return; if (delay) await this.sleep(delay); if (withPrefix) message = this.prefix + message; @@ -111,6 +116,7 @@ export class BaseAgent extends Client { ); [this.gem1, this.gem2, this.gem3] = Array(3).fill(undefined); this.config = this.cache; + if(force) return true }; public aDaily = async () => { @@ -141,7 +147,7 @@ export class BaseAgent extends Client { const nextShift = ranInt(38, 92); this.coutSleep += nextShift; - this.sleepTime = mapInt(this.coutSleep, 38, 92, 150_000, 1_000_000); + this.sleepTime = mapInt(nextShift, 38, 92, 150_000, 1_000_000); }; public aOther = async () => { @@ -182,8 +188,6 @@ export class BaseAgent extends Client { }; public aGem = async (uGem1: boolean, uGem2: boolean, uGem3: boolean) => { - if (this.captchaDetected) return; - await this.send("inv"); const filter = (msg: Message) => msg.author.id == this.owoID && @@ -225,7 +229,7 @@ export class BaseAgent extends Client { }; public main = async (): Promise => { - if (this.captchaDetected || Date.now() - this.lastTime < 15_000) return; + if (this.captchaDetected || this.paused || Date.now() - this.lastTime < 15_000) return; const command = this.owoCommands[ranInt(0, this.owoCommands.length)]; if (!command) { @@ -297,7 +301,7 @@ export class BaseAgent extends Client { ]; for (const command of commands) { - if (this.captchaDetected) return; + if (this.captchaDetected || this.paused) return; if (command.condition()) await command.action(); const delay = ranInt(15000, 22000) / commands.length; await this.sleep(ranInt(delay, delay + 1200)); diff --git a/src/typings/typings.ts b/src/typings/typings.ts index ef4ca4f..e84830f 100644 --- a/src/typings/typings.ts +++ b/src/typings/typings.ts @@ -1,4 +1,5 @@ import { ClientOptions, DMChannel, Message, TextChannel } from "discord.js-selfbot-v13"; +import { BaseAgent } from "../structures/BaseAgent.js"; export type agentOptions = { options?: ClientOptions; @@ -12,13 +13,13 @@ export type sendOptions = { export type CommandCondition = { condition: () => boolean; - action: () => Promise; + action: () => Promise; }; export type Commands = { name: string; description: string; - usage: string; - execute: (message: Message, args: string[]) => any; + // usage: string; + execute: (agent: BaseAgent, message: Message, ...args: string[]) => any; }; export const defaultConfig: Configuration = {