Sha256: 3ee1535c67a45e128b01f6a4c6e8f200c2abb2927d79d58a6674b64b2e6b9edd
Contents?: true
Size: 1.23 KB
Versions: 11
Compression:
Stored size: 1.23 KB
Contents
# frozen_string_literal: true module Mihari module Analyzers # # VirusTotal Intelligence analyzer # class VirusTotalIntelligence < Base # @return [String, nil] attr_reader :api_key # # @param [String] query # @param [Hash, nll] options # @param [String, nil] api_key # def initialize(query, options: nil, api_key: nil) super(query, options:) @api_key = api_key || Mihari.config.virustotal_api_key end def artifacts client.intel_search_with_pagination(query, pagination_limit:).map(&:artifacts).flatten end class << self # # @return [String] # def key "virustotal_intelligence" end # # @return [Array<String>, nil] # def key_aliases ["vt_intel"] end # # @return [Array<String>] # def configuration_keys %w[virustotal_api_key] end end private # # VT API # # @return [::VirusTotal::API] # def client Clients::VirusTotal.new( api_key:, pagination_interval:, timeout: ) end end end end
Version data entries
11 entries across 11 versions & 1 rubygems