Description Usage Arguments Value Note Examples
View source: R/zdns-bulk-query.R
Given an entity list and an output file, zdns
will be executed and
JSON output stored in output_file
and an optional log
file
(if specified).
1 2 3 | zdns_query(entities, input_file = NULL, query_type = "A", output_file,
num_nameservers = 3000L, num_retries = 3, num_threads = 500,
log = TRUE, verbose = 3)
|
entities |
a character vector of entities to resolve |
input_file |
if not |
query_type |
anything |
output_file |
path + file to the JSON output. |
num_nameservers |
total number of nameservers to use. They will be randomly selected from the cached list of valid, public nameservers. It is highly recommended that you refresh this list periodicaly (perhaps daily). |
num_retries |
how many times should |
num_threads |
number of lightweight go threads. Note that the default |
log |
if |
verbose |
a value between |
value from the system2()
call to zdns
(invisibly)
if you specified TRUE
for log
then you are responsible for
removing the auto-generated log file.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | ## Not run:
# enumerate top prefixes for a domain
c(
"www", "mail", "mx", "blog", "ns1", "ns2", "dev", "server", "email",
"cloud", "api", "support", "smtp", "app", "webmail", "test", "box",
"m", "admin", "forum", "news", "web", "mail2", "ns", "demo", "my",
"portal", "shop", "host", "cdn", "git", "vps", "mx1", "mail1",
"static", "help", "ns3", "beta", "chat", "secure", "staging", "vpn",
"apps", "server1", "ftp", "crm", "new", "wiki", "home", "info"
) -> top_common_prefixes
tf <- tempfile(fileext = ".json")
zdns_query(
sprintf("%s.rstudio.com", top_common_prefixes),
query_type = "A",
num_nameservers = (length(top_common_prefixes) * 2),
output_file = tf
)
res <- jsonlite::stream_in(file(tf))
found <- which(lengths(res$data$answers) > 0)
do.call(
rbind.data.frame,
lapply(found, function(idx) {
res$data$answers[[idx]]$query_name <- res$name[idx]
res$data$answers[[idx]]
})
) -> xdf
xdf <- xdf[,c("query_name", "name", "class", "ttl", "type", "answer")]
knitr::kable(xdf)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.