CLI Usage

Before continuing please ensure you have successfully configured your credentials.

censys config

The configuration file by default is writen to ~/.config/censys/censys.cfg, but you can change this by setting the CENSYS_CONFIG_PATH environment variable.

export CENSYS_CONFIG_PATH=/path/to/config/file


Below we show an example of Viewing a host from the CLI.

censys view

You can save results to a file using the -o argument.

censys view -o google.json

We can then parse this json with something like jq.

cat google.json | jq '[.services[] | {port: .port, protocol: .service_name}]'


Below we show an example of viewing your account information from the CLI.

censys account

You can also request the JSON version of your account information.

censys account --json



Below we show an example of adding seeds from the CLI.

censys asm add-seeds -j '[""]'

You can also add seeds from STDIN using the -i - argument. In the example below we are adding IPs from a Censys Search.

censys search 'services.tls.certificates.leaf_data.issuer.common_name: "Roomba CA"' | jq '[.[] | .ip]' | censys asm add-seeds -i -