class Mihari::Analyzers::OTX

Attributes

type[R]

Public Class Methods

new(*args, **kwargs) click to toggle source
Calls superclass method Mihari::Analyzers::Base::new
# File lib/mihari/analyzers/otx.rb, line 17
def initialize(*args, **kwargs)
  super

  @query = refang(query)
  @type = TypeChecker.type(query)
end

Public Instance Methods

artifacts() click to toggle source
# File lib/mihari/analyzers/otx.rb, line 24
def artifacts
  search || []
end

Private Instance Methods

configuration_keys() click to toggle source
# File lib/mihari/analyzers/otx.rb, line 30
def configuration_keys
  %w[otx_api_key]
end
domain_client() click to toggle source
# File lib/mihari/analyzers/otx.rb, line 34
def domain_client
  @domain_client ||= ::OTX::Domain.new(Mihari.config.otx_api_key)
end
ip_client() click to toggle source
# File lib/mihari/analyzers/otx.rb, line 38
def ip_client
  @ip_client ||= ::OTX::IP.new(Mihari.config.otx_api_key)
end
valid_type?() click to toggle source

Check whether a type is valid or not

@return [Boolean]

# File lib/mihari/analyzers/otx.rb, line 47
def valid_type?
  %w[ip domain].include? type
end