class Shodan::Clients::DNS

Public Instance Methods

domain(domain) click to toggle source

Get all the subdomains and other DNS entries for the given domain. Uses 1 query credit per lookup.

# File lib/shodan/clients/dns.rb, line 18
def domain(domain)
  get("/dns/domain/#{domain}")
end
resolve(*hostnames) click to toggle source

Look up the IP address for the provided list of hostnames.

# File lib/shodan/clients/dns.rb, line 7
def resolve(*hostnames)
  get("/dns/resolve", hostnames: hostnames.join(","))
end
reverse(*ips) click to toggle source

Look up the hostnames that have been defined for the given list of IP addresses.

# File lib/shodan/clients/dns.rb, line 13
def reverse(*ips)
  get("/dns/reverse", ips: ips.join(","))
end