Skip to main content

Command-line tool for Censys! Quickly investigate suspicious hosts or answer complex questions about your infrastructure using Censys right from the command-line! https://www.censys.io

Project description

Censys Command Line Tool Examples

This script allows a user to query the Censys API from the command. The results from the query can be written to CSV, JSON, or simply to the screen.

Installation:
pip install censys-command-line

Or

pip install git+https://github.com/censys/censys-command-line
Usage:
usage: censys [-h] [--fields FIELDS [FIELDS ...]] --query_type
                              ipv4|certs|websites [--append {true,false}]
                              [--output json|csv|screen]
                              [--start_page START_PAGE]
                              [--max_pages MAX_PAGES]
                              [--censys_api_id XXXXXXXXXX]
                              [--censys_api_secret XXXXXXXXXX]
                              query

Search The Censys Data Set via the command line

positional arguments:
  query

optional arguments:
  -h, --help            show this help message and exit
  --fields FIELDS [FIELDS ...]
  --query_type ipv4|certs|websites
  --append {true,false}
                        Append the given list of fields to the default fields
  --output json|csv|screen
  --start_page START_PAGE
  --max_pages MAX_PAGES
  --censys_api_id XXXXXXXXXX
                        (optional) You must provide your Censys API ID here or
                        as an environmental variable CENSYS_API_ID
  --censys_api_secret XXXXXXXXXX
                        (optional) You must provide your Censys API SECRET
                        here or as an environmental variable CENSYS_API_SECRET
Searching IPv4:
censys "ip: [ 134.54.0.0 TO 134.54.65.255 ]" --query_type ipv4 --fields ip protocols --output json
Searching Certificates
censys "parsed.issuer.organization: Let's Encrypt" --query_type=certs

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

censys_command_line-1.0.3.tar.gz (4.8 kB view hashes)

Uploaded Source

Built Distribution

censys_command_line-1.0.3-py2.py3-none-any.whl (12.0 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page