Class: Mihari::Analyzers::Censys
- Defined in:
- lib/mihari/analyzers/censys.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#query ⇒ Object
readonly
Returns the value of attribute query.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #artifacts ⇒ Object
-
#initialize(query, title: nil, description: nil, tags: [], type: "ipv4") ⇒ Censys
constructor
A new instance of Censys.
Methods inherited from Base
inherited, #run, #run_emitter, #source
Methods included from Retriable
Methods included from Configurable
#configuration_status, #configured?
Constructor Details
#initialize(query, title: nil, description: nil, tags: [], type: "ipv4") ⇒ Censys
Returns a new instance of Censys.
14 15 16 17 18 19 20 21 22 |
# File 'lib/mihari/analyzers/censys.rb', line 14 def initialize(query, title: nil, description: nil, tags: [], type: "ipv4") super() @query = query @title = title || "Censys lookup" @description = description || "query = #{query}" @tags = @type = type end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
9 10 11 |
# File 'lib/mihari/analyzers/censys.rb', line 9 def description @description end |
#query ⇒ Object (readonly)
Returns the value of attribute query.
10 11 12 |
# File 'lib/mihari/analyzers/censys.rb', line 10 def query @query end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
11 12 13 |
# File 'lib/mihari/analyzers/censys.rb', line 11 def @tags end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
8 9 10 |
# File 'lib/mihari/analyzers/censys.rb', line 8 def title @title end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
12 13 14 |
# File 'lib/mihari/analyzers/censys.rb', line 12 def type @type end |
Instance Method Details
#artifacts ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/mihari/analyzers/censys.rb', line 24 def artifacts case type when "ipv4" ipv4_lookup when "websites" websites_lookup when "certificates" certificates_lookup else raise InvalidInputError, "#{type} type is not supported." unless valid_type? end end |