Sha256: 9a8b20439ae43a60a4857eae2af40eca962a73dea440ef993129d6c505405b6f

Contents?: true

Size: 721 Bytes

Versions: 9

Compression:

Stored size: 721 Bytes

Contents

# frozen_string_literal: true

module Mihari
  module Analyzers
    class Crtsh < Base
      # @return [Boolean]
      attr_reader :exclude_expired

      #
      # @param [String] query
      # @param [Hash, nil] options
      # @param [Bool] exclude_expired
      #
      def initialize(query, options: nil, exclude_expired: true)
        super(query, options: options)

        @exclude_expired = exclude_expired
      end

      def artifacts
        exclude = exclude_expired ? "expired" : nil
        client.search(query, exclude: exclude)
      end

      private

      #
      # @return [Mihari::Clients::Crtsh]
      #
      def client
        @client ||= Mihari::Clients::Crtsh.new
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
mihari-5.6.0 lib/mihari/analyzers/crtsh.rb
mihari-5.5.0 lib/mihari/analyzers/crtsh.rb
mihari-5.4.9 lib/mihari/analyzers/crtsh.rb
mihari-5.4.8 lib/mihari/analyzers/crtsh.rb
mihari-5.4.7 lib/mihari/analyzers/crtsh.rb
mihari-5.4.6 lib/mihari/analyzers/crtsh.rb
mihari-5.4.5 lib/mihari/analyzers/crtsh.rb
mihari-5.4.4 lib/mihari/analyzers/crtsh.rb
mihari-5.4.3 lib/mihari/analyzers/crtsh.rb