From c97226ebc3b77d2d75dcae1b7ebda821ced4b80a Mon Sep 17 00:00:00 2001 From: boB Rudis Date: Thu, 27 Jun 2019 11:19:48 -0400 Subject: [PATCH] JSON API endpoint --- .Rbuildignore | 1 + DESCRIPTION | 7 +- NAMESPACE | 4 + NEWS.md | 7 + R/as-data-frame.R | 35 +++++ R/datasets.R | 89 ++++++++++++ R/utils-pipe.R | 11 ++ R/zbulk-query.R | 26 ++-- R/zgdns.r | 42 ++++-- README.Rmd | 69 ++++++--- README.md | 288 ++++++++++++++++++------------------- cran-comments.md | 14 +- data-raw/rrtypes.R | 95 ++++++++++++ data/dns_classes.rda | Bin 0 -> 744 bytes data/dns_glob_names.rda | Bin 0 -> 773 bytes data/dns_opcodes.rda | Bin 0 -> 474 bytes data/dns_rcodes.rda | Bin 0 -> 1012 bytes data/edns0_option_codes.rda | Bin 0 -> 922 bytes data/resource_record_tbl.rda | Bin 3015 -> 3044 bytes data/rrtypes.rda | Bin 0 -> 2974 bytes man/as.data.frame.gdns_response.Rd | 16 +++ man/bulk_query.Rd | 9 +- man/dns_classes.Rd | 26 ++++ man/dns_glob_names.Rd | 24 ++++ man/dns_opcodes.Rd | 24 ++++ man/dns_rcodes.Rd | 24 ++++ man/edns0_option_codes.Rd | 26 ++++ man/pipe.Rd | 12 ++ man/query.Rd | 28 +++- man/rrtypes.Rd | 24 ++++ tests/testthat/test-gdns.R | 2 +- 31 files changed, 693 insertions(+), 210 deletions(-) create mode 100644 R/as-data-frame.R create mode 100644 R/datasets.R create mode 100644 R/utils-pipe.R create mode 100644 data-raw/rrtypes.R create mode 100644 data/dns_classes.rda create mode 100644 data/dns_glob_names.rda create mode 100644 data/dns_opcodes.rda create mode 100644 data/dns_rcodes.rda create mode 100644 data/edns0_option_codes.rda create mode 100644 data/rrtypes.rda create mode 100644 man/as.data.frame.gdns_response.Rd create mode 100644 man/dns_classes.Rd create mode 100644 man/dns_glob_names.Rd create mode 100644 man/dns_opcodes.Rd create mode 100644 man/dns_rcodes.Rd create mode 100644 man/edns0_option_codes.Rd create mode 100644 man/pipe.Rd create mode 100644 man/rrtypes.Rd diff --git a/.Rbuildignore b/.Rbuildignore index 554caf6..d5930a9 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -7,3 +7,4 @@ ^cran-comments\.md$ ^docs$ ^tools$ +^data-raw$ diff --git a/DESCRIPTION b/DESCRIPTION index 1907581..c012972 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: gdns Title: Tools to Work with Google's 'DNS-over-HTTPS' ('DoH') 'API' -Version: 0.3.1 +Version: 0.4.0 Authors@R: c( person("Bob", "Rudis", email = "bob@rud.is", role = c("aut", "cre"), comment = c(ORCID = "0000-0001-5670-2640")) @@ -26,5 +26,6 @@ Imports: httr, stats, jsonlite, - stringi -RoxygenNote: 6.0.1.9000 + stringi, + magrittr +RoxygenNote: 6.1.1 diff --git a/NAMESPACE b/NAMESPACE index 25e4115..5bde8ab 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,6 +1,9 @@ # Generated by roxygen2: do not edit by hand +S3method(as.data.frame,gdns_response) +export("%>%") export(bulk_query) +export(dig) export(has_spf) export(is_hard_fail) export(is_soft_fail) @@ -14,6 +17,7 @@ export(spf_ptrs) export(split_spf) import(httr) importFrom(jsonlite,fromJSON) +importFrom(magrittr,"%>%") importFrom(stats,terms) importFrom(stringi,stri_detect_fixed) importFrom(stringi,stri_enc_toutf8) diff --git a/NEWS.md b/NEWS.md index 099ed16..63dba98 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,10 @@ +# gdns 0.4.0 + +* Updated the JSON API endpoint per Google notification +* Added `dig()` alias for `query()` +* Added an `as.data.frame()` coercer for query results +* Added IANA DNS-related datasets + # gdns 0.3.1 * fixed bug in `bulk_query()` diff --git a/R/as-data-frame.R b/R/as-data-frame.R new file mode 100644 index 0000000..c24fbba --- /dev/null +++ b/R/as-data-frame.R @@ -0,0 +1,35 @@ +#' Coerce a gdns query response answer to a data frame +#' +#' Helper function to get to the `Answer` quickly +#' @param x a `gdns_response` object +#' @param ... unused +#' @export +as.data.frame.gdns_response <- function(x, ...) { + + if (length(x[["Answer"]]) == 0) { + data.frame( + name = NA_character_, + type = NA_character_, + ttl = NA_character_, + data = NA_character_, + stringsAsFactors = FALSE + ) -> out + } else { + out <- x[["Answer"]] + } + + if (length(x[["Question"]][["name"]])) { + out[["query"]] <- x[["Question"]][["name"]][[1]] + out[["qtype"]] <- x[["Question"]][["type"]][[1]] + } else { + out[["query"]] <- NA_character_ + out[["qtype"]] <- NA_character_ + } + + colnames(out) <- tolower(colnames(out)) + out <- out[,c("query", "qtype", "name", "type", "ttl", "data")] + + class(out) <- c("tbl_df", "tbl", "data.frame") + out + +} diff --git a/R/datasets.R b/R/datasets.R new file mode 100644 index 0000000..8564031 --- /dev/null +++ b/R/datasets.R @@ -0,0 +1,89 @@ +# This file is autogenerated. Do not edit by hand. +# Last refresh: 2019-06-27 11:16:48 + +#' @md +#' @title DNS CLASSes (dataset) +#' @description DNS CLASSes +#' @format data frame with columns: `decimal`, `hexadecimal`, `name`, `reference` +#' @docType data +#' @keywords datasets +#' @name dns_classes +#' @references +#' @references +#' @references rfc6895 +#' @note As noted in , Multicast DNS can only carry DNS records with classes in the range 0-32767. Classes in the range 32768 to 65535 are incompatible with Multicast DNS. +#' @note Last updated 2019-06-27 11:16:48 +#' @usage data('dns_classes') +NULL + +#' @md +#' @title Resource Record (RR) TYPEs (dataset) +#' @description Resource Record (RR) TYPEs +#' @format data frame with columns: `type`, `value`, `meaning`, `reference`, `template`, `registration_date` +#' @docType data +#' @keywords datasets +#' @name rrtypes +#' @references +#' @references +#' @references rfc6895, rfc1035 +#' @note Last updated 2019-06-27 11:16:48 +#' @usage data('rrtypes') +NULL + +#' @md +#' @title DNS OpCodes (dataset) +#' @description DNS OpCodes +#' @format data frame with columns: `op_code`, `name`, `reference` +#' @docType data +#' @keywords datasets +#' @name dns_opcodes +#' @references +#' @references +#' @references rfc6895, rfc1035 +#' @note Last updated 2019-06-27 11:16:48 +#' @usage data('dns_opcodes') +NULL + +#' @md +#' @title DNS RCODEs (dataset) +#' @description DNS RCODEs +#' @format data frame with columns: `rcode`, `name`, `description`, `reference` +#' @docType data +#' @keywords datasets +#' @name dns_rcodes +#' @references +#' @references +#' @references rfc6895, rfc1035 +#' @note Last updated 2019-06-27 11:16:48 +#' @usage data('dns_rcodes') +NULL + +#' @md +#' @title DNS EDNS0 Option Codes (OPT) (dataset) +#' @description DNS EDNS0 Option Codes (OPT) +#' @format data frame with columns: `value`, `name`, `status`, `reference` +#' @docType data +#' @keywords datasets +#' @name edns0_option_codes +#' @references +#' @references +#' @references rfc6891, 3604 +#' @note Registrations made by standards-track documents are listed as "Standard," and by non-standards-track documents as "Optional." Registrations for which there are no final specifications are listed as "On-Hold." +#' @note Last updated 2019-06-27 11:16:48 +#' @usage data('edns0_option_codes') +NULL + +#' @md +#' @title Underscored and Globally Scoped DNS Node Names (dataset) +#' @description Underscored and Globally Scoped DNS Node Names +#' @format data frame with columns: `rr_type`, `node_name`, `reference` +#' @docType data +#' @keywords datasets +#' @name dns_glob_names +#' @references +#' @references +#' @references rfc8552 +#' @note Last updated 2019-06-27 11:16:48 +#' @usage data('dns_glob_names') +NULL + diff --git a/R/utils-pipe.R b/R/utils-pipe.R new file mode 100644 index 0000000..fb8c818 --- /dev/null +++ b/R/utils-pipe.R @@ -0,0 +1,11 @@ +#' Pipe operator +#' +#' See \code{magrittr::\link[magrittr]{\%>\%}} for details. +#' +#' @name %>% +#' @rdname pipe +#' @keywords internal +#' @export +#' @importFrom magrittr %>% +#' @usage lhs \%>\% rhs +NULL diff --git a/R/zbulk-query.R b/R/zbulk-query.R index b2c3531..b97575c 100644 --- a/R/zbulk-query.R +++ b/R/zbulk-query.R @@ -4,6 +4,10 @@ #' @param type RR type can be represented as a number in [1, 65535] or canonical #' string (A, aaaa, etc). More information on RR types can be #' found \href{http://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4}{here}. +#' @param cd (Checking Disabled) flag. Use `TRUE` to disable DNSSEC validation; +#' Default: `FALSE`. +#' @param do (DNSSEC OK) flag. Use `TRUE` include DNSSEC records (RRSIG, NSEC, NSEC3); +#' Default: `FALSE`. #' @param edns_client_subnet The edns0-client-subnet option. Format is an IP #' address with a subnet mask. Examples: \code{1.2.3.4/24}, #' \code{2001:700:300::/48}.\cr @@ -22,27 +26,19 @@ #' @examples #' hosts <- c("rud.is", "r-project.org", "rstudio.com", "apple.com") #' gdns::bulk_query(hosts) -bulk_query <- function(entities, type = 1, edns_client_subnet = "0.0.0.0/0") { +bulk_query <- function(entities, type = 1, cd = FALSE, do = FALSE, + edns_client_subnet = "0.0.0.0/0") { lapply( entities, - query, type = type, edns_client_subnet = edns_client_subnet + query, type = type, cd = cd, + edns_client_subnet = edns_client_subnet ) -> results lapply(seq_along(results), function(idx) { - if (length(results[[idx]]$Answer) == 0) { - data.frame( - entity = entities[idx], - name = NA_character_, - type = NA_character_, - TTL = NA_character_, - data = NA_character_, - stringsAsFactors = FALSE - ) - } else { - results[[idx]]$Answer$entity <- entities[[idx]] - results[[idx]]$Answer - } + res <- as.data.frame(results[[idx]]) + res$entity <- entities[[idx]] + res }) -> xlst xdf <- do.call(rbind.data.frame, xlst) diff --git a/R/zgdns.r b/R/zgdns.r index 21970c9..0083162 100644 --- a/R/zgdns.r +++ b/R/zgdns.r @@ -30,6 +30,16 @@ S_GET <- safely(httr::GET) #' string (A, aaaa, etc). More information on RR types can be #' found \href{http://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4}{here}. #' You can use \code{255} for an \code{ANY} query. +#' @param cd (Checking Disabled) flag. Use `TRUE` to disable DNSSEC validation; +#' Default: `FALSE`. +#' @param do (DNSSEC OK) flag. Use `TRUE` include DNSSEC records (RRSIG, NSEC, NSEC3); +#' Default: `FALSE`. +#' @param random_padding clients concerned about possible side-channel privacy +#' attacks using the packet sizes of HTTPS GET requests can use this to +#' make all requests exactly the same size by padding requests with random data. +#' To prevent misinterpretation of the URL, restrict the padding characters to +#' the unreserved URL characters: upper- and lower-case letters, digits, +#' hyphen, period, underscore and tilde. #' @param edns_client_subnet The edns0-client-subnet option. Format is an IP #' address with a subnet mask. Examples: \code{1.2.3.4/24}, #' \code{2001:700:300::/48}.\cr @@ -40,16 +50,22 @@ S_GET <- safely(httr::GET) #' approximate network information (usually replacing the last part of #' your IPv4 address with zeroes). \code{0.0.0.0/0} is the default. #' @return a \code{list} with the query result or \code{NULL} if an error occurred -#' @references \url{https://developers.google.com/speed/public-dns/docs/dns-over-https} +#' @references #' @export #' @examples #' query("rud.is") -#' query("example.com", "255") # ANY query +#' dig("example.com", "255") # ANY query #' query("microsoft.com", "MX") -#' query("google-public-dns-a.google.com", "TXT") +#' dig("google-public-dns-a.google.com", "TXT") #' query("apple.com") -#' query("17.142.160.59", "PTR") -query <- function(name, type="1", edns_client_subnet="0.0.0.0/0") { +#' dig("17.142.160.59", "PTR") +query <- function(name, type = "1", cd = FALSE, do = FALSE, + edns_client_subnet = "0.0.0.0/0", + random_padding = NULL) { + + name <- name[1] + + # helper to turn IPv4 addresses in to in-addr.arpa. if (grepl(ipv4_regex, name)) { name <- paste0(c(rev(unlist(stringi::stri_split_fixed(name, ".", 4))), @@ -58,11 +74,15 @@ query <- function(name, type="1", edns_client_subnet="0.0.0.0/0") { } res <- S_GET( - url = "https://dns.google.com/resolve", + url = "https://dns.google/resolve", query = list( name = name, type = type, - edns_client_subnet = edns_client_subnet + cd = if (cd) 1 else 0, + do = if (do) 1 else 0, + ct = "application/x-javascript", + edns_client_subnet = edns_client_subnet, + random_padding = random_padding ) ) @@ -71,9 +91,15 @@ query <- function(name, type="1", edns_client_subnet="0.0.0.0/0") { txt <- httr::content(res$result, as="text") txt <- stringi::stri_enc_toascii(txt) txt <- stringi::stri_replace_all_regex(txt, "[[:cntrl:][:blank:]\\n ]+", " ") - jsonlite::fromJSON(txt) + out <- jsonlite::fromJSON(txt) + class(out) <- c("gdns_response", "list") + out } else { NULL } } + +#' @rdname query +#' @export +dig <- query diff --git a/README.Rmd b/README.Rmd index ccdea9c..cc6f7ae 100644 --- a/README.Rmd +++ b/README.Rmd @@ -1,34 +1,48 @@ --- output: rmarkdown::github_document +editor_options: + chunk_output_type: console --- -```{r, echo = FALSE} +```{r include=FALSE} knitr::opts_chunk$set( - collapse = TRUE, - comment = "#>", - fig.path = "README-" + message = FALSE, + warning = FALSE, + fig.retina = 2 ) +options(width=120) ``` + [![Travis-CI Build Status](https://travis-ci.org/hrbrmstr/gdns.svg?branch=master)](https://travis-ci.org/hrbrmstr/gdns) -`gdns` : Tools to work with the Google DNS over HTTPS API +# gdns + +Tools to work with the Google DNS over HTTPS (DoH) API + +## Description Traditional DNS queries and responses are sent over UDP or TCP without encryption. This is vulnerable to eavesdropping and spoofing (including DNS-based Internet filtering). Responses from recursive resolvers to clients are the most vulnerable to undesired or malicious changes, while communications between recursive resolvers and authoritative nameservers often incorporate additional protection. To address this problem, Google Public DNS offers DNS resolution over an encrypted HTTPS connection. DNS-over-HTTPS greatly enhances privacy and security between a client and a recursive resolver, and complements DNSSEC to provide end-to-end authenticated DNS lookups. -More info at . +More info at . The following functions are implemented: +Core: + +- `query` / `dig`: Perform DNS over HTTPS queries using Google - `bulk_query`: Vectorized query, returning only answers in a data frame +- `as.data.frame`: Coerce a gdns query response answer to a data frame + +Helpers: + - `has_spf`: Test for whether a DNS TXT record is an SPF record - `is_hard_fail`: SPF "all" type test - `is_soft_fail`: SPF "all" type test - `passes_all`: SPF "all" type test -- `query`: Perform DNS over HTTPS queries using Google - `spf_exists`: SPF field extraction functions - `spf_includes`: SPF field extraction functions - `spf_ipv4s`: SPF field extraction functions @@ -36,9 +50,24 @@ The following functions are implemented: - `spf_ptrs`: SPF field extraction functions - `split_spf`: Split out all SPF records in a domain's TXT record +IANA Datasets: + +- `dns_classes`: DNS CLASSes (dataset) +- `dns_glob_names`: Underscored and Globally Scoped DNS Node Names (dataset) +- `dns_opcodes`: DNS OpCodes (dataset) +- `dns_rcodes`: DNS RCODEs (dataset) +- `edns0_option_codes`: DNS EDNS0 Option Codes (OPT) (dataset) +- `rrtypes`: Resource Record (RR) TYPEs (dataset) + ### Installation +Any of the following: + ```{r eval=FALSE} +install("gdns", repos = "https://cinc.rud.is") +devtools::install_git("https://git.rud.is/hrbrmstr/gdns") +devtools::install_bitbucket("hrbrmstr/gdns") +devtools::install_gitlab("hrbrmstr/gdns") devtools::install_github("hrbrmstr/gdns") ``` @@ -50,39 +79,37 @@ options(width=120) ```{r} library(gdns) +library(tibble) # for printing # current verison packageVersion("gdns") str(query("rud.is")) -str(query("example.com", "255")) # "ANY" query +query("rud.is") %>% + as.data.frame() -str(query("microsoft.com", "MX")) +str(dig("example.com", "255")) # "ANY" query -str(query("google-public-dns-a.google.com", "TXT")) +query("microsoft.com", "MX") %>% + as.data.frame() -str(query("apple.com")) +as.data.frame(query("apple.com")) -str(query("17.142.160.59", "PTR")) +as.data.frame(dig("17.142.160.59", "PTR")) hosts <- c("rud.is", "dds.ec", "r-project.org", "rstudio.com", "apple.com") gdns::bulk_query(hosts) ``` -### Test Results - -```{r} -library(gdns) -library(testthat) - -date() +## gdns Metrics -test_dir("tests/") +```{r cloc, echo=FALSE} +cloc::cloc_pkg_md() ``` -### Code of Conduct +## Code of Conduct Please note that this project is released with a [Contributor Code of Conduct](CONDUCT.md). By participating in this project you agree to abide by its terms. diff --git a/README.md b/README.md index c872006..a02ad00 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,11 @@ [![Travis-CI Build Status](https://travis-ci.org/hrbrmstr/gdns.svg?branch=master)](https://travis-ci.org/hrbrmstr/gdns) -`gdns` : Tools to work with the Google DNS over HTTPS API +# gdns + +Tools to work with the Google DNS over HTTPS (DoH) API + +## Description Traditional DNS queries and responses are sent over UDP or TCP without encryption. This is vulnerable to eavesdropping and spoofing (including @@ -18,18 +22,23 @@ encrypted HTTPS connection. DNS-over-HTTPS greatly enhances privacy and security between a client and a recursive resolver, and complements DNSSEC to provide end-to-end authenticated DNS lookups. -More info at -. +More info at . The following functions are implemented: +Core: + + - `query` / `dig`: Perform DNS over HTTPS queries using Google - `bulk_query`: Vectorized query, returning only answers in a data frame + - `as.data.frame`: Coerce a gdns query response answer to a data frame + +Helpers: + - `has_spf`: Test for whether a DNS TXT record is an SPF record - `is_hard_fail`: SPF “all” type test - `is_soft_fail`: SPF “all” type test - `passes_all`: SPF “all” type test - - `query`: Perform DNS over HTTPS queries using Google - `spf_exists`: SPF field extraction functions - `spf_includes`: SPF field extraction functions - `spf_ipv4s`: SPF field extraction functions @@ -37,9 +46,25 @@ The following functions are implemented: - `spf_ptrs`: SPF field extraction functions - `split_spf`: Split out all SPF records in a domain’s TXT record +IANA Datasets: + + - `dns_classes`: DNS CLASSes (dataset) + - `dns_glob_names`: Underscored and Globally Scoped DNS Node Names + (dataset) + - `dns_opcodes`: DNS OpCodes (dataset) + - `dns_rcodes`: DNS RCODEs (dataset) + - `edns0_option_codes`: DNS EDNS0 Option Codes (OPT) (dataset) + - `rrtypes`: Resource Record (RR) TYPEs (dataset) + ### Installation +Any of the following: + ``` r +install("gdns", repos = "https://cinc.rud.is") +devtools::install_git("https://git.rud.is/hrbrmstr/gdns") +devtools::install_bitbucket("hrbrmstr/gdns") +devtools::install_gitlab("hrbrmstr/gdns") devtools::install_github("hrbrmstr/gdns") ``` @@ -47,163 +72,130 @@ devtools::install_github("hrbrmstr/gdns") ``` r library(gdns) +library(tibble) # for printing # current verison packageVersion("gdns") -#> [1] '0.3.1' +``` + ## [1] '0.4.0' + +``` r str(query("rud.is")) -#> List of 10 -#> $ Status : int 0 -#> $ TC : logi FALSE -#> $ RD : logi TRUE -#> $ RA : logi TRUE -#> $ AD : logi FALSE -#> $ CD : logi FALSE -#> $ Question :'data.frame': 1 obs. of 2 variables: -#> ..$ name: chr "rud.is." -#> ..$ type: int 1 -#> $ Answer :'data.frame': 1 obs. of 4 variables: -#> ..$ name: chr "rud.is." -#> ..$ type: int 1 -#> ..$ TTL : int 1152 -#> ..$ data: chr "104.236.112.222" -#> $ Additional : list() -#> $ edns_client_subnet: chr "0.0.0.0/0" - -str(query("example.com", "255")) # "ANY" query -#> List of 10 -#> $ Status : int 0 -#> $ TC : logi FALSE -#> $ RD : logi TRUE -#> $ RA : logi TRUE -#> $ AD : logi TRUE -#> $ CD : logi FALSE -#> $ Question :'data.frame': 1 obs. of 2 variables: -#> ..$ name: chr "example.com." -#> ..$ type: int 255 -#> $ Answer :'data.frame': 20 obs. of 4 variables: -#> ..$ name: chr [1:20] "example.com." "example.com." "example.com." "example.com." ... -#> ..$ type: int [1:20] 6 46 47 46 2 2 46 28 46 1 ... -#> ..$ TTL : int [1:20] 3562 3562 3562 21562 21562 21562 21562 21562 21562 21562 ... -#> ..$ data: chr [1:20] "sns.dns.icann.org. noc.dns.icann.org. 2018080125 7200 3600 1209600 3600" "nsec 8 2 3600 1538855995 1537006806 63855 example.com. pFyGCdsJ2uw2FcRlszW1VuM6FRV1rHbBfeBmp/Jaecdth8njienGYt2k"| __truncated__ "www.example.com. A NS SOA TXT AAAA RRSIG NSEC DNSKEY" "ns 8 2 86400 1538826642 1537014006 63855 example.com. U7KJg6I3XylL5aT10B3tHw9MIV8QoHBlmzO3CwghRh4I00ZzF2IgjakMp"| __truncated__ ... -#> $ Additional : list() -#> $ edns_client_subnet: chr "0.0.0.0/0" - -str(query("microsoft.com", "MX")) -#> List of 11 -#> $ Status : int 0 -#> $ TC : logi FALSE -#> $ RD : logi TRUE -#> $ RA : logi TRUE -#> $ AD : logi FALSE -#> $ CD : logi FALSE -#> $ Question :'data.frame': 1 obs. of 2 variables: -#> ..$ name: chr "microsoft.com." -#> ..$ type: int 15 -#> $ Answer :'data.frame': 1 obs. of 4 variables: -#> ..$ name: chr "microsoft.com." -#> ..$ type: int 15 -#> ..$ TTL : int 3599 -#> ..$ data: chr "10 microsoft-com.mail.protection.outlook.com." -#> $ Additional : list() -#> $ edns_client_subnet: chr "0.0.0.0/0" -#> $ Comment : chr "Response from 208.76.45.53." - -str(query("google-public-dns-a.google.com", "TXT")) -#> List of 10 -#> $ Status : int 0 -#> $ TC : logi FALSE -#> $ RD : logi TRUE -#> $ RA : logi TRUE -#> $ AD : logi FALSE -#> $ CD : logi FALSE -#> $ Question :'data.frame': 1 obs. of 2 variables: -#> ..$ name: chr "google-public-dns-a.google.com." -#> ..$ type: int 16 -#> $ Answer :'data.frame': 1 obs. of 4 variables: -#> ..$ name: chr "google-public-dns-a.google.com." -#> ..$ type: int 16 -#> ..$ TTL : int 21432 -#> ..$ data: chr "\"http://xkcd.com/1361/\"" -#> $ Additional : list() -#> $ edns_client_subnet: chr "0.0.0.0/0" - -str(query("apple.com")) -#> List of 10 -#> $ Status : int 0 -#> $ TC : logi FALSE -#> $ RD : logi TRUE -#> $ RA : logi TRUE -#> $ AD : logi FALSE -#> $ CD : logi FALSE -#> $ Question :'data.frame': 1 obs. of 2 variables: -#> ..$ name: chr "apple.com." -#> ..$ type: int 1 -#> $ Answer :'data.frame': 3 obs. of 4 variables: -#> ..$ name: chr [1:3] "apple.com." "apple.com." "apple.com." -#> ..$ type: int [1:3] 1 1 1 -#> ..$ TTL : int [1:3] 2635 2635 2635 -#> ..$ data: chr [1:3] "17.172.224.47" "17.178.96.59" "17.142.160.59" -#> $ Additional : list() -#> $ edns_client_subnet: chr "0.0.0.0/0" - -str(query("17.142.160.59", "PTR")) -#> List of 10 -#> $ Status : int 0 -#> $ TC : logi FALSE -#> $ RD : logi TRUE -#> $ RA : logi TRUE -#> $ AD : logi FALSE -#> $ CD : logi FALSE -#> $ Question :'data.frame': 1 obs. of 2 variables: -#> ..$ name: chr "59.160.142.17.in-addr.arpa." -#> ..$ type: int 12 -#> $ Answer :'data.frame': 5 obs. of 4 variables: -#> ..$ name: chr [1:5] "59.160.142.17.in-addr.arpa." "59.160.142.17.in-addr.arpa." "59.160.142.17.in-addr.arpa." "59.160.142.17.in-addr.arpa." ... -#> ..$ type: int [1:5] 12 12 12 12 12 -#> ..$ TTL : int [1:5] 3588 3588 3588 3588 3588 -#> ..$ data: chr [1:5] "apple.by." "apple.com." "pv-apple-com.apple.com." "ipad.host." ... -#> $ Additional : list() -#> $ edns_client_subnet: chr "0.0.0.0/0" +``` -hosts <- c("rud.is", "dds.ec", "r-project.org", "rstudio.com", "apple.com") + ## List of 11 + ## $ Status : int 0 + ## $ TC : logi FALSE + ## $ RD : logi TRUE + ## $ RA : logi TRUE + ## $ AD : logi FALSE + ## $ CD : logi FALSE + ## $ Question :'data.frame': 1 obs. of 2 variables: + ## ..$ name: chr "rud.is." + ## ..$ type: int 1 + ## $ Answer :'data.frame': 1 obs. of 4 variables: + ## ..$ name: chr "rud.is." + ## ..$ type: int 1 + ## ..$ TTL : int 3599 + ## ..$ data: chr "172.93.49.183" + ## $ Additional : list() + ## $ edns_client_subnet: chr "0.0.0.0/0" + ## $ Comment : chr "Response from 84.246.124.75." + ## - attr(*, "class")= chr [1:2] "gdns_response" "list" -gdns::bulk_query(hosts) -#> name type TTL data entity -#> 1 rud.is. 1 1151 104.236.112.222 rud.is -#> 2 dds.ec. 1 599 185.53.178.9 dds.ec -#> 3 r-project.org. 1 7031 137.208.57.37 r-project.org -#> 4 rstudio.com. 1 3431 104.196.200.5 rstudio.com -#> 5 apple.com. 1 2718 17.178.96.59 apple.com -#> 6 apple.com. 1 2718 17.142.160.59 apple.com -#> 7 apple.com. 1 2718 17.172.224.47 apple.com +``` r +query("rud.is") %>% + as.data.frame() ``` -### Test Results + ## # A tibble: 1 x 6 + ## query qtype name type ttl data + ## * + ## 1 rud.is. 1 rud.is. 1 3599 172.93.49.183 ``` r -library(gdns) -library(testthat) - -date() -#> [1] "Sun Sep 16 13:23:55 2018" - -test_dir("tests/") -#> ✔ | OK F W S | Context -#> ══ testthat results ═════════════════════════════════════════════════════════════════════════════════════════ -#> OK: 2 SKIPPED: 0 FAILED: 0 -#> -#> ══ Results ═══════════════════════════════════════════════════════════════════════════════════════════════════ -#> Duration: 0.4 s -#> -#> OK: 0 -#> Failed: 0 -#> Warnings: 0 -#> Skipped: 0 +str(dig("example.com", "255")) # "ANY" query +``` + + ## List of 10 + ## $ Status : int 0 + ## $ TC : logi FALSE + ## $ RD : logi TRUE + ## $ RA : logi TRUE + ## $ AD : logi TRUE + ## $ CD : logi FALSE + ## $ Question :'data.frame': 1 obs. of 2 variables: + ## ..$ name: chr "example.com." + ## ..$ type: int 255 + ## $ Answer :'data.frame': 18 obs. of 4 variables: + ## ..$ name: chr [1:18] "example.com." "example.com." "example.com." "example.com." ... + ## ..$ type: int [1:18] 6 46 46 46 46 46 46 46 46 47 ... + ## ..$ TTL : int [1:18] 1533 19533 19533 1533 19533 19533 1533 1533 1533 1533 ... + ## ..$ data: chr [1:18] "sns.dns.icann.org. noc.dns.icann.org. 2019041044 7200 3600 1209600 3600" "a 8 2 86400 1562528621 1560723663 23689 example.com. fdyvf2c+HYL8Qt9UXB+KLdnvuWyeE9U2i7pR9vnb59L6E7eBCxeGGZAVBf"| __truncated__ "ns 8 2 86400 1562498297 1560694863 23689 example.com. c2wn0Bz2Yb6T545v7f3O7XH8/gwRqPDlho6jtVNC9f7qL8lidsfTTpOPl"| __truncated__ "soa 8 2 3600 1562561021 1560759663 23689 example.com. icHLconr6/MiDdoLcVEFXErYXJ6XgZK+r/Q25Xu4sKKaKQhIgkDzeX+Fn"| __truncated__ ... + ## $ Additional : list() + ## $ edns_client_subnet: chr "0.0.0.0/0" + ## - attr(*, "class")= chr [1:2] "gdns_response" "list" + +``` r +query("microsoft.com", "MX") %>% + as.data.frame() +``` + + ## # A tibble: 1 x 6 + ## query qtype name type ttl data + ## * + ## 1 microsoft.com. 15 microsoft.com. 15 2904 10 microsoft-com.mail.protection.outlook.com. + +``` r +as.data.frame(query("apple.com")) +``` + + ## # A tibble: 3 x 6 + ## query qtype name type ttl data + ## * + ## 1 apple.com. 1 apple.com. 1 3274 17.172.224.47 + ## 2 apple.com. 1 apple.com. 1 3274 17.178.96.59 + ## 3 apple.com. 1 apple.com. 1 3274 17.142.160.59 + +``` r +as.data.frame(dig("17.142.160.59", "PTR")) +``` + + ## # A tibble: 5 x 6 + ## query qtype name type ttl data + ## * + ## 1 59.160.142.17.in-addr.arpa. 12 59.160.142.17.in-addr.arpa. 12 102 appleid.org. + ## 2 59.160.142.17.in-addr.arpa. 12 59.160.142.17.in-addr.arpa. 12 102 apple.by. + ## 3 59.160.142.17.in-addr.arpa. 12 59.160.142.17.in-addr.arpa. 12 102 apple.com. + ## 4 59.160.142.17.in-addr.arpa. 12 59.160.142.17.in-addr.arpa. 12 102 ipad.host. + ## 5 59.160.142.17.in-addr.arpa. 12 59.160.142.17.in-addr.arpa. 12 102 pv-apple-com.apple.com. + +``` r +hosts <- c("rud.is", "dds.ec", "r-project.org", "rstudio.com", "apple.com") + +gdns::bulk_query(hosts) ``` -### Code of Conduct + ## # A tibble: 7 x 7 + ## query qtype name type ttl data entity + ## + ## 1 rud.is. 1 rud.is. 1 3598 172.93.49.183 rud.is + ## 2 dds.ec. 1 dds.ec. 1 599 185.53.178.9 dds.ec + ## 3 r-project.org. 1 r-project.org. 1 4469 137.208.57.37 r-project.org + ## 4 rstudio.com. 1 rstudio.com. 1 3599 104.196.200.5 rstudio.com + ## 5 apple.com. 1 apple.com. 1 2137 17.172.224.47 apple.com + ## 6 apple.com. 1 apple.com. 1 2137 17.178.96.59 apple.com + ## 7 apple.com. 1 apple.com. 1 2137 17.142.160.59 apple.com + +## gdns Metrics + +| Lang | \# Files | (%) | LoC | (%) | Blank lines | (%) | \# Lines | (%) | +| :--- | -------: | ---: | --: | ---: | ----------: | ---: | -------: | ---: | +| R | 14 | 0.93 | 384 | 0.94 | 118 | 0.77 | 314 | 0.85 | +| Rmd | 1 | 0.07 | 26 | 0.06 | 35 | 0.23 | 54 | 0.15 | + +## Code of Conduct Please note that this project is released with a [Contributor Code of Conduct](CONDUCT.md). By participating in this project you agree to diff --git a/cran-comments.md b/cran-comments.md index b6ca11c..860a836 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,18 +1,16 @@ ## Test environments -* local OS X install, R 3.5.1 -* ubuntu 12.04 (on travis-ci), R 3.5.1 +* local OS X install, R 3.6.0 +* ubuntu 14.04 (on travis-ci), R 3.6.0 * win-builder (devel and release) ## R CMD check results -0 errors | 0 warnings | 1 note (maintainer/license) +0 errors | 0 warnings | 0 note * This is a maintenance release. --- -Thinned out dependencies and modified the code to account -for chances in the Google DoH API + fixed a bug in bulk_query() - -Re-submitting as per email thread re: license (can't believe I -forgot that. sigh & apologies to the CRAN team.) +Google is changing the endpoint for the JSON REST API so +this updates accounts for that change. New datasets and +response helpers have also been added. diff --git a/data-raw/rrtypes.R b/data-raw/rrtypes.R new file mode 100644 index 0000000..a61c2f4 --- /dev/null +++ b/data-raw/rrtypes.R @@ -0,0 +1,95 @@ +## code to prepare `rrtypes` dataset goes here + +library(tidyverse) +library(xml2) + +xdf <- read_csv("https://www.iana.org/assignments/dns-parameters/dns-parameters-2.csv") +dns_classes <- janitor::clean_names(xdf) +usethis::use_data(dns_classes, overwrite = TRUE) + +xdf <- read_csv("https://www.iana.org/assignments/dns-parameters/dns-parameters-4.csv") +rrtypes <- janitor::clean_names(xdf) +usethis::use_data(rrtypes, overwrite = TRUE) + +xdf <- read_csv("https://www.iana.org/assignments/dns-parameters/dns-parameters-5.csv") +dns_opcodes <- janitor::clean_names(xdf) +usethis::use_data(dns_opcodes, overwrite = TRUE) + +xdf <- read_csv("https://www.iana.org/assignments/dns-parameters/dns-parameters-6.csv") +dns_rcodes <- janitor::clean_names(xdf) +usethis::use_data(dns_rcodes, overwrite = TRUE) + +xdf <- read_csv("https://www.iana.org/assignments/dns-parameters/dns-parameters-11.csv") +edns0_option_codes <- janitor::clean_names(xdf) +usethis::use_data(edns0_option_codes, overwrite = TRUE) + +xdf <- read_csv("https://www.iana.org/assignments/dns-parameters/underscored-globally-scoped-dns-node-names.csv") +dns_glob_names <- janitor::clean_names(xdf) +usethis::use_data(dns_glob_names, overwrite = TRUE) + +# https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml + +doc <- read_xml("https://www.iana.org/assignments/dns-parameters/dns-parameters.xml") +doc <- xml_ns_strip(doc) + +fil <- here::here("R/datasets.R") + +upd <- as.character(Sys.time()) + +c( + "dns_classes" = "dns-parameters-2", + "rrtypes" = "dns-parameters-4", + "dns_opcodes" = "dns-parameters-5", + "dns_rcodes" = "dns-parameters-6", + "edns0_option_codes" = "dns-parameters-11", + "dns_glob_names" = "underscored-globally-scoped-dns-node-names" +) -> ids + +cat( + "# This file is autogenerated. Do not edit by hand.\n", + "# Last refresh: ", upd, "\n\n", sep = "", + file = fil +) + +for (i in seq_along(ids)) { + + dat <- names(ids)[i] + id <- unname(ids)[i] + id <- glue::glue(".//registry[@id = '{id}']") + + node <- xml_find_first(doc, id) + + note <- "" + if (!is.na(xml_text(xml_find_first(node, "note"))[[1]])) { + note <- sprintf("#' @note %s\n", gsub("\n", "", paste0(xml_text(xml_find_first(node, "note")), collapse = " "))) + } + + cat( + "#' @md\n", + "#' @title ", xml_text(xml_find_first(node, "title")), " (dataset)\n", + "#' @description ", xml_text(xml_find_first(node, "title")), "\n", + "#' @format data frame with columns: ", paste0(sprintf("`%s`", colnames(get(names(ids)[i]))), collapse = ", "), "\n", + "#' @docType data\n", + "#' @keywords datasets\n", + "#' @name ", dat, "\n", + "#' @references \n", + "#' @references \n", + "#' @references ", paste0(xml_attr(xml_find_all(node, "xref"), "data"), collapse = ", "), "\n", + note, + "#' @note Last updated ", upd, "\n", + "#' @usage data('", dat, "')\n", + "NULL\n\n", + sep = "", file = fil, append = TRUE + ) + +} + + + + + + + + + + diff --git a/data/dns_classes.rda b/data/dns_classes.rda new file mode 100644 index 0000000000000000000000000000000000000000..7698cddb9a6b0608a38bc3ffa7f5f0836e59c28f GIT binary patch literal 744 zcmVHLIJ=6oNC;T zqjnOeMG^WT9+OQnWYbL<85#g-k%^-whMEA=K++}@-l>$x^q;5%20$1CL}X-S7>xil z8fgg9jMViF9*L%!216l%0MHr(6F_7FNd+F0Q%_8ZJSVDQsiBDV251um831XB9@Q@+ z`@0oW7g0?RM3GF-w46Cl7$k$0G9V0>V+MvS0p;%;z7~@0>YJ_L?H0rsnG`kwi0Lw# z>=Z=E@=&b1Q$}w000AaKHKyF%^B#Yv=KFrK#A4*;XC3hb(CCg$H@3tmT3JK|wx3Bw zbt!pCf-0eM=MYS-f&jJx20{?XOaTT$1m+xu5rvQtF9aM(Cm;|3WK2m5BFxArW%zVI zFOTNPjM~WvP&nwgjg=Ma0`!c+{FogV=Ufu+w@NJWg3SNd*g_MAp}b@f1!kDWZMj?g7JmRf~G51H)F>Qqc~`0bWcPenV4exqnUcibzWTE z3ha}A0puRw<-<#a|0y0=X0{a&O%q7Ytcdmtg&)4?3`9i^ad0l5fRp?!?8)G zcL#+rYFV$2xU(NB2tP|q)vb88w%irRIapKSaB1Sf9CWN!!Nrk;@YpP6LpX+si-`{r zeT*^*3JnKsVBE1mT9&$^jD}7%twCKfsUsU-*}{x$j7?D~?=15p05dWW0TS0}+@htB zum=$HBC=$Rp8_oMiYUXbwB&I?7Q_m27v-GZh4z4nZj_)wn=)Lz#p~T`9|C4TL}B%F aUiR1c^d12~dPD19@pmLsg$V-kBdLH#{!p+0 literal 0 HcmV?d00001 diff --git a/data/dns_glob_names.rda b/data/dns_glob_names.rda new file mode 100644 index 0000000000000000000000000000000000000000..ec87d015a514538976db0ac1a7b5b8b11cd356f6 GIT binary patch literal 773 zcmV+g1N!_zT4*^jL0KkKS!5D8F#rT+|HS|Q$Us0Bf8ejL-)g__-|#>H03bjCzyjP- z+frGSGC+vaQKKi32c*+L0MO8AX^3cHi46ln0E&1cQy>peGynh@0002ca|xg{28|d- zgAt}COicz6pkxCk0!0a+j7*gD)Ea4!27mwtOrDT7kQkT;ES4$cns+Y z@}F+q3VfJ&zc(nbh(fC8vze3 z@_Je%90A}#Vn)YA)?wnq>;mY($-fcSWd!scs8d1{u3|8-i$s1F5dudeL6Z>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DtbRl*thi zWe`VU2w-f3AS+>rAP}d4kvfu;(`4I1<)sV#swlRd$oH8FmJy<=iiRMD08%j?`fyV< zNufEum_6_>gX)q*jWd#1!o%Q!;{F@6!$Y1q$Od;0vfaz>;~)!y9)>YU7#-Rz6PKt3 z;A7zI5w(vvf3t!dO{@V?;w? zK=-K%&srj|@Mzv>kd3oG&@ltP)9{o9kU9#%DpE(j3>bi(U|n?yidRC(ZVWEAM}&{- zrNa3Gh9F+FvK7Fu&!HrHgT+7~$hg!|TD_Z1b@SjKdO8?!8FE6`4Csz>wmvMZ_pjX> z2!rKA4azy4Hd=afQf6_)uL=@O=JxIJQ<6peeO9c5LheoIlgyAi>}cdd7is93L4IPU z6oqyUO+LSh|zY=$oqxp+_*GKlenLE6B7#oUoj6eKFdNQVIb$HRI6 literal 0 HcmV?d00001 diff --git a/data/edns0_option_codes.rda b/data/edns0_option_codes.rda new file mode 100644 index 0000000000000000000000000000000000000000..ae66200c9e7dc7ad42b944dbf8eafe71ecc88450 GIT binary patch literal 922 zcmV;L17-X|T4*^jL0KkKSs9KWH2?z)|H1$N*n>y||M0(U|4P5_|KLCX03bjC&;vWx z?Av8?w>owjB1fi_Z8DEXsF>7gqeIksOhZPE18NM0CYouds1l<{X{6IkDd{xC^#A|> z4FG5~000D$1Zrf`Z3&U68fX9mLm(cefr!um^$uv!p{5WGFeaJ+$Y^2!(TLE&82}PR zN#dG%nqlgmk+gxJ00006fB+2*FGu%UlE}sp7vhR5L{MKy!45jIQ4&jy&6hg4)JQ$< zx~2sK(i!r`l^|d~JFmOw1OG^pCuCm2GmJ{sRJtgTnHZASZZ?g7hY~_6WRaV($H^V0 za@)CeYg*Q|;fK)ACyW&jPZOHip=cj^gN&S*SeC4z2AsCoDd(#;q394$%&=SX4u;LT zCh3wItzkyMqFLcZB7j&B2{42vLSza|0D;(aFqU=%gmN=AX5JE##kQ86YA(+9+@PAayB%jG11~j``2b?=3aUD3ODX-j7as*ZATwQ36 zb~XFlRrXreMJb+-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zu(OFq;M+n`i)v@Nv{-iwpbOk5d@lm_sF8xjwu_t?pR~$TB7lwTNwKt>5;=Cx*+*?r zmC+U$m1G1M`Hq!jOcmX{MC$2$MHgdb=XAL%mFBhvGO*SLYg-Emw9RC8GhMT3s`?J_ z!v%hMWiPC}i>R^GHE`51p|+Se>59p)2fE9<_~47H6hMxS`H+m22s^PT@9<5T;d}K1 zqAp+!gK%J~N`S*KXnY1!M7K)lV0z#QwchuoZir3qPD>i>(zD^)R!GLS7S`@q321DPTyZQbuGN>qv{&PPHH~GxKkef~I62>GgFuVh+$FPbCA{+y1nN7PA5yI75uojFh!Va4?g5`+X zZ04OennPSt>|wd9G>lTln^cc;7pZ(1wVMiMDFs}-lmocUs=H5#wsm4Ii7z|CVnYXF zdTIEye(vVjR|SEo3us~q`ccU>cIpHQoP*Xj?QeF9_Thn5)Cb;uZ@|~s}PU+ z(adXuf@dk;X@g`r7E_rq=DFLnB!#GcS#D`+LLm%8%*N8b&E*_$qmK7x!c&}p-y<@R zfbeA`U1rl54ynRPg$sLV%2|nSY18ca{SMQ+vDT9ltKytFPXRzR%)tJdz+gY|cO+AV J2?8eQKfqMMktqNG diff --git a/data/rrtypes.rda b/data/rrtypes.rda new file mode 100644 index 0000000000000000000000000000000000000000..a0cfbcbd75d9793bdd8a13457c6b55a6c6f74f03 GIT binary patch literal 2974 zcmV;P3t{v^T4*^jL0KkKS=-BG7-}}G+|M5To5C9MW5CA{{ z;0vDyG2ZjM?zn&lo2f-Zoa`O$txn#Wb(Jk)D2b+lF)|Gi>R~ZWgpE&A6A%p44FEI& z>S)tL$_79LLNPzpCa0v;9`#exYL8F=28Mvp0MGzv4=6oA0004@FjGjUl*Gx113*1Y zfY2HM05SjoJwRyC03|d)jZF;#Nv71)^*>3e=rVedr=n(QK=O}KrW$C}U}%Fi3`Uwg zLx2DP0B8UJ00Tjw0001F0iXaRP(Ya!_NGl5G6W~0JxtO)Oqyf?kO85f#K?IjfY3D4 zQ7MQgJK5QG2#0000000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KsoA##{d8T literal 0 HcmV?d00001 diff --git a/man/as.data.frame.gdns_response.Rd b/man/as.data.frame.gdns_response.Rd new file mode 100644 index 0000000..608f276 --- /dev/null +++ b/man/as.data.frame.gdns_response.Rd @@ -0,0 +1,16 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/as-data-frame.R +\name{as.data.frame.gdns_response} +\alias{as.data.frame.gdns_response} +\title{Coerce a gdns query response answer to a data frame} +\usage{ +\method{as.data.frame}{gdns_response}(x, ...) +} +\arguments{ +\item{x}{a `gdns_response` object} + +\item{...}{unused} +} +\description{ +Helper function to get to the `Answer` quickly +} diff --git a/man/bulk_query.Rd b/man/bulk_query.Rd index a8061eb..787c20b 100644 --- a/man/bulk_query.Rd +++ b/man/bulk_query.Rd @@ -4,7 +4,8 @@ \alias{bulk_query} \title{Vectorized query, returning only answers in a data frame} \usage{ -bulk_query(entities, type = 1, edns_client_subnet = "0.0.0.0/0") +bulk_query(entities, type = 1, cd = FALSE, do = FALSE, + edns_client_subnet = "0.0.0.0/0") } \arguments{ \item{entities}{character vector of entities to query} @@ -13,6 +14,12 @@ bulk_query(entities, type = 1, edns_client_subnet = "0.0.0.0/0") string (A, aaaa, etc). More information on RR types can be found \href{http://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4}{here}.} +\item{cd}{(Checking Disabled) flag. Use `TRUE` to disable DNSSEC validation; +Default: `FALSE`.} + +\item{do}{(DNSSEC OK) flag. Use `TRUE` include DNSSEC records (RRSIG, NSEC, NSEC3); +Default: `FALSE`.} + \item{edns_client_subnet}{The edns0-client-subnet option. Format is an IP address with a subnet mask. Examples: \code{1.2.3.4/24}, \code{2001:700:300::/48}.\cr diff --git a/man/dns_classes.Rd b/man/dns_classes.Rd new file mode 100644 index 0000000..bbed4b6 --- /dev/null +++ b/man/dns_classes.Rd @@ -0,0 +1,26 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/datasets.R +\docType{data} +\name{dns_classes} +\alias{dns_classes} +\title{DNS CLASSes (dataset)} +\format{data frame with columns: \code{decimal}, \code{hexadecimal}, \code{name}, \code{reference}} +\usage{ +data('dns_classes') +} +\description{ +DNS CLASSes +} +\note{ +As noted in , Multicast DNS can only carry DNS records with classes in the range 0-32767. Classes in the range 32768 to 65535 are incompatible with Multicast DNS. + +Last updated 2019-06-27 11:16:48 +} +\references{ +\url{https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-2} + +\url{https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml} + +rfc6895 +} +\keyword{datasets} diff --git a/man/dns_glob_names.Rd b/man/dns_glob_names.Rd new file mode 100644 index 0000000..bc4ced0 --- /dev/null +++ b/man/dns_glob_names.Rd @@ -0,0 +1,24 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/datasets.R +\docType{data} +\name{dns_glob_names} +\alias{dns_glob_names} +\title{Underscored and Globally Scoped DNS Node Names (dataset)} +\format{data frame with columns: \code{rr_type}, \code{node_name}, \code{reference}} +\usage{ +data('dns_glob_names') +} +\description{ +Underscored and Globally Scoped DNS Node Names +} +\note{ +Last updated 2019-06-27 11:16:48 +} +\references{ +\url{https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#underscored-globally-scoped-dns-node-names} + +\url{https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml} + +rfc8552 +} +\keyword{datasets} diff --git a/man/dns_opcodes.Rd b/man/dns_opcodes.Rd new file mode 100644 index 0000000..99b2cae --- /dev/null +++ b/man/dns_opcodes.Rd @@ -0,0 +1,24 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/datasets.R +\docType{data} +\name{dns_opcodes} +\alias{dns_opcodes} +\title{DNS OpCodes (dataset)} +\format{data frame with columns: \code{op_code}, \code{name}, \code{reference}} +\usage{ +data('dns_opcodes') +} +\description{ +DNS OpCodes +} +\note{ +Last updated 2019-06-27 11:16:48 +} +\references{ +\url{https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-5} + +\url{https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml} + +rfc6895, rfc1035 +} +\keyword{datasets} diff --git a/man/dns_rcodes.Rd b/man/dns_rcodes.Rd new file mode 100644 index 0000000..0536161 --- /dev/null +++ b/man/dns_rcodes.Rd @@ -0,0 +1,24 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/datasets.R +\docType{data} +\name{dns_rcodes} +\alias{dns_rcodes} +\title{DNS RCODEs (dataset)} +\format{data frame with columns: \code{rcode}, \code{name}, \code{description}, \code{reference}} +\usage{ +data('dns_rcodes') +} +\description{ +DNS RCODEs +} +\note{ +Last updated 2019-06-27 11:16:48 +} +\references{ +\url{https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-6} + +\url{https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml} + +rfc6895, rfc1035 +} +\keyword{datasets} diff --git a/man/edns0_option_codes.Rd b/man/edns0_option_codes.Rd new file mode 100644 index 0000000..bbf7959 --- /dev/null +++ b/man/edns0_option_codes.Rd @@ -0,0 +1,26 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/datasets.R +\docType{data} +\name{edns0_option_codes} +\alias{edns0_option_codes} +\title{DNS EDNS0 Option Codes (OPT) (dataset)} +\format{data frame with columns: \code{value}, \code{name}, \code{status}, \code{reference}} +\usage{ +data('edns0_option_codes') +} +\description{ +DNS EDNS0 Option Codes (OPT) +} +\note{ +Registrations made by standards-track documents are listed as "Standard," and by non-standards-track documents as "Optional." Registrations for which there are no final specifications are listed as "On-Hold." + +Last updated 2019-06-27 11:16:48 +} +\references{ +\url{https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-11} + +\url{https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml} + +rfc6891, 3604 +} +\keyword{datasets} diff --git a/man/pipe.Rd b/man/pipe.Rd new file mode 100644 index 0000000..b7daf6a --- /dev/null +++ b/man/pipe.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/utils-pipe.R +\name{\%>\%} +\alias{\%>\%} +\title{Pipe operator} +\usage{ +lhs \%>\% rhs +} +\description{ +See \code{magrittr::\link[magrittr]{\%>\%}} for details. +} +\keyword{internal} diff --git a/man/query.Rd b/man/query.Rd index d70c49d..cd7090f 100644 --- a/man/query.Rd +++ b/man/query.Rd @@ -2,9 +2,14 @@ % Please edit documentation in R/zgdns.r \name{query} \alias{query} +\alias{dig} \title{Perform DNS over HTTPS queries using Google} \usage{ -query(name, type = "1", edns_client_subnet = "0.0.0.0/0") +query(name, type = "1", cd = FALSE, do = FALSE, + edns_client_subnet = "0.0.0.0/0", random_padding = NULL) + +dig(name, type = "1", cd = FALSE, do = FALSE, + edns_client_subnet = "0.0.0.0/0", random_padding = NULL) } \arguments{ \item{name}{item to lookup. Valid characters are numbers, letters, hyphen, and dot. Length @@ -19,6 +24,12 @@ string (A, aaaa, etc). More information on RR types can be found \href{http://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4}{here}. You can use \code{255} for an \code{ANY} query.} +\item{cd}{(Checking Disabled) flag. Use `TRUE` to disable DNSSEC validation; +Default: `FALSE`.} + +\item{do}{(DNSSEC OK) flag. Use `TRUE` include DNSSEC records (RRSIG, NSEC, NSEC3); +Default: `FALSE`.} + \item{edns_client_subnet}{The edns0-client-subnet option. Format is an IP address with a subnet mask. Examples: \code{1.2.3.4/24}, \code{2001:700:300::/48}.\cr @@ -28,6 +39,13 @@ nameservers for geographic location accuracy, use \code{edns_client_subnet=0.0.0.0/0}. Google Public DNS normally sends approximate network information (usually replacing the last part of your IPv4 address with zeroes). \code{0.0.0.0/0} is the default.} + +\item{random_padding}{clients concerned about possible side-channel privacy +attacks using the packet sizes of HTTPS GET requests can use this to +make all requests exactly the same size by padding requests with random data. +To prevent misinterpretation of the URL, restrict the padding characters to +the unreserved URL characters: upper- and lower-case letters, digits, +hyphen, period, underscore and tilde.} } \value{ a \code{list} with the query result or \code{NULL} if an error occurred @@ -51,12 +69,12 @@ To perform vectorized queries with only answers (and no metadata) use } \examples{ query("rud.is") -query("example.com", "255") # ANY query +dig("example.com", "255") # ANY query query("microsoft.com", "MX") -query("google-public-dns-a.google.com", "TXT") +dig("google-public-dns-a.google.com", "TXT") query("apple.com") -query("17.142.160.59", "PTR") +dig("17.142.160.59", "PTR") } \references{ -\url{https://developers.google.com/speed/public-dns/docs/dns-over-https} + } diff --git a/man/rrtypes.Rd b/man/rrtypes.Rd new file mode 100644 index 0000000..681ed69 --- /dev/null +++ b/man/rrtypes.Rd @@ -0,0 +1,24 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/datasets.R +\docType{data} +\name{rrtypes} +\alias{rrtypes} +\title{Resource Record (RR) TYPEs (dataset)} +\format{data frame with columns: \code{type}, \code{value}, \code{meaning}, \code{reference}, \code{template}, \code{registration_date}} +\usage{ +data('rrtypes') +} +\description{ +Resource Record (RR) TYPEs +} +\note{ +Last updated 2019-06-27 11:16:48 +} +\references{ +\url{https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4} + +\url{https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml} + +rfc6895, rfc1035 +} +\keyword{datasets} diff --git a/tests/testthat/test-gdns.R b/tests/testthat/test-gdns.R index eba36f0..9c75379 100644 --- a/tests/testthat/test-gdns.R +++ b/tests/testthat/test-gdns.R @@ -6,6 +6,6 @@ test_that("we can do something", { doms <- c("example.com", "example.org", "example.net") qry <- gdns::bulk_query(doms) - expect_that(dim(qry), equals(c(3, 5))) + expect_that(dim(qry), equals(c(3, 7))) })