diff --git a/discord/index.js b/discord/index.js index 0a4c8dc..e61eb5a 100644 --- a/discord/index.js +++ b/discord/index.js @@ -821,10 +821,7 @@ case "anime": const maxHops = interaction.options.getInteger("hops") || 16; const { spawn } = require('child_process'); - // Use shell option to properly handle the pipe - const tracepath = spawn('traceroute -q 1 -d -m ' + maxHops + ' ' + target + ' | awk \'{print $1, $2, $3}\'', { - shell: true - }); + const tracepath = spawn('traceroute', ['-q', '1', '-d', '-m', `${maxHops}`, target, " | awk '{print $1, $2, $3}'"]); let output = ''; @@ -868,7 +865,7 @@ case "anime": ephemeral: true }); } - break; + break; case "whois": try { await interaction.deferReply();