This commit is contained in:
Xargana 2025-03-30 09:53:03 +03:00
parent c89eddaa1c
commit 7e0c338719

View file

@ -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 = '';
@ -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`,