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} ...
- -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 | --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)
- --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
- --nmap-xml <nmap_xml>
input file name containing valid xml nmap output
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 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 hosts|certificates] [-o OUTPUT] [-O]
[--pages PAGES] [--per-page PER_PAGE] [--timeout TIMEOUT]
[--fields FIELDS [FIELDS ...]]
[--sort-order {RELEVANCE,ASCENDING,DESCENDING,RANDOM}]
[--virtual-hosts INCLUDE|EXCLUDE|ONLY]
[--sort SORT [SORT ...]]
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 {hosts,certificates}
which resource index to query
- -o <output>, --output <output>
output file path
- -O, --open
open query in browser
- --pages <pages>
number of pages of results to return (when set to -1 returns all pages available)
- --per-page <per_page>
number of results to return per page
- --timeout <timeout>
number of seconds to wait for a response
- --fields <fields>
additional fields to return in the matching results
- --sort-order {RELEVANCE,ASCENDING,DESCENDING,RANDOM}
sort order of results
- --virtual-hosts {INCLUDE,EXCLUDE,ONLY}
whether to include virtual hosts in the results
- --sort <sort>
fields to sort by
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