Class: Mihari::Analyzers::Censys
- Inherits:
-
Base
- Object
- Base
- Mihari::Analyzers::Censys
show all
- Defined in:
- lib/mihari/analyzers/censys.rb
Constant Summary
Mixins::Retriable::DEFAULT_ON
Instance Attribute Summary collapse
Attributes inherited from Base
#rule
Instance Method Summary
collapse
Methods inherited from Base
inherited, #normalized_artifacts, #run, #run_emitter, #source
#retry_on_error
#configuration_values
#normalize_asn
Constructor Details
#initialize(*args, **kwargs) ⇒ Censys
18
19
20
21
22
23
|
# File 'lib/mihari/analyzers/censys.rb', line 18
def initialize(*args, **kwargs)
super(*args, **kwargs)
@id = kwargs[:id] || Mihari.config.censys_id
@secret = kwargs[:secret] || Mihari.config.censys_secret
end
|
Instance Attribute Details
#id ⇒ String?
13
14
15
|
# File 'lib/mihari/analyzers/censys.rb', line 13
def id
@id
end
|
#secret ⇒ String?
16
17
18
|
# File 'lib/mihari/analyzers/censys.rb', line 16
def secret
@secret
end
|
Instance Method Details
#artifacts ⇒ Object
25
26
27
|
# File 'lib/mihari/analyzers/censys.rb', line 25
def artifacts
search
end
|
29
30
31
|
# File 'lib/mihari/analyzers/censys.rb', line 29
def configured?
configuration_keys.all? { |key| Mihari.config.send(key) } || (id? && secret?)
end
|