{"id":16571526,"url":"https://github.com/hrbrmstr/censys","last_synced_at":"2025-03-21T12:30:56.530Z","repository":{"id":56937562,"uuid":"49443892","full_name":"hrbrmstr/censys","owner":"hrbrmstr","description":"R interface to the Censys \"cyber\"/scans search engine • https://www.censys.io/tutorial","archived":false,"fork":false,"pushed_at":"2022-08-09T22:15:59.000Z","size":685,"stargazers_count":15,"open_issues_count":1,"forks_count":11,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T01:11:14.708Z","etag":null,"topics":["censys-api","censys-data","r","r-cyber","rstats"],"latest_commit_sha":null,"homepage":"https://hrbrmstr.github.io/censys/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hrbrmstr.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-11T17:58:35.000Z","updated_at":"2024-10-03T05:12:11.000Z","dependencies_parsed_at":"2022-08-21T06:50:11.283Z","dependency_job_id":null,"html_url":"https://github.com/hrbrmstr/censys","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%2Fcensys","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrbrmstr%2Fcensys/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrbrmstr%2Fcensys/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrbrmstr%2Fcensys/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hrbrmstr","download_url":"https://codeload.github.com/hrbrmstr/censys/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244799226,"owners_count":20512209,"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":["censys-api","censys-data","r","r-cyber","rstats"],"created_at":"2024-10-11T21:24:20.546Z","updated_at":"2025-03-21T12:30:55.957Z","avatar_url":"https://github.com/hrbrmstr.png","language":"R","funding_links":[],"categories":["R Search Automation Tools"],"sub_categories":[],"readme":"---\noutput:\n  html_document:\n    keep_md: true\n  md_document:\n    variant: markdown_github\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, echo = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"README-\",\n  fig.retina = 2\n)\n```\n\n[![Travis-CI Build Status](https://travis-ci.org/hrbrmstr/censys.svg?branch=master)](https://travis-ci.org/hrbrmstr/censys) [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/censys)](https://cran.r-project.org/package=censys)\n\n`censys` is an R package interface to the [Censys API](https://censys.io/api)\n\nCensys is a search engine that enables researchers to ask questions about the hosts and networks that compose the Internet. Censys collects data on hosts and websites through daily [ZMap](https://zmap.io/) and [ZGrab](https://github.com/zmap/zgrab) scans of the IPv4 address space, in turn maintaining a database of how hosts and websites are configured. Researchers can interact with this data through a search interface, report builder, and SQL engine.\n\n[Censys tutorial](https://www.censys.io/tutorial).\n\nThe following functions are implemented:\n\n- `censys_export_download`:\tDownload export job files to a specified directory\n- `censys_export_job_status`:\tGet status of a Censys export job\n- `censys_get_job_result`:\tGet results of completed Censys SQL query job\n- `censys_get_job_status`:\tGet status of a Censys SQL query job\n- `censys_query`:\tIssue SQL Queries against the Censys API\n- `censys_report`:\tCreate aggregate reports on the breakdown of a field in the result set of a query\n- `censys_search`:\tPerform queries against Censys data\n- `censys_series`:\tList all series that can be queried from the SQL interface\n- `censys_series_details`:\tGet details about a series, including the list of tables and schema for the series\n- `censys_start_export`:\tExport large datasets and structured records from Censys to JSON or CSV files\n- `get_series`:\tRetrieve data on the types of scans Censys regularly performs (\"series\").\n- `view_document`:\tRetrieve data that Censys has about a specific host, website, or certificate.\n- `view_result`:\tRetrieve data on a particular scan \"result\"\n- `view_series`:\tRetrieve data that Censys has about a particular series\n\n### Installation\n\n```{r eval=FALSE}\ndevtools::install_github(\"hrbrmstr/censys\")\n```\n\n```{r echo=FALSE, message=FALSE, warning=FALSE, error=FALSE}\noptions(width=120)\n```\n\n### Usage\n\n```{r message=FALSE, cache=TRUE}\nlibrary(censys)\n\n# current verison\npackageVersion(\"censys\")\n\nlibrary(purrr)\nlibrary(dplyr)\n\nres \u003c- censys_query(\"\nSELECT p80.http.get.headers.server, p80.http.get.headers.www_authenticate, location.country, autonomous_system.asn\nFROM ipv4.20161206\nWHERE REGEXP_MATCH(p80.http.get.headers.server, r'gen[56]')\n\")\n\ninf \u003c- censys_get_job_status(res$job_id)\n\nSys.sleep(10) # giving it some time to process for the README\n\nmap(1:3, ~censys_get_job_result(inf$job_id, .)) %\u003e% \n  map(c(\"rows\", \"f\")) %\u003e% \n  flatten() %\u003e% \n  map(\"v\") %\u003e% \n  map_df(~setNames(as.list(.), c(\"server\", \"auth\", \"geo\", \"asn\"))) %\u003e% \n  count(geo, sort=TRUE)\n```\n\n### Test Results\n\n```{r}\nlibrary(censys)\nlibrary(testthat)\n\ndate()\n\ntest_dir(\"tests/\")\n```\n\n### Code of Conduct\n\nPlease note that this project is released with a [Contributor Code of Conduct](CONDUCT.md). \nBy participating in this project you agree to abide by its terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhrbrmstr%2Fcensys","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhrbrmstr%2Fcensys","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhrbrmstr%2Fcensys/lists"}