Class: Arachni::Report::Manager
- Inherits:
-
ComponentManager
- Object
- Hash
- ComponentManager
- Arachni::Report::Manager
- Includes:
- Module::Utilities
- Defined in:
- lib/arachni/report/manager.rb
Overview
Arachni::Report::Manager class
Holds and manages the registry of the reports.
@author: Tasos "Zapotek" Laskos
<tasos.laskos@gmail.com>
<zapotek@segfault.gr> <br/>
@version: 0.1.1
Constant Summary
- EXTENSION =
the extension of the Arachni Framework Report files
'.afr'
Constants inherited from ComponentManager
ComponentManager::EXCLUDE, ComponentManager::WILDCARD
Instance Method Summary (collapse)
- - (Object) extension
-
- (Manager) initialize(opts)
constructor
A new instance of Manager.
- - (Object) paths
-
- (Object) run(audit_store, run_afr = true)
Takes care of report execution.
- - (Object) run_one(name, audit_store)
Methods included from Module::Utilities
#exception_jail, #get_path, #hash_keys_to_str, #normalize_url, #read_file, #seed, #uri_decode, #uri_encode, #uri_parse, #uri_parser, #url_sanitize
Methods inherited from ComponentManager
#[], #available, #load, #name_to_path, #parse, #path_to_name, #prep_opts, #wilcard_to_names
Methods included from UI::Output
#buffer, #debug!, #debug?, #flush_buffer, #mute!, #muted?, #only_positives!, #only_positives?, #print_bad, #print_debug, #print_debug_backtrace, #print_debug_pp, #print_error, #print_error_backtrace, #print_info, #print_line, #print_ok, #print_status, #print_verbose, #reroute_to_file, #reroute_to_file?, #uncap_buffer!, #unmute!, #verbose!, #verbose?
Constructor Details
- (Manager) initialize(opts)
A new instance of Manager
38 39 40 41 |
# File 'lib/arachni/report/manager.rb', line 38 def initialize( opts ) super( opts.dir['reports'], Arachni::Reports ) @opts = opts end |
Instance Method Details
- (Object) extension
78 79 80 |
# File 'lib/arachni/report/manager.rb', line 78 def extension return EXTENSION end |
- (Object) paths
72 73 74 75 |
# File 'lib/arachni/report/manager.rb', line 72 def paths cpaths = paths = Dir.glob( File.join( "#{@lib}", "*.rb" ) ) return paths.reject { |path| helper?( path ) } end |
- (Object) run(audit_store, run_afr = true)
Takes care of report execution
50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/arachni/report/manager.rb', line 50 def run( audit_store, run_afr = true ) if run_afr # run the default report first run_one( 'afr', audit_store.deep_clone ) delete( 'afr' ) end self.each { |name, report| exception_jail( false ){ run_one( name, audit_store.deep_clone ) } } end |
- (Object) run_one(name, audit_store)
65 66 67 68 69 70 |
# File 'lib/arachni/report/manager.rb', line 65 def run_one( name, audit_store ) report = self.[](name).new( audit_store.deep_clone, prep_opts( name, self.[](name), @opts.reports[name] ) ) report.run( ) end |