lib/mihari/analyzers/crtsh.rb in mihari-5.1.0 vs lib/mihari/analyzers/crtsh.rb in mihari-5.1.1

- old
+ new

@@ -1,9 +1,7 @@ # frozen_string_literal: true -require "crtsh" - module Mihari module Analyzers class Crtsh < Base param :query @@ -19,23 +17,24 @@ end.flatten end private - def api - @api ||= ::Crtsh::API.new + # + # @return [Mihari::Clients::Crtsh] + # + def client + @client ||= Mihari::Clients::Crtsh.new end # # Search # # @return [Array<Hash>] # def search exclude = exclude_expired ? "expired" : nil - api.search(query, exclude: exclude) - rescue ::Crtsh::Error => _e - [] + client.search(query, exclude: exclude) end end end end