Class: Mihari::Analyzers::PassiveTotal
Constant Summary
Mixins::Retriable::DEFAULT_ON
Instance Attribute Summary collapse
Attributes inherited from Base
#rule
Instance Method Summary
collapse
#refang
Methods inherited from Base
inherited, #normalized_artifacts, #run, #run_emitter, #source
#retry_on_error
#configuration_values
#normalize_asn
Constructor Details
#initialize(*args, **kwargs) ⇒ PassiveTotal
21
22
23
24
25
26
27
28
29
|
# File 'lib/mihari/analyzers/passivetotal.rb', line 21
def initialize(*args, **kwargs)
super(*args, **kwargs)
@query = refang(query)
@type = TypeChecker.type(query)
@username = kwargs[:username] || Mihari.config.passivetotal_username
@api_key = kwargs[:api_key] || Mihari.config.passivetotal_api_key
end
|
Instance Attribute Details
#api_key ⇒ String?
19
20
21
|
# File 'lib/mihari/analyzers/passivetotal.rb', line 19
def api_key
@api_key
end
|
#type ⇒ String?
13
14
15
|
# File 'lib/mihari/analyzers/passivetotal.rb', line 13
def type
@type
end
|
#username ⇒ String?
16
17
18
|
# File 'lib/mihari/analyzers/passivetotal.rb', line 16
def username
@username
end
|
Instance Method Details
#artifacts ⇒ Object
31
32
33
|
# File 'lib/mihari/analyzers/passivetotal.rb', line 31
def artifacts
search || []
end
|
35
36
37
|
# File 'lib/mihari/analyzers/passivetotal.rb', line 35
def configured?
configuration_keys.all? { |key| Mihari.config.send(key) } || (username? && api_key?)
end
|