Created
April 11, 2017 19:32
-
-
Save ctigeek/d8e771b518b120b905f75e8b543a655a to your computer and use it in GitHub Desktop.
Load whois servers from @weppos's repo.
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
if (-not $hostMap) { | |
$whoisHostMapUrl = "https://raw.githubusercontent.com/weppos/whois/master/data/tld.json" | |
$raw = Invoke-RestMethod $whoisHostMapUrl | |
$hostMap = @{} | |
$raw.psobject.Properties | ?{ $_.Value.host } | Foreach { $hostMap[$_.Name] = $_.Value.host } | |
} | |
## $hostMap["com"] will return whois.verisign-grs.com | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment