module documentation

Undocumented

Function aggregate_facet Merge the results from multiple facet API queries into a single result object. This is necessary because a user might be monitoring a lot of IPs/ networks so it doesn't fit into a single API call.
Function alert Manage the network alerts for your account
Function alert_clear Remove all alerts
Function alert_create Create a network alert to monitor an external network
Function alert_disable_trigger Disable a trigger for the alert
Function alert_domain Create a network alert based on a domain name
Function alert_download Download all information for monitored networks/ IPs.
Function alert_enable_trigger Enable a trigger for the alert
Function alert_export Export the configuration of monitored networks/ IPs to be used by ``shodan alert import``.
Function alert_import Export the configuration of monitored networks/ IPs to be used by ``shodan alert import``.
Function alert_info Show information about a specific alert
Function alert_list List all the active alerts
Function alert_list_triggers List the available notification triggers
Function alert_remove Remove the specified alert
Function alert_stats Show summary information about your monitored networks
Constant MAX_QUERY_LENGTH Undocumented
def aggregate_facet(api, networks, facets): (source)

Merge the results from multiple facet API queries into a single result object. This is necessary because a user might be monitoring a lot of IPs/ networks so it doesn't fit into a single API call.

@click.group()
def alert(): (source)

Manage the network alerts for your account

@alert.command(name='clear')
def alert_clear(): (source)

Remove all alerts

@alert.command(name='create')
@click.argument('name', metavar='<name>')
@click.argument('netblocks', metavar='<netblocks>', nargs=-1)
def alert_create(name, netblocks): (source)

Create a network alert to monitor an external network

@alert.command(name='disable')
@click.argument('alert_id', metavar='<alert ID>')
@click.argument('trigger', metavar='<trigger name>')
def alert_disable_trigger(alert_id, trigger): (source)

Disable a trigger for the alert

@alert.command(name='domain')
@click.argument('domain', metavar='<domain>', type=str)
@click.option('--triggers', help='List of triggers to enable', default='malware,industrial_control_system,internet_scanner,iot,open_database,new_service,ssl_expired,vulnerable')
def alert_domain(domain, triggers): (source)

Create a network alert based on a domain name

@alert.command(name='download')
@click.argument('filename', metavar='<filename>', type=str)
@click.option('--alert-id', help='Specific alert ID to download the data of', default=None)
def alert_download(filename, alert_id): (source)

Download all information for monitored networks/ IPs.

@alert.command(name='enable')
@click.argument('alert_id', metavar='<alert ID>')
@click.argument('trigger', metavar='<trigger name>')
def alert_enable_trigger(alert_id, trigger): (source)

Enable a trigger for the alert

@alert.command(name='export')
@click.option('--filename', help='Name of the output file', default='shodan-alerts.json.gz', type=str)
def alert_export(filename): (source)

Export the configuration of monitored networks/ IPs to be used by ``shodan alert import``.

@alert.command(name='import')
@click.argument('filename', metavar='<export file>')
def alert_import(filename): (source)

Export the configuration of monitored networks/ IPs to be used by ``shodan alert import``.

@alert.command(name='info')
@click.argument('alert', metavar='<alert id>')
def alert_info(alert): (source)

Show information about a specific alert

@alert.command(name='list')
@click.option('--expired', help='Whether or not to show expired alerts.', default=True, type=bool)
def alert_list(expired): (source)

List all the active alerts

@alert.command(name='triggers')
def alert_list_triggers(): (source)

List the available notification triggers

@alert.command(name='remove')
@click.argument('alert_id', metavar='<alert ID>')
def alert_remove(alert_id): (source)

Remove the specified alert

@alert.command(name='stats')
@click.option('--limit', help='The number of results to return.', default=10, type=int)
@click.option('--filename', '-O', help='Save the results in a CSV file of the provided name.', default=None)
@click.argument('facets', metavar='<facets ...>', nargs=-1)
def alert_stats(limit, filename, facets): (source)

Show summary information about your monitored networks

MAX_QUERY_LENGTH: int = (source)

Undocumented

Value
1000