Module: Arachni::Framework::Parts::Check
- Included in:
- Arachni::Framework
- Defined in:
- lib/arachni/framework/parts/check.rb
Overview
Provides a Check::Manager and related helpers.
Instance Attribute Summary collapse
- #checks ⇒ Arachni::Check::Manager readonly
Instance Method Summary collapse
- #initialize ⇒ Object
-
#list_checks(patterns = nil) ⇒ Array<Hash>
Information about all available Checks.
Instance Attribute Details
#checks ⇒ Arachni::Check::Manager (readonly)
19 20 21 |
# File 'lib/arachni/framework/parts/check.rb', line 19 def checks @checks end |
Instance Method Details
#initialize ⇒ Object
21 22 23 24 |
# File 'lib/arachni/framework/parts/check.rb', line 21 def initialize super @checks = Arachni::Check::Manager.new( self ) end |
#list_checks(patterns = nil) ⇒ Array<Hash>
Returns Information about all available Checks.
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/arachni/framework/parts/check.rb', line 28 def list_checks( patterns = nil ) loaded = @checks.loaded begin @checks.clear @checks.available.map do |name| path = @checks.name_to_path( name ) next if patterns && !@checks.matches_globs?( path, patterns ) @checks[name].info.merge( shortname: name, author: [@checks[name].info[:author]]. flatten.map { |a| a.strip }, path: path.strip, platforms: @checks[name].platforms, elements: @checks[name].elements ) end.compact ensure @checks.clear @checks.load loaded end end |