Sha256: 18f644d3c932dc7cebea307eee3bf7963c6c48d2b4cab62781cc870fb36e2f42
Contents?: true
Size: 661 Bytes
Versions: 14
Compression:
Stored size: 661 Bytes
Contents
# frozen_string_literal: true module Mihari module Clients # # Shodan Internet DB API client # class ShodanInternetDB < Base # # @param [String] base_url # @param [Hash] headers # @param [Integer, nil] timeout # def initialize(base_url = "https://internetdb.shodan.io", headers: {}, timeout: nil) super(base_url, headers: headers, timeout: timeout) end # # @param [String] ip # # @return [Mihari::Structs::Shodan::InternetDBResponse] # def query(ip) Structs::Shodan::InternetDBResponse.from_dynamic! get_json("/#{ip}") end end end end
Version data entries
14 entries across 14 versions & 1 rubygems