Class: Shodan::Clients::DNS
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#domain(domain) ⇒ Object
Get all the subdomains and other DNS entries for the given domain.
-
#resolve(*hostnames) ⇒ Object
Look up the IP address for the provided list of hostnames.
-
#reverse(*ips) ⇒ Object
Look up the hostnames that have been defined for the given list of IP addresses.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Shodan::Clients::Base
Instance Method Details
#domain(domain) ⇒ Object
Get all the subdomains and other DNS entries for the given domain. Uses 1 query credit per lookup.
18 19 20 |
# File 'lib/shodan/clients/dns.rb', line 18 def domain(domain) get("/dns/domain/#{domain}") end |
#resolve(*hostnames) ⇒ Object
Look up the IP address for the provided list of hostnames.
7 8 9 |
# File 'lib/shodan/clients/dns.rb', line 7 def resolve(*hostnames) get("/dns/resolve", hostnames: hostnames.join(",")) end |
#reverse(*ips) ⇒ Object
Look up the hostnames that have been defined for the given list of IP addresses.
13 14 15 |
# File 'lib/shodan/clients/dns.rb', line 13 def reverse(*ips) get("/dns/reverse", ips: ips.join(",")) end |