a
This commit is contained in:
parent
eee954968b
commit
13780eca8f
|
@ -821,15 +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]);
|
const tracepath = spawn('traceroute', ['-q', '1', '-d', '-m', `${maxHops}`, target, " | awk '{print $1, $2, $3}'"]);
|
||||||
|
|
||||||
let output = '';
|
let output = '';
|
||||||
|
|
||||||
tracepath.stdout.on('data', async (data) => {
|
tracepath.stdout.on('data', async (data) => {
|
||||||
const newData = data.toString()
|
const newData = data.toString()
|
||||||
.split('\n')
|
.split('\n')
|
||||||
.map(line => line.trim())
|
.map(line => line.trim())
|
||||||
.join('\n');
|
.join('\n');
|
||||||
|
|
||||||
output += newData;
|
output += newData;
|
||||||
const traceEmbed = {
|
const traceEmbed = {
|
||||||
|
|
Loading…
Reference in a new issue