CLI Reference

https://asciinema.org/a/418153.svg

censys

usage: censys [-h] [-v] {account,asm,config,hnri,search,view} ...
-h, --help

show this help message and exit

-v, --version

display version

censys account

Check Censys account details and quota

usage: censys account [-h] [--api-id API_ID] [--api-secret API_SECRET] [-j]
-h, --help

show this help message and exit

--api-id <api_id>

a Censys API ID (alternatively you can use the env variable CENSYS_API_ID)

--api-secret <api_secret>

a Censys API SECRET (alternatively you can use the env variable CENSYS_API_SECRET)

-j, --json

Output in JSON format

censys asm

Interact with the Censys ASM API

usage: censys asm [-h] {config,add-seeds} ...
-h, --help

show this help message and exit

censys asm add-seeds

Add seeds to ASM

usage: censys asm add-seeds [-h] [--api-key API_KEY]
                            [--default-type {IP_ADDRESS,DOMAIN_NAME,CIDR,ASN}]
                            [--label-all LABEL_ALL] [-v]
                            (--input-file INPUT_FILE | --json JSON)
-h, --help

show this help message and exit

--api-key <api_key>

a Censys ASM API Key (alternatively you can use the env variable CENSYS_ASM_API_KEY)

--default-type {IP_ADDRESS,DOMAIN_NAME,CIDR,ASN}

type of the seed(s) if type is not already provided (default: IP_ADDRESS)

--label-all <label_all>

label to apply to all seeds (default: “”)

-v, --verbose

verbose output

--input-file <input_file>, -i <input_file>

input file name containing valid json seeds (use - for stdin)

--json <json>, -j <json>

input string containing valid json seeds

censys asm config

Configure Censys ASM API Settings

usage: censys asm config [-h]
-h, --help

show this help message and exit

censys config

Configure Censys Search API Settings

usage: censys config [-h]
-h, --help

show this help message and exit

censys hnri

Home Network Risk Identifier (H.N.R.I.)

usage: censys hnri [-h] [--api-id API_ID] [--api-secret API_SECRET] [-O]
-h, --help

show this help message and exit

--api-id <api_id>

a Censys API ID (alternatively you can use the env variable CENSYS_API_ID)

--api-secret <api_secret>

a Censys API SECRET (alternatively you can use the env variable CENSYS_API_SECRET)

-O, --open

open your IP in browser

censys view

View a document in Censys Search by providing a document id and the resource index

usage: censys view [-h] [--api-id API_ID] [--api-secret API_SECRET]
                   [--index-type hosts] [--at-time YYYY-MM-DD HH:mm]
                   [-o OUTPUT] [-O]
                   document_id
document_id

a document id (IP address) to view

-h, --help

show this help message and exit

--api-id <api_id>

a Censys API ID (alternatively you can use the env variable CENSYS_API_ID)

--api-secret <api_secret>

a Censys API SECRET (alternatively you can use the env variable CENSYS_API_SECRET)

--index-type {hosts}

which resource index to query

--at-time <yyyy-mm-dd (hh:mm)>

Fetches a document at a given point in time

-o <output>, --output <output>

json output file path

-O, --open

open document in browser