Sha256: b65d14353c650f629d75e0541a0a9041c7be9745064378988f23653c15a5c7bf
Contents?: true
Size: 766 Bytes
Versions: 14
Compression:
Stored size: 766 Bytes
Contents
# frozen_string_literal: true require "crtsh" module Mihari module Analyzers class Crtsh < Base attr_reader :title attr_reader :description attr_reader :query attr_reader :tags def initialize(query, title: nil, description: nil, tags: []) super() @query = query @title = title || "crt.sh lookup" @description = description || "query = #{query}" @tags = tags end def artifacts results = search results.map { |result| result.dig("name_value") }.compact.uniq end private def api @api ||= ::Crtsh::API.new end def search api.search(query) rescue ::Crtsh::Error => _e [] end end end end
Version data entries
14 entries across 14 versions & 1 rubygems