Sha256: 8cbdf9111e055706a19760b5a7783958fc961b5591e624cb2ec7fb0442da5bde

Contents?: true

Size: 628 Bytes

Versions: 2

Compression:

Stored size: 628 Bytes

Contents

# frozen_string_literal: true

module Shodan
  module Clients
    class DNS < Base
      # Look up the IP address for the provided list of hostnames.
      def resolve(*hostnames)
        get("/dns/resolve", hostnames: hostnames.join(","))
      end

      # Look up the hostnames that have been defined for the
      # given list of IP addresses.
      def reverse(*ips)
        get("/dns/reverse", ips: ips.join(","))
      end

      # Get all the subdomains and other DNS entries for the given domain. Uses 1 query credit per lookup.
      def domain(domain)
        get("/dns/domain/#{domain}")
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
shodanx-0.2.1 lib/shodan/clients/dns.rb
shodanx-0.2.0 lib/shodan/clients/dns.rb