CensysEx.Hosts (censys_ex v0.1.0) View Source

CensysEx wrapper for the search.censys.io v2 API for the "hosts" resource

Link to this section Summary

Functions

Hits the Censys Hosts aggregate API. Optionally control number of buckets returned

Hits the Censys Hosts search API. Returns a stream of results for you query

Hits the Censys Hosts view API. Returning full information about an IP at a given time

Link to this section Functions

Link to this function

aggregate(field, query \\ nil, num_buckets \\ 50)

View Source

Specs

aggregate(String.t(), String.t(), integer()) :: {:error, any()} | {:ok, map()}

Hits the Censys Hosts aggregate API. Optionally control number of buckets returned

Examples

CensysEx.Hosts.aggregate("location.country_code", "services.service_name: MEMCACHED")

CensysEx.Hosts.aggregate("location.country_code", "services.service_name: MEMCACHED", 1000)
Link to this function

search(query \\ "", per_page \\ 100)

View Source

Hits the Censys Hosts search API. Returns a stream of results for you query

Examples

CensysEx.Hosts.search("services.service_name: HTTP")
|> Stream.take(500)
|> Enum.to_list()
Link to this function

view(ip, at_time \\ nil)

View Source

Specs

view(String.t(), DateTime.t()) :: {:error, any()} | {:ok, map()}

Hits the Censys Hosts view API. Returning full information about an IP at a given time

Examples

CensysEx.Hosts.view("127.0.0.1")

CensysEx.Hosts.view("127.0.0.1", ~U[2021-06-07 12:53:27.450073Z])