示例#1
0
def get_shodan_alert(api_client: shodan.Shodan, alert_name: str) -> dict:
    """Get a configured Shodan alert based on its name."""
    current_alerts = api_client.alerts()
    found_alert = None
    for alert in current_alerts:
        if alert['name'] == alert_name:
            found_alert = alert
    return found_alert