CLI Reference

censys

usage: censys [-h] [-v] {account,asm,config,hnri,search,subdomains,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,delete-seeds,delete-all-seeds,delete-labeled-seeds,replace-labeled-seeds,list-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] [-v]
                            [--default-type {IP_ADDRESS,DOMAIN_NAME,CIDR,ASN}]
                            [--csv]
                            (--input-file INPUT_FILE | --json JSON | --nmap-xml NMAP_XML)
                            [-l LABEL]
-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)

-v, --verbose

verbose output

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

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

--csv

process input in CSV format

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

input file name containing valid seeds in JSON format, unless –csv is specified (use - for stdin)

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

input string containing valid json seeds

--nmap-xml <nmap_xml>

input file name containing valid xml nmap output

-l <label>, --label <label>

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

censys asm config

Configure Censys ASM API Settings

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

show this help message and exit

censys asm delete-all-seeds

Delete all ASM seeds

usage: censys asm delete-all-seeds [-h] [--api-key API_KEY] [-f] [-v]
-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)

-f, --force

force delete all (no confirmation prompt)

-v, --verbose

verbose output

censys asm delete-labeled-seeds

Delete all ASM seeds with specified label

usage: censys asm delete-labeled-seeds [-h] [--api-key API_KEY] -l LABEL [-v]
-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)

-l <label>, --label <label>

label for which to delete all seeds

-v, --verbose

verbose output

censys asm delete-seeds

Delete ASM seeds

usage: censys asm delete-seeds [-h] [--api-key API_KEY] [-v] [--csv]
                               (--input-file INPUT_FILE | --json JSON | --nmap-xml NMAP_XML)
-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)

-v, --verbose

verbose output

--csv

process input in CSV format

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

input file name containing valid seeds in JSON format, unless –csv is specified (use - for stdin)

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

input string containing valid json seeds

--nmap-xml <nmap_xml>

input file name containing valid xml nmap output

censys asm list-seeds

List all ASM seeds, optionally filtered by label and type

usage: censys asm list-seeds [-h] [--api-key API_KEY]
                             [-t {IP_ADDRESS,DOMAIN_NAME,CIDR,ASN}] [-l LABEL]
                             [--csv] [-v]
-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)

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

type of the seed to list, if not specified, all types returned

-l <label>, --label <label>

label of seeds to list, if not specified, all labels returned

--csv

output in CSV format (otherwise JSON)

-v, --verbose

verbose output

censys asm replace-labeled-seeds

Replace all ASM seeds with specified label with new seeds

usage: censys asm replace-labeled-seeds [-h] [--api-key API_KEY] -l LABEL [-v]
                                        [--default-type {IP_ADDRESS,DOMAIN_NAME,CIDR,ASN}]
                                        [--csv]
                                        (--input-file INPUT_FILE | --json JSON | --nmap-xml NMAP_XML)
-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)

-l <label>, --label <label>

label for which to replace all seeds

-v, --verbose

verbose output

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

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

--csv

process input in CSV format

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

input file name containing valid seeds in JSON format, unless –csv is specified (use - for stdin)

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

input string containing valid json seeds

--nmap-xml <nmap_xml>

input file name containing valid xml nmap output

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 subdomains

Enumerates subdomains using the Censys Search Certificates index

usage: censys subdomains [-h] [--api-id API_ID] [--api-secret API_SECRET]
                         [--pages PAGES] [-j]
                         domain
domain

The base domain to search for

-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)

--pages <pages>

Max records to query

-j, --json

Output in JSON format

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|certificates] [-o OUTPUT] [-O]
                   [--at-time YYYY-MM-DD (HH:mm)]
                   document_id
document_id

a document id (IP address or SHA-256 certificate fingerprint) 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,certificates}

which resource index to query

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

json output file path

-O, --open

open document in browser

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

Fetches a document at a given point in time