Sha256: 53fddfb8c97b3c0d3a7868262b1a5986d6c9bca3179b1fbfc09488b94c811dac
Contents?: true
Size: 802 Bytes
Versions: 15
Compression:
Stored size: 802 Bytes
Contents
# frozen_string_literal: true module Mihari module Clients class Crtsh < Base # # @param [String] base_url # @param [Hash] headers # def initialize(base_url = "https://crt.sh", headers: {}) super(base_url, headers: headers) end # # Search crt.sh by a given identity # # @param [String] identity # @param [String, nil] match "=", "ILIKE", "LIKE", "single", "any" or nil # @param [String, nil] exclude "expired" or nil # # @return [Array<Hash>] # def search(identity, match: nil, exclude: nil) params = { identity: identity, match: match, exclude: exclude, output: "json" }.compact res = get("/", params: params) JSON.parse(res.body.to_s) end end end end
Version data entries
15 entries across 15 versions & 1 rubygems