This commit is contained in:
root 2025-03-30 08:26:29 +01:00
commit 622d2d1eb4

View file

@ -821,10 +821,7 @@ case "anime":
const maxHops = interaction.options.getInteger("hops") || 16; const maxHops = interaction.options.getInteger("hops") || 16;
const { spawn } = require('child_process'); 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}'"]);
const tracepath = spawn('traceroute -q 1 -d -m ' + maxHops + ' ' + target + ' | awk \'{print $1, $2, $3}\'', {
shell: true
});
let output = ''; let output = '';
@ -868,7 +865,7 @@ case "anime":
ephemeral: true ephemeral: true
}); });
} }
break; break;
case "whois": case "whois":
try { try {
await interaction.deferReply(); await interaction.deferReply();