From 6680eaf7aeba1417203bbf2112243ec79a60abab Mon Sep 17 00:00:00 2001 From: William Harrison Date: Mon, 1 May 2023 12:39:57 +0800 Subject: [PATCH] Update ping.js --- scripts/ping.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/ping.js b/scripts/ping.js index b0a3022..58846e1 100644 --- a/scripts/ping.js +++ b/scripts/ping.js @@ -11,8 +11,7 @@ fs.readdirSync("domains").forEach(async (file) => { if (recordType === "A" || recordType === "AAAA") { for (const val of recordValue) { try { - const ping = await exec(`ping -c 1 ${recordValue}`); - console.log(ping); + await exec(`ping -c 1 ${recordValue}`); console.log(`PASS ${domain} ${recordType} ${val}`); fs.appendFileSync("ping_results.txt", `PASS ${domain} ${recordType} ${val}\n`); } catch { @@ -22,8 +21,7 @@ fs.readdirSync("domains").forEach(async (file) => { } } else if (recordType === "CNAME") { try { - const ping = await exec(`ping -c 1 ${recordValue}`); - console.log(ping); + await exec(`ping -c 1 ${recordValue}`); console.log(`PASS ${domain} ${recordType} ${recordValue}`); fs.appendFileSync("ping_results.txt", `PASS ${domain} ${recordType} ${recordValue}\n`); } catch {