CLI Reference¶
censys¶
usage: censys [-h] [-v] {search,view,hnri,config,config-asm} ...
- -h, --help¶
show this help message and exit
- -v, --version¶
display version
censys config¶
Configure Censys Search API Settings
usage: censys config [-h]
- -h, --help¶
show this help message and exit
censys config-asm¶
Configure Censys ASM API Settings
usage: censys config-asm [-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]
- -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)
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 ipv4|certs|websites|hosts]
[-f screen|json|csv] [-o OUTPUT]
[--fields FIELDS [FIELDS ...]] [--overwrite]
[--max-records MAX_RECORDS] [--pages PAGES]
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 {ipv4,certs,websites,hosts}¶
which resource index to query
- -f {screen,json,csv}, --format {screen,json,csv}¶
format of output
- -o <output>, --output <output>¶
output file path
- --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
- --pages <pages>¶
number of pages 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]
[-f screen|json] [-o OUTPUT]
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
- -f {screen,json}, --format {screen,json}¶
format of output
- -o <output>, --output <output>¶
output file path