Class: Mihari::Analyzers::Clients::OTX
- Inherits:
-
Object
- Object
- Mihari::Analyzers::Clients::OTX
- Defined in:
- lib/mihari/analyzers/clients/otx.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
Instance Method Summary collapse
-
#initialize(api_key) ⇒ OTX
constructor
A new instance of OTX.
- #query_by_domain(domain) ⇒ Object
- #query_by_ip(ip) ⇒ Object
Constructor Details
#initialize(api_key) ⇒ OTX
Returns a new instance of OTX.
9 10 11 |
# File 'lib/mihari/analyzers/clients/otx.rb', line 9 def initialize(api_key) @api_key = api_key end |
Instance Attribute Details
#api_key ⇒ Object (readonly)
Returns the value of attribute api_key.
7 8 9 |
# File 'lib/mihari/analyzers/clients/otx.rb', line 7 def api_key @api_key end |
Instance Method Details
#query_by_domain(domain) ⇒ Object
17 18 19 |
# File 'lib/mihari/analyzers/clients/otx.rb', line 17 def query_by_domain(domain) get "https://otx.alienvault.com/api/v1/indicators/domain/#{domain}/passive_dns" end |
#query_by_ip(ip) ⇒ Object
13 14 15 |
# File 'lib/mihari/analyzers/clients/otx.rb', line 13 def query_by_ip(ip) get "https://otx.alienvault.com/api/v1/indicators/IPv4/#{ip}/passive_dns" end |