whois: Issue a 'WHOIS' query and retrieve the response

Description Usage Arguments Details Value Examples

View source: R/whois.R

Description

WHOIS (pronounced as the phrase "who is") is a query and response protocol that is widely used for querying databases that store the registered users or assignees of an Internet resource, such as a domain name, an IP address block or an autonomous system, but is also used for a wider range of other information. The protocol stores and delivers database content in a human- readable format. The current iteration of the WHOIS protocol was drafted by the Internet Society, and is documented in RFC 3912.

Usage

1
2
3
4
5
6
whois(
  query,
  host = "whois.pwhois.org",
  port = 43L,
  timeout = getOption("timeout")
)

Arguments

query

<chr> the text query to send to the destination whois host

host

<chr> the WHOIS host to query; This defaults to The Prefix WhoIs Project WHOIS server (a.k.a. "pwhois") as it allows for more robust queries to be performed.

port

<int> TCP port the host WHOIS server is running on; defaults to 43 (the standard WHOIS port)

timeout

connection timeout; see connections

Details

The default server — whois.pwhois.org — is The Prefix WhoIs Project WHOIS server which provides a whois-compatible client and server framework for disclosing various up-to-date routing information. Instead of using registrar-originated network information (which is often unspecific or inaccurate), Prefix WhoIs uses the Internet's global routing table as gleaned from a number of routing peers around the world. Other sources of information, such as imported data from ARIN are also supported.

The pwhois service supports special query types including:

This function can also be used to query the Team Cymru WHOIS server which supports various enhanced queries. See the link for more information. tidy_cymru() can be used to post-process these responses.

Value

raw character response from the host WHOIS server. Use the built-in tidying functions to post-process the response.

Examples

1
2
3
4
5
whois("registry org-name=apple, inc") # 'registry' is only supported on pwhois
whois('type=cymru 17.253.144.10') # 'type=cymru' is only supported on pwhois
whois('type=rpsl 17.253.144.10') # 'type=rpsl' is only supported on pwhois
whois('-v AS23028', "whois.cymru.com") # this only works with the Team Cymru WHOIS service
whois("17.253.144.10")

hrbrmstr/pwhois documentation built on April 26, 2021, 5:45 a.m.