resolv_a: Returns the DNS A records for a given FQDN

Description Usage Arguments Value See Also Examples

Description

Returns the DNS A records for a given FQDN

Usage

1
2
resolv_a(fqdn, nameserver = NA_character_, showWarnings = FALSE,
  full = FALSE)

Arguments

fqdn

input character vector (FQDN)

nameserver

the nameserver to send the request to (optional; uses standard resolver behavior if not specified)

showWarnings

display R warning messages (bool)

full

include full record response information in results (bool)

Value

vector or data frame (if full==TRUE) of A records or character(0) if none

See Also

http://www.nlnetlabs.nl/projects/ldns/

http://www.cambus.net/interesting-dns-hacks/ (cool DNS A hacks vla https://twitter.com/habbie/status/460067198586081280)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
require(resolv)

## single address return
resolv_a("etsy.com")
[1] "38.106.64.123"

## multiple address returns
resolv_a("google.com")
[1] "173.194.43.0"  "173.194.43.1"  "173.194.43.2"  "173.194.43.3"
[5] "173.194.43.4"  "173.194.43.5"  "173.194.43.6"  "173.194.43.7"
[9] "173.194.43.8"  "173.194.43.9"  "173.194.43.14"

## must put at least one DNS hack in
resolv_a("10.15.add.calc.postel.org", "dns.postel.org")
[1] "0.25.0.0"

## End(Not run)

hrbrmstr/resolv documentation built on May 17, 2019, 5:12 p.m.