You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

75 lines
3.4 KiB

% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/whois.R
\name{whois}
\alias{whois}
\title{Issue a 'WHOIS' query and retrieve the response}
\usage{
whois(
query,
host = "whois.pwhois.org",
port = 43L,
timeout = getOption("timeout")
)
}
\arguments{
\item{query}{<chr> the text query to send to the destination whois \code{host}}
\item{host}{<chr> the WHOIS host to query; This defaults to
\href{https://pwhois.org/}{The Prefix WhoIs Project} WHOIS server
(a.k.a. "pwhois") as it allows for more robust queries to be performed.}
\item{port}{<int> TCP port the \code{host} WHOIS server is running on;
defaults to \code{43} (the standard WHOIS port)}
\item{timeout}{connection timeout; see \link{connections}}
}
\value{
raw character response from the \code{host} WHOIS server. Use
the built-in tidying functions to post-process the response.
}
\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.
}
\details{
The default server\code{whois.pwhois.org}is \href{https://pwhois.org/}{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:
\itemize{
\item \verb{registry key=value}: you can search the pwhois database for any registry
field. The ones available at the time of the date on
this package are: "\code{Origin-AS}", "\verb{Prefix"}, "\verb{AS-Path"},
"\code{AS-Org-Name}", "\code{Org-Name}", "\code{Net-Name}", "\code{Cache-Date}",
"\code{Latitude}", "\code{Longitude}", "\verb{City"}, "\verb{Region"} ,
"\verb{Country"} , and "\code{Country-Code}"
\item \code{type=cymru}: The record(s) will be returned in
\href{https://team-cymru.com/community-services/ip-asn-mapping/}{Team Cymru format}
and \code{\link[=tidy_cymru]{tidy_cymru()}} can be used to post-process the response.
\item \code{type=rpsl}: The record(s) will be returned in
\href{https://tools.ietf.org/html/rfc2650}{Routing Policy Specification Language}
(RPSL) format. A 'tidy' post-processor is on the TODO list. PRs are welcome.
}
This function can also be used to query the
\href{https://team-cymru.com/community-services/ip-asn-mapping/}{Team Cymru WHOIS}
server which supports various enhanced queries. See the link for more
information. \code{\link[=tidy_cymru]{tidy_cymru()}} can be used to post-process these responses.
}
\examples{
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")
}