lib/mihari/analyzers/pulsedive.rb in mihari-3.6.0 vs lib/mihari/analyzers/pulsedive.rb in mihari-3.6.1

- old
+ new

@@ -33,13 +33,23 @@ def api @api ||= ::Pulsedive::API.new(Mihari.config.pulsedive_api_key) end + # + # Check whether a type is valid or not + # + # @return [Boolean] + # def valid_type? %w[ip domain].include? type end + # + # Search + # + # @return [Array<String>] + # def search raise InvalidInputError, "#{query}(type: #{type || "unknown"}) is not supported." unless valid_type? indicator = api.indicator.get_by_value(query) iid = indicator["iid"]