Merge branch 'main' of https://github.com/Xargana/blahaj-srv
This commit is contained in:
commit
98e3d92a75
|
@ -821,17 +821,15 @@ 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');
|
||||||
const tracepath = spawn('traceroute', ['-q', '1', '-d', '-m', `${maxHops}`, target, " | awk '{print $1, $2, $3}'"]);
|
// Simplify the command and avoid piping through awk which might cause issues
|
||||||
|
const tracepath = spawn('traceroute', ['-q', '1', '-d', '-m', `${maxHops}`, target]);
|
||||||
|
|
||||||
let output = '';
|
let output = '';
|
||||||
|
|
||||||
tracepath.stdout.on('data', async (data) => {
|
tracepath.stdout.on('data', async (data) => {
|
||||||
const newData = data.toString()
|
// Simply append the data without additional processing
|
||||||
.split('\n')
|
output += data.toString();
|
||||||
.map(line => line.trim())
|
|
||||||
.join('\n');
|
|
||||||
|
|
||||||
output += newData;
|
|
||||||
const traceEmbed = {
|
const traceEmbed = {
|
||||||
title: `Path to ${target}`,
|
title: `Path to ${target}`,
|
||||||
description: `\`\`\`\n${output}\`\`\``,
|
description: `\`\`\`\n${output}\`\`\``,
|
||||||
|
|
Loading…
Reference in a new issue