R package that queries WHOIS servers.
This package is available in CRAN.
install.packages("Rwhois")
To install the development or GIT repository version, this requires the “devtools” package available in CRAN.
Assuming you don’t already have devtools installed, run the following:
install.packages("devtools")
With devtools installed, it’s fairly simple to install the development branch:
library(devtools)
install_git("https://gitlab.com/BCable/Rwhois.git")
library(Rwhois)
# Grab WHOIS data for a hostname
whois_query("bcable.net")
# Grab WHOIS data for an IP
whois_query("1.1.1.1")
# Grab WHOIS data for a hostname from a different whois server
whois_query("bcable.net", server="whois.verisign-grs.com")
# Grab multiple vectorized results
<- c("bcable.net", "duckduckgo.com")
domains whois_query(domains)
# Extract Country Info About IP Addresses
<- c("1.1.1.1", "4.2.2.4", "8.8.8.8")
ip_addresses <- whois_query(ip_addresses)
ret <- whois_keyextract(ret, "country")
countries
# Extract Organization Info About Hostnames
<- whois_query(hostnames)
ret <- whois_keyextract(ret,
organization_names c("org-name", "orgname", "organisation", "organization")
)