lib/mihari/analyzers/pulsedive.rb in mihari-4.3.0 vs lib/mihari/analyzers/pulsedive.rb in mihari-4.4.0

- old
+ new

@@ -7,17 +7,23 @@ class Pulsedive < Base include Mixins::Refang param :query + # @return [String, nil] attr_reader :type + # @return [String, nil] + attr_reader :api_key + def initialize(*args, **kwargs) super @query = refang(query) @type = TypeChecker.type(query) + + @api_key = kwargs[:api_key] || Mihari.config.pulsedive_api_key end def artifacts search || [] end @@ -27,10 +33,10 @@ def configuration_keys %w[pulsedive_api_key] end def api - @api ||= ::Pulsedive::API.new(Mihari.config.pulsedive_api_key) + @api ||= ::Pulsedive::API.new(api_key) end # # Check whether a type is valid or not #