lib/tasks/search_greynoise.rb
def run
    super

    entity_name = _get_entity_name
    entity_type = _get_entity_type_string

    api_key =_get_task_config("greynoise_api_key")

    headers = { "Accept" =>  "application/json" , "Key" => "#{api_key}" }

    unless api_key or username
      _log_error "unable to proceed, no API key for Greynoise provided"
      return
    end

    #search for EmailAddress if it a partof  in a data breach
    if entity_type == "IpAddress"
      search_greynoise entity_name, headers
    else
      _log_error "Unsupported entity type"
    end

  end
## Default method, subclasses must override this
Default method, subclasses must override this
Default method subclasses must override this
def run
    super
    entity_name = _get_entity_name
    entity_type = _get_entity_type_string
    api_key =_get_task_config("greynoise_api_key")
    headers = { "Accept" =>  "application/json" , "Key" => "#{api_key}" }
    unless api_key or username
      _log_error "unable to proceed, no API key for Greynoise provided"
      return
    end
    if entity_type == "IpAddress"
      search_greynoise entity_name, headers
    else
      _log_error "Unsupported entity type"
    end
  end
def run super entity_name = _get_entity_name entity_type = _get_entity_type_string api_key = _get_task_config ( "greynoise_api_key" ) headers = { "Accept" => "application/json" , "Key" => "#{api_key}" } unless api_key or username _log_error "unable to proceed, no API key for Greynoise provided" return end if entity_type == "IpAddress" search_greynoise entity_name , headers else _log_error "Unsupported entity type" end end
Default method, subclasses must override this
Default method subclasses must override this
#search for EmailAddress if it a partof  in a data breach