Class: Mihari::Analyzers::SecurityTrailsDomainFeed
- Defined in:
- lib/mihari/analyzers/securitytrails_domain_feed.rb
Instance Attribute Summary collapse
-
#api ⇒ Object
readonly
Returns the value of attribute api.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#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.
Attributes inherited from Base
Instance Method Summary collapse
- #artifacts ⇒ Object
-
#initialize(regexp, type: "registered", title: nil, description: nil, tags: []) ⇒ SecurityTrailsDomainFeed
constructor
A new instance of SecurityTrailsDomainFeed.
Methods inherited from Base
Constructor Details
#initialize(regexp, type: "registered", title: nil, description: nil, tags: []) ⇒ SecurityTrailsDomainFeed
Returns a new instance of SecurityTrailsDomainFeed.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/mihari/analyzers/securitytrails_domain_feed.rb', line 15 def initialize(regexp, type: "registered", title: nil, description: nil, tags: []) super() @api = ::SecurityTrails::API.new @_regexp = regexp @type = type raise ArgumentError, "#{@_regexp} is not a valid regexp" unless regexp raise ArgumentError, "#{type} is not a valid type" unless valid_type? @title = title || "SecurityTrails domain feed lookup" @description = description || "Regexp = /#{@_regexp}/" @tags = end |
Instance Attribute Details
#api ⇒ Object (readonly)
Returns the value of attribute api.
8 9 10 |
# File 'lib/mihari/analyzers/securitytrails_domain_feed.rb', line 8 def api @api end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
12 13 14 |
# File 'lib/mihari/analyzers/securitytrails_domain_feed.rb', line 12 def description @description end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
13 14 15 |
# File 'lib/mihari/analyzers/securitytrails_domain_feed.rb', line 13 def @tags end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
11 12 13 |
# File 'lib/mihari/analyzers/securitytrails_domain_feed.rb', line 11 def title @title end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
9 10 11 |
# File 'lib/mihari/analyzers/securitytrails_domain_feed.rb', line 9 def type @type end |
Instance Method Details
#artifacts ⇒ Object
30 31 32 |
# File 'lib/mihari/analyzers/securitytrails_domain_feed.rb', line 30 def artifacts lookup || [] end |