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
<[email protected]>
<[email protected]> <br/>
@version: 0.1.1
Constant Summary collapse
- EXTENSION =
the extension of the Arachni Framework Report files
'.afr'
Constants inherited from ComponentManager
ComponentManager::EXCLUDE, ComponentManager::WILDCARD
Instance Method Summary collapse
- #extension ⇒ Object
-
#initialize(opts) ⇒ Manager
constructor
A new instance of Manager.
- #paths ⇒ Object
-
#run(audit_store, run_afr = true) ⇒ Object
Takes care of report execution.
- #run_one(name, audit_store) ⇒ Object
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
Instance Method Details
#extension ⇒ Object
78 79 80 |
# File 'lib/arachni/report/manager.rb', line 78 def extension return EXTENSION end |
#paths ⇒ Object
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 |
#run(audit_store, run_afr = true) ⇒ Object
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 |
#run_one(name, audit_store) ⇒ Object
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 |