Class: PassiveTotal::Client::DNS
- Defined in:
- lib/passivetotal/clients/dns.rb
Constant Summary
Constants inherited from Base
Base::BASE_URL, Base::HOST, Base::VERSION
Instance Method Summary collapse
-
#passive(query, start_at: nil, end_at: nil, timeout: 7) ⇒ Hash
Retrieves the passive DNS results from active account sources.
-
#passive_unique(query) ⇒ Hash
Retrieves the unique passive DNS results from active account sources.
-
#search(query) ⇒ Hash
Searches the Passive DNS data for a keyword query.
Methods inherited from Base
Constructor Details
This class inherits a constructor from PassiveTotal::Client::Base
Instance Method Details
#passive(query, start_at: nil, end_at: nil, timeout: 7) ⇒ Hash
Retrieves the passive DNS results from active account sources. api.passivetotal.org/api/docs/#api-Passive_DNS-GetV2DnsPassive
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/passivetotal/clients/dns.rb', line 17 def passive(query, start_at: nil, end_at: nil, timeout: 7) params = { query: query, start: start_at, end: end_at, timeout: timeout, }.compact _get("/dns/passive", params) { |json| json } end |
#passive_unique(query) ⇒ Hash
Retrieves the unique passive DNS results from active account sources. api.passivetotal.org/api/docs/#api-Passive_DNS-GetV2DnsPassiveUnique
36 37 38 39 40 41 42 |
# File 'lib/passivetotal/clients/dns.rb', line 36 def passive_unique(query) params = { query: query, }.compact _get("/dns/passive/unique", params) { |json| json } end |
#search(query) ⇒ Hash
Searches the Passive DNS data for a keyword query. api.passivetotal.org/api/docs/#api-Passive_DNS-GetV2DnsSearchKeyword
52 53 54 55 56 57 58 |
# File 'lib/passivetotal/clients/dns.rb', line 52 def search(query) params = { query: query }.compact _get("/dns/search/keyword", params) { |json| json } end |