Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hrbrmstr/gdns
Tools to work with the Google DNS over HTTPS API in R
https://github.com/hrbrmstr/gdns
dns google-dns r r-cyber rstats spf-record
Last synced: 27 days ago
JSON representation
Tools to work with the Google DNS over HTTPS API in R
- Host: GitHub
- URL: https://github.com/hrbrmstr/gdns
- Owner: hrbrmstr
- License: other
- Created: 2016-04-09T21:15:21.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-05-15T12:06:46.000Z (over 4 years ago)
- Last Synced: 2024-08-13T07:13:58.636Z (3 months ago)
- Topics: dns, google-dns, r, r-cyber, rstats, spf-record
- Language: R
- Homepage: https://cinc.rud.is/web/packages/gdns/
- Size: 103 KB
- Stars: 24
- Watchers: 7
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - hrbrmstr/gdns - Tools to work with the Google DNS over HTTPS API in R (R)
README
---
output: rmarkdown::github_document
editor_options:
chunk_output_type: console
---```{r include=FALSE}
knitr::opts_chunk$set(
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 (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 .
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 frameHelpers:
- `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
- `spf_exists`: SPF field extraction functions
- `spf_includes`: SPF field extraction functions
- `spf_ipv4s`: SPF field extraction functions
- `spf_ipv6s`: SPF field extraction functions
- `spf_ptrs`: SPF field extraction functions
- `split_spf`: Split out all SPF records in a domain's TXT recordIANA 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.packages("gdns", repos = "https://cinc.rud.is")
devtools::install_git("https://git.rud.is/hrbrmstr/gdns")
devtools::install_git("https://git.sr.ht/~rbrmstr/gdns")
devtools::install_bitbucket("hrbrmstr/gdns")
devtools::install_gitlab("hrbrmstr/gdns")
devtools::install_github("hrbrmstr/gdns")
``````{r echo=FALSE, message=FALSE, warning=FALSE, error=FALSE}
options(width=120)
```### Usage
```{r}
library(gdns)
library(tibble) # for printing# current verison
packageVersion("gdns")str(query("rud.is"))
query("rud.is") %>%
as.data.frame()str(dig("example.com", "255")) # "ANY" query
query("microsoft.com", "MX") %>%
as.data.frame()as.data.frame(query("apple.com"))
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)
```## gdns Metrics
```{r cloc, echo=FALSE}
cloc::cloc_pkg_md()
```## Code of Conduct
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.