{"id":16571553,"url":"https://github.com/hrbrmstr/zdnsr","last_synced_at":"2025-04-13T11:40:31.167Z","repository":{"id":141239040,"uuid":"147868728","full_name":"hrbrmstr/zdnsr","owner":"hrbrmstr","description":"🚚 Perform Bulk ‘DNS’ Queries Using ‘zdns’","archived":false,"fork":false,"pushed_at":"2020-02-21T13:50:21.000Z","size":30,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T02:43:41.634Z","etag":null,"topics":["bulk-dns","r","r-cyber","rstats","zdns"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hrbrmstr.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-07T19:54:53.000Z","updated_at":"2025-03-22T11:03:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"d7694ddc-57f9-4bd7-af97-119c9059e96d","html_url":"https://github.com/hrbrmstr/zdnsr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrbrmstr%2Fzdnsr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrbrmstr%2Fzdnsr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrbrmstr%2Fzdnsr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrbrmstr%2Fzdnsr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hrbrmstr","download_url":"https://codeload.github.com/hrbrmstr/zdnsr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248709241,"owners_count":21149156,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bulk-dns","r","r-cyber","rstats","zdns"],"created_at":"2024-10-11T21:24:24.991Z","updated_at":"2025-04-13T11:40:31.159Z","avatar_url":"https://github.com/hrbrmstr.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: rmarkdown::github_document\n---\n\n# zdnsr\n\nPerform Bulk 'DNS' Queries Using 'zdns'\n\n## Description\n\nProvides wrapper/helper methods for executing 'zdns'  (\u003chttps://github.com/zmap/zdns\u003e) bulk queries along with utility methods to retrieve and cache 'Public DNS' (\u003chttp://public-dns.info/\u003e) nameserver lists.\n\n- `zdns`: \u003chttps://github.com/zmap/zdns\u003e\n- `Public DNS Lists`: \u003chttp://public-dns.info/\u003e\n\n## What's Inside The Tin\n\nThe following functions are implemented:\n\n- `install_zdns`:\tHelper to try to get `zdns` installed\n- `refresh_publc_nameservers_list`:\tRefresh the list of valid public nameservers\n- `zdns_exec`:\tRaw interface to `zdns`\n- `zdns_help`:\tRaw interface to `zdns`\n- `zdns_query`:\tBulk query using `zdns`\n\n## Installation\n\n```{r eval=FALSE}\ndevtools::install_github(\"hrbrmstr/zdnsr\")\n```\n\n```{r message=FALSE, warning=FALSE, error=FALSE, include=FALSE}\noptions(width=120)\n```\n\n## Usage\n\n```{r message=FALSE, warning=FALSE, error=FALSE}\nlibrary(zdnsr)\n\n# current verison\npackageVersion(\"zdnsr\")\n\n```\n\n### Example (top prefix enumeration)\n\n```{r cache=TRUE}\nc(\n  \"www\", \"mail\", \"mx\", \"blog\", \"ns1\", \"ns2\", \"dev\", \"server\", \"email\", \n  \"cloud\", \"api\", \"support\", \"smtp\", \"app\", \"webmail\", \"test\", \"box\", \n  \"m\", \"admin\", \"forum\", \"news\", \"web\", \"mail2\", \"ns\", \"demo\", \"my\", \n  \"portal\", \"shop\", \"host\", \"cdn\", \"git\", \"vps\", \"mx1\", \"mail1\", \n  \"static\", \"help\", \"ns3\", \"beta\", \"chat\", \"secure\", \"staging\", \"vpn\", \n  \"apps\", \"server1\", \"ftp\", \"crm\", \"new\", \"wiki\",  \"home\", \"info\"\n) -\u003e top_common_prefixes # via Rapid7 FDNS analysis\n\ntf \u003c- tempfile(fileext = \".json\")\n\nzdns_query(\n  sprintf(\"%s.rstudio.com\", top_common_prefixes),\n  query_type = \"A\",\n  num_nameservers = (length(top_common_prefixes) * 2),\n  output_file = tf\n)\n\nres \u003c- jsonlite::stream_in(file(tf))\nunlink(tf)\n\nfound \u003c- which(lengths(res$data$answers) \u003e 0)\n\ndo.call(\n  rbind.data.frame,\n  lapply(found, function(idx) {\n    res$data$answers[[idx]]$query_name \u003c- res$name[idx]\n    res$data$answers[[idx]]\n  })\n) -\u003e xdf\n\nxdf \u003c- xdf[,c(\"query_name\", \"name\", \"class\", \"ttl\", \"type\", \"answer\")]\n\nknitr::kable(xdf)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhrbrmstr%2Fzdnsr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhrbrmstr%2Fzdnsr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhrbrmstr%2Fzdnsr/lists"}