Merge branch 'main' of https://github.com/Xargana/blahaj-srv
This commit is contained in:
commit
2a7b83c3d1
|
@ -792,18 +792,12 @@ case "anime":
|
||||||
|
|
||||||
const { exec } = require('child_process');
|
const { exec } = require('child_process');
|
||||||
exec(`traceroute -m ${maxHops} ${target}`, async (error, stdout, stderr) => {
|
exec(`traceroute -m ${maxHops} ${target}`, async (error, stdout, stderr) => {
|
||||||
// windows version
|
const output = stdout || stderr || 'No response';
|
||||||
// exec(`tracert -d -h ${maxHops} ${target}`, async (error, stdout, stderr) => {
|
|
||||||
const traceEmbed = {
|
const traceEmbed = {
|
||||||
title: "Traceroute Results",
|
title: "Traceroute Results",
|
||||||
description: `Target: ${target}\nMax Hops: ${maxHops}`,
|
description: `Target: ${target}\nMax Hops: ${maxHops}\n\n\`\`\`\n${output}\`\`\``,
|
||||||
color: 0x3498db,
|
color: 0x3498db,
|
||||||
fields: [
|
|
||||||
{
|
|
||||||
name: "Path",
|
|
||||||
value: `\`\`\`${stdout || stderr || 'No response'}\`\`\``
|
|
||||||
}
|
|
||||||
],
|
|
||||||
timestamp: new Date(),
|
timestamp: new Date(),
|
||||||
footer: { text: "Network Diagnostics" }
|
footer: { text: "Network Diagnostics" }
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue