{"id":22359056,"url":"https://github.com/bwireman/censys_ex","last_synced_at":"2025-07-30T12:32:21.084Z","repository":{"id":39622379,"uuid":"376311343","full_name":"bwireman/censys_ex","owner":"bwireman","description":"Elixir wrapper for Censys Search V2 API","archived":false,"fork":false,"pushed_at":"2024-02-23T15:19:37.000Z","size":147,"stargazers_count":4,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-17T17:47:12.975Z","etag":null,"topics":["api-client","api-wrapper","censys","elixir","elixir-lang","hex","internet-of-things","search"],"latest_commit_sha":null,"homepage":"https://hexdocs.pm/censys_ex/readme.html","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bwireman.png","metadata":{"files":{"readme":"README.md","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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-06-12T14:34:06.000Z","updated_at":"2021-12-12T18:33:39.000Z","dependencies_parsed_at":"2024-01-27T21:43:34.854Z","dependency_job_id":null,"html_url":"https://github.com/bwireman/censys_ex","commit_stats":{"total_commits":59,"total_committers":3,"mean_commits":"19.666666666666668","dds":0.1694915254237288,"last_synced_commit":"bf62711fde57350cc225fc9b6b3a12c1e042a046"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bwireman%2Fcensys_ex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bwireman%2Fcensys_ex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bwireman%2Fcensys_ex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bwireman%2Fcensys_ex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bwireman","download_url":"https://codeload.github.com/bwireman/censys_ex/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228133887,"owners_count":17874560,"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":["api-client","api-wrapper","censys","elixir","elixir-lang","hex","internet-of-things","search"],"created_at":"2024-12-04T15:19:19.895Z","updated_at":"2025-07-30T12:32:21.068Z","avatar_url":"https://github.com/bwireman.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CensysEx\n\n# This repository is no longer being developed\n\nTiny Elixir ⚗️ wrapper for the Censys Search 2.0 [API](https://search.censys.io/api)\n\n[![ci](https://github.com/bwireman/censys_ex/actions/workflows/elixir.yml/badge.svg?branch=main)](https://github.com/bwireman/censys_ex/actions/workflows/elixir.yml)\n[![mit](https://img.shields.io/github/license/bwireman/censys_ex?color=brightgreen)](https://github.com/bwireman/censys_ex/blob/main/LICENSE)\n[![commits](https://img.shields.io/github/last-commit/bwireman/censys_ex)](https://github.com/bwireman/censys_ex/commit/main)\n[![2.0.1](https://img.shields.io/hexpm/v/censys_ex?color=brightgreen\u0026style=flat)](https://hexdocs.pm/censys_ex/readme.html)\n[![downloads](https://img.shields.io/hexpm/dt/censys_ex?color=brightgreen)](https://hex.pm/packages/censys_ex/)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen)](http://makeapullrequest.com)\n![Sick as hell](https://img.shields.io/badge/Sick-as%20hell%20%F0%9F%A4%98-red)\n\n_**Note**_: this is **_NOT_** an official Censys library, and is not supported by or affiliated with Censys at this time. I do not own Censys Trademarks or Copyrights\n\n## Installation\n\nAvailable in [Hex](https://hex.pm/packages/censys_ex), the package can be installed by adding `censys_ex` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:censys_ex, \"~\u003e 2.0.1\"}\n  ]\nend\n```\n\n## Setup\n\nvia Application variables\n\n```elixir\nconfig :censys_ex,\n  api_id: \"*****\",\n  api_key: \"*****\"\n\n# ...\n\nCensysEx.API.client()\n```\n\nor directly\n\n```elixir\nCensysEx.API.client(\"*****\", \"*****\")\n```\n\nAPI secrets can be found [here](https://search.censys.io/account/api)\n\n## Hosts\n\n### View a host\n\nView all the data on an IP at a given time.\n\n```elixir\nCensysEx.Hosts.view(client, \"127.0.0.1\")\n\n# Lookup the host as it was at a certain time\nCensysEx.Hosts.view(client, \"127.0.0.1\", ~U[2021-06-07 12:53:27.450073Z])\n```\n\n### Get host names\n\nReturns a stream of names for that IP.\n\n```elixir\niex(1)\u003e CensysEx.Hosts.names(client, \"127.0.0.1\") |\u003e\n...(1)\u003e Stream.take(25) |\u003e\n...(1)\u003e Enum.to_list()\n[\"example.com\", \"foo.net\", ...]\n```\n\n### Search hosts\n\nSearch returns a stream of results using the cursors provided by the API.\n\n```elixir\niex(1)\u003e CensysEx.Hosts.search(client, \"same_service(service_name: SSH and not port: 22)\") |\u003e\n...(1)\u003e Stream.take(25) |\u003e\n...(1)\u003e Stream.map(\u0026Map.get(\u00261, \"ip\")) |\u003e\n...(1)\u003e Enum.to_list()\n[\"10.0.0.6\", \"10.2.0.1\", ...]\n```\n\n### Aggregate hosts\n\nAggregate data about hosts on the internet.\n\n```elixir\nCensysEx.Hosts.aggregate(client, \"location.country_code\", \"services.service_name: MEMCACHED\")\n\nCensysEx.Hosts.aggregate(client, \"location.country_code\", \"services.service_name: MEMCACHED\", 10)\n```\n\n### Diff hosts\n\nDiff hosts at given times\n\n```elixir\n# diff the current host with it self 🤷\nCensysEx.Hosts.diff(client, \"8.8.8.8\")\n\n# diff two hosts\nCensysEx.Hosts.diff(client, \"8.8.8.8\", \"1.1.1.1\")\n\n# diff a host with itself at a time in the past\nCensysEx.Hosts.diff(client, \"8.8.8.8\", nil, ~U[2021-06-07 12:53:27.450073Z])\n\n# diff two hosts in the past\nCensysEx.Hosts.diff(client, \"8.8.8.8\", \"8.8.4.4\" ~U[2021-06-07 12:53:27.450073Z], ~U[2021-06-07 12:53:27.450073Z])\n```\n\n### Hosts API Docs\n\n- [view](https://search.censys.io/api#/hosts/viewHost)\n- [names](https://search.censys.io/api#/hosts/viewHostNames)\n- [aggregate](https://search.censys.io/api#/hosts/aggregateHosts)\n- [diff](https://search.censys.io/api#/hosts/viewHostDiff)\n- [search](https://search.censys.io/api#/hosts/searchHosts)\n- [search-syntax](https://search.censys.io/search/language?resource=hosts)\n\n## Certs\n\n### View a cert by fingerprint\n\n```elixir\n# NOTE this actually a V1 API\nCensysEx.Certs.view(client, \"fb444eb8e68437bae06232b9f5091bccff62a768ca09e92eb5c9c2cf9d17c426\")\n```\n\n### Get hosts that present a cert\n\n```elixir\nCensysEx.Certs.get_hosts_by_cert(client, \"fb444eb8e68437bae06232b9f5091bccff62a768ca09e92eb5c9c2cf9d17c426\")\n|\u003e Stream.take(25)\n|\u003e Stream.map(\u0026Map.get(\u00261, \"ip\"))\n|\u003e Enum.to_list()\n[\"10.0.0.6\", \"10.2.0.1\", ...]\n```\n\n### Certs API Docs\n\n- [View](https://search.censys.io/api#/certificates/viewCertificate)\n- [hosts](https://search.censys.io/api#/certs/getHostsByCert)\n\n### Experimental\n\n```elixir\nCensysEx.Experimental.host_events(client, \"127.0.0.1\")\n|\u003e Stream.take(25)\n|\u003e Stream.map(\u0026Map.get(\u00261, \"_event\"))\n|\u003e Enum.to_list()\n[\"service_observed\", \"location_updated\", ...]\n```\n\n### Experimental V2 API Docs\n\n- [events](https://search.censys.io/api#/experimental/viewHostEvents)\n\n## Metadata\n\n```elixir\nCensysEX.Metadata.host_metadata()\n{:ok, %{\n  \"code\": 200,\n  \"status\": \"OK\",\n  \"result\": {\n    \"services\": [\n      \"HTTP\",\n      \"IMAP\",\n      \"MQTT\",\n      \"SSH\",\n      \"...\"\n    ]\n  }\n}}\n```\n\n### Metadata API Docs\n\n- [hosts metadata](https://search.censys.io/api#/metadata/getHostMetadata)\n\n---\n\n## Other Languages\n\n### Official\n\n- [Node](https://github.com/censys/censys-node-js)\n- [Python](https://github.com/censys/censys-python)\n\n### Unofficial\n\n- [Ruby](https://github.com/ninoseki/censysx/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbwireman%2Fcensys_ex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbwireman%2Fcensys_ex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbwireman%2Fcensys_ex/lists"}