Created
December 18, 2015 16:05
-
-
Save seripap/d0cd7bc2ac151d0f32c9 to your computer and use it in GitHub Desktop.
DNS domain check
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
import dns from "dns"; | |
import sys from "sys"; | |
import fs from "fs"; | |
const items = JSON.parse(fs.readFileSync('./shake.json')); | |
function checkAvailable(name, callback) { | |
dns.resolve4( name, (err, addresses) => { | |
if (err) console.log (name + " is possibly available : " + err) | |
}); | |
} | |
for (let i = 0; i < items.length; i++) { | |
checkAvailable(items[i] + ".com", sys.puts); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment