From 7e0c3387199229cd4e50afb30d10128f76e7a853 Mon Sep 17 00:00:00 2001 From: Xargana Date: Sun, 30 Mar 2025 09:53:03 +0300 Subject: [PATCH] a --- discord/index.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/discord/index.js b/discord/index.js index 6fbba3c..a5fe997 100644 --- a/discord/index.js +++ b/discord/index.js @@ -821,7 +821,7 @@ case "anime": const maxHops = interaction.options.getInteger("hops") || 16; const { spawn } = require('child_process'); - const tracepath = spawn('traceroute', ['-q 1', `-m ${maxHops}`, target, " | awk \'{print $1, $2, $3}\'"]); + const tracepath = spawn('traceroute', ['-q', '1', '-d', '-m', `${maxHops}`, target, " | awk '{print $1, $2, $3}'"]); let output = ''; @@ -830,7 +830,7 @@ case "anime": .split('\n') .map(line => line.trim()) .join('\n'); - + output += newData; const traceEmbed = { title: `Path to ${target}`, @@ -843,6 +843,10 @@ case "anime": await interaction.editReply({ embeds: [traceEmbed] }); }); + tracepath.stderr.on('data', (data) => { + console.log(`stderr: ${data}`); + }); + tracepath.on('close', async () => { const finalEmbed = { title: `Path to ${target} - Complete`, @@ -861,7 +865,7 @@ case "anime": ephemeral: true }); } - break; + break; case "whois": try { await interaction.deferReply();