CLI Reference
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] [--open]
- -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)
- --open
open your IP in browser
censys search
Query Censys Search for resource data by providing a query string, the resource index, and the fields to be returned
usage: censys search [-h] [--api-id API_ID] [--api-secret API_SECRET]
[--index-type certs|hosts] [-f screen|json|csv]
[-o OUTPUT] [--open] [--pages PAGES]
[--virtual-hosts INCLUDE|EXCLUDE|ONLY]
[--fields FIELDS [FIELDS ...]] [--overwrite]
[--max-records MAX_RECORDS]
query
- query
a string written in Censys Search syntax
- -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 {certs,hosts}
which resource index to query
- -f {screen,json,csv}, --format {screen,json,csv}
format of output
- -o <output>, --output <output>
output file path
- --open
open query in browser
- --pages <pages>
number of pages of results to return (when set to -1 returns all pages available)
- --virtual-hosts {INCLUDE,EXCLUDE,ONLY}
whether to include virtual hosts in the results
- --fields <fields>
list of index-specific fields
- --overwrite
overwrite instead of append fields returned by default with fields provided in the fields argument
- --max-records <max_records>
maximum number of results to return
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] [--open]
document_id
- document_id
a string written in Censys Search syntax
- -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
- --open
open document in browser