arachni 0.3 → 0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/ACKNOWLEDGMENTS.md +1 -1
- data/CHANGELOG.md +146 -0
- data/CONTRIBUTORS.md +1 -0
- data/HACKING.md +3 -3
- data/README.md +81 -49
- data/Rakefile +11 -14
- data/bin/arachni +4 -8
- data/bin/arachni_rpc +17 -0
- data/bin/arachni_rpcd +18 -0
- data/bin/arachni_rpcd_monitor +18 -0
- data/bin/arachni_web +25 -48
- data/bin/arachni_web_autostart +3 -3
- data/conf/README.webui.yaml.txt +7 -21
- data/external/metasploit/plugins/arachni.rb +0 -7
- data/extras/modules/recon/raft_dirs.rb +108 -0
- data/extras/modules/recon/raft_dirs/raft-large-directories.txt +62290 -0
- data/extras/modules/recon/raft_files.rb +110 -0
- data/extras/modules/recon/raft_files/raft-large-files.txt +37037 -0
- data/extras/modules/recon/svn_digger_dirs.rb +108 -0
- data/extras/modules/recon/svn_digger_dirs/Licence.txt +674 -0
- data/extras/modules/recon/svn_digger_dirs/ReadMe-Arachni.txt +4 -0
- data/extras/modules/recon/svn_digger_dirs/ReadMe.txt +6 -0
- data/extras/modules/recon/svn_digger_dirs/all-dirs.txt +5960 -0
- data/extras/modules/recon/svn_digger_files.rb +114 -0
- data/extras/modules/recon/svn_digger_files/Licence.txt +674 -0
- data/extras/modules/recon/svn_digger_files/ReadMe-Arachni.txt +4 -0
- data/extras/modules/recon/svn_digger_files/ReadMe.txt +6 -0
- data/extras/modules/recon/svn_digger_files/all-extensionless.txt +25419 -0
- data/extras/modules/recon/svn_digger_files/all.txt +43135 -0
- data/lib/arachni.rb +2 -7
- data/lib/{audit_store.rb → arachni/audit_store.rb} +68 -60
- data/lib/{component_manager.rb → arachni/component_manager.rb} +8 -8
- data/lib/{component_options.rb → arachni/component_options.rb} +34 -4
- data/lib/{crypto → arachni/crypto}/rsa_aes_cbc.rb +1 -2
- data/lib/arachni/database.rb +4 -0
- data/lib/arachni/database/base.rb +125 -0
- data/lib/arachni/database/hash.rb +384 -0
- data/lib/arachni/database/queue.rb +93 -0
- data/lib/{exceptions.rb → arachni/exceptions.rb} +1 -1
- data/lib/arachni/framework.rb +899 -0
- data/lib/{http.rb → arachni/http.rb} +63 -166
- data/lib/{issue.rb → arachni/issue.rb} +46 -17
- data/lib/{mixins → arachni/mixins}/observable.rb +1 -1
- data/lib/arachni/mixins/progress_bar.rb +81 -0
- data/lib/arachni/mixins/terminal.rb +106 -0
- data/lib/{module.rb → arachni/module.rb} +0 -0
- data/lib/{module → arachni/module}/auditor.rb +250 -86
- data/lib/{module → arachni/module}/base.rb +8 -18
- data/lib/{module → arachni/module}/element_db.rb +10 -2
- data/lib/{module → arachni/module}/key_filler.rb +1 -1
- data/lib/arachni/module/manager.rb +145 -0
- data/lib/{module → arachni/module}/output.rb +6 -1
- data/lib/{module → arachni/module}/trainer.rb +48 -52
- data/lib/{module → arachni/module}/utilities.rb +66 -15
- data/lib/{nokogiri → arachni/nokogiri}/xml/node.rb +0 -0
- data/lib/arachni/options.rb +986 -0
- data/lib/{parser.rb → arachni/parser.rb} +0 -0
- data/lib/{parser → arachni/parser}/auditable.rb +111 -32
- data/lib/{parser → arachni/parser}/elements.rb +28 -20
- data/lib/{parser → arachni/parser}/page.rb +20 -3
- data/lib/{parser → arachni/parser}/parser.rb +100 -63
- data/lib/{plugin.rb → arachni/plugin.rb} +0 -0
- data/lib/{plugin → arachni/plugin}/base.rb +43 -6
- data/lib/{plugin → arachni/plugin}/manager.rb +40 -13
- data/lib/{report.rb → arachni/report.rb} +0 -0
- data/lib/{report → arachni/report}/base.rb +43 -2
- data/lib/{report → arachni/report}/manager.rb +7 -18
- data/lib/arachni/rpc/client/base.rb +42 -0
- data/lib/{rpc/xml → arachni/rpc}/client/dispatcher.rb +12 -13
- data/lib/arachni/rpc/client/instance.rb +62 -0
- data/lib/arachni/rpc/server/base.rb +51 -0
- data/lib/arachni/rpc/server/dispatcher.rb +438 -0
- data/lib/arachni/rpc/server/framework.rb +1163 -0
- data/lib/arachni/rpc/server/instance.rb +184 -0
- data/lib/{rpc/xml → arachni/rpc}/server/module/manager.rb +8 -5
- data/lib/arachni/rpc/server/node.rb +267 -0
- data/lib/{rpc/xml → arachni/rpc}/server/options.rb +6 -35
- data/lib/{rpc/xml → arachni/rpc}/server/output.rb +29 -3
- data/lib/{rpc/xml → arachni/rpc}/server/plugin/manager.rb +5 -6
- data/lib/{ruby.rb → arachni/ruby.rb} +1 -2
- data/lib/arachni/ruby/array.rb +31 -0
- data/lib/{ruby → arachni/ruby}/object.rb +1 -1
- data/lib/{ruby → arachni/ruby}/string.rb +1 -1
- data/lib/{spider.rb → arachni/spider.rb} +83 -110
- data/lib/arachni/typhoeus/hydra.rb +7 -0
- data/lib/{typhoeus → arachni/typhoeus}/request.rb +11 -9
- data/lib/{typhoeus → arachni/typhoeus}/response.rb +4 -0
- data/lib/{ui → arachni/ui}/cli/cli.rb +154 -84
- data/lib/{ui → arachni/ui}/cli/output.rb +57 -19
- data/lib/{ui/xmlrpc → arachni/ui/rpc}/dispatcher_monitor.rb +11 -10
- data/lib/{ui/xmlrpc/xmlrpc.rb → arachni/ui/rpc/rpc.rb} +102 -158
- data/lib/{ui → arachni/ui}/web/addon_manager.rb +23 -3
- data/lib/arachni/ui/web/addons/autodeploy.rb +207 -0
- data/lib/{ui → arachni/ui}/web/addons/autodeploy/lib/manager.rb +142 -35
- data/lib/arachni/ui/web/addons/autodeploy/views/index.erb +291 -0
- data/lib/{ui → arachni/ui}/web/addons/sample.rb +1 -1
- data/lib/{ui → arachni/ui}/web/addons/sample/views/index.erb +0 -0
- data/lib/{ui → arachni/ui}/web/addons/scheduler.rb +30 -22
- data/lib/{ui → arachni/ui}/web/addons/scheduler/views/index.erb +56 -22
- data/lib/{ui → arachni/ui}/web/addons/scheduler/views/options.erb +0 -0
- data/lib/arachni/ui/web/dispatcher_manager.rb +274 -0
- data/lib/arachni/ui/web/instance_manager.rb +69 -0
- data/lib/{ui → arachni/ui}/web/log.rb +1 -1
- data/lib/arachni/ui/web/output_stream.rb +54 -0
- data/lib/{ui → arachni/ui}/web/report_manager.rb +48 -54
- data/lib/{ui → arachni/ui}/web/scheduler.rb +42 -47
- data/lib/arachni/ui/web/server.rb +1197 -0
- data/lib/{ui → arachni/ui}/web/server/db/placeholder +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/banner.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/bodybg-small.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/bodybg.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/css/smoothness/images/pbar-ani.gif +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/css/smoothness/images/ui-icons_222222_256x240.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/css/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/css/smoothness/images/ui-icons_454545_256x240.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/css/smoothness/images/ui-icons_888888_256x240.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/css/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/css/smoothness/jquery-ui-1.8.9.custom.css +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/favicon.ico +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/footer.jpg +0 -0
- data/lib/{ui/web/server/public/icons/error.png → arachni/ui/web/server/public/icons/bad.png} +0 -0
- data/lib/arachni/ui/web/server/public/icons/error.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/icons/info.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/icons/ok.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/icons/status.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/js/jquery-1.4.4.min.js +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/js/jquery-ui-1.8.9.custom.min.js +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/js/jquery-ui-timepicker.js +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/logo.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/nav-left.jpg +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/nav-right.jpg +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/nav-selected-left.jpg +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/nav-selected-right.jpg +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/plugins/sample/style.css +0 -0
- data/lib/{ui/web/server/tmp → arachni/ui/web/server/public/reports}/placeholder +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/sidebar-bottom.jpg +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/sidebar-h4.jpg +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/sidebar-top.jpg +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/spider.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/style.css +3 -2
- data/lib/arachni/ui/web/server/tmp/placeholder +0 -0
- data/lib/{ui → arachni/ui}/web/server/views/addon.erb +0 -0
- data/lib/{ui → arachni/ui}/web/server/views/addons.erb +0 -0
- data/lib/{ui → arachni/ui}/web/server/views/dispatcher_error.erb +0 -0
- data/lib/arachni/ui/web/server/views/dispatchers.erb +175 -0
- data/lib/arachni/ui/web/server/views/dispatchers_edit.erb +71 -0
- data/lib/arachni/ui/web/server/views/error.erb +22 -0
- data/lib/{ui → arachni/ui}/web/server/views/flash.erb +2 -2
- data/lib/arachni/ui/web/server/views/home.erb +60 -0
- data/lib/{ui → arachni/ui}/web/server/views/instance.erb +55 -75
- data/lib/arachni/ui/web/server/views/js/home.erb +32 -0
- data/lib/{ui → arachni/ui}/web/server/views/layout.erb +2 -2
- data/lib/{ui → arachni/ui}/web/server/views/log.erb +0 -0
- data/lib/arachni/ui/web/server/views/module.erb +30 -0
- data/lib/{ui → arachni/ui}/web/server/views/modules.erb +2 -22
- data/lib/{ui → arachni/ui}/web/server/views/options.erb +0 -0
- data/lib/{ui → arachni/ui}/web/server/views/output_results.erb +4 -4
- data/lib/{ui → arachni/ui}/web/server/views/plugins.erb +23 -12
- data/lib/{ui → arachni/ui}/web/server/views/report_formats.erb +1 -1
- data/lib/{ui → arachni/ui}/web/server/views/reports.erb +1 -1
- data/lib/{ui → arachni/ui}/web/server/views/settings.erb +59 -16
- data/lib/{ui → arachni/ui}/web/server/views/welcome.erb +3 -1
- data/lib/{ui → arachni/ui}/web/utilities.rb +8 -3
- data/lib/arachni/version.rb +16 -0
- data/modules/audit/code_injection.rb +11 -20
- data/modules/audit/code_injection_timing.rb +2 -6
- data/modules/audit/csrf.rb +8 -16
- data/modules/audit/ldapi.rb +5 -11
- data/modules/audit/os_cmd_injection.rb +5 -9
- data/modules/audit/os_cmd_injection_timing.rb +4 -8
- data/modules/audit/path_traversal.rb +7 -13
- data/modules/audit/response_splitting.rb +8 -21
- data/modules/audit/rfi.rb +6 -46
- data/modules/audit/sqli.rb +5 -11
- data/modules/audit/sqli/regexp_ids.txt +0 -6
- data/modules/audit/sqli_blind_rdiff.rb +5 -10
- data/modules/audit/sqli_blind_timing.rb +4 -9
- data/modules/audit/trainer.rb +6 -12
- data/modules/audit/unvalidated_redirect.rb +6 -17
- data/modules/audit/xpath.rb +5 -12
- data/modules/audit/xss.rb +37 -23
- data/modules/audit/xss_event.rb +5 -10
- data/modules/audit/xss_path.rb +47 -41
- data/modules/audit/xss_script_tag.rb +5 -10
- data/modules/audit/xss_tag.rb +5 -10
- data/modules/audit/xss_uri.rb +17 -89
- data/modules/recon/allowed_methods.rb +6 -15
- data/modules/recon/backdoors.rb +12 -52
- data/modules/recon/backup_files.rb +25 -88
- data/modules/recon/common_directories.rb +8 -54
- data/modules/recon/common_files.rb +7 -58
- data/modules/recon/directory_listing.rb +6 -15
- data/modules/recon/grep/captcha.rb +1 -1
- data/modules/recon/grep/credit_card.rb +62 -27
- data/modules/recon/grep/cvs_svn_users.rb +1 -1
- data/modules/recon/grep/emails.rb +1 -1
- data/modules/recon/grep/html_objects.rb +1 -1
- data/modules/recon/grep/private_ip.rb +1 -1
- data/modules/recon/grep/ssn.rb +9 -9
- data/modules/recon/htaccess_limit.rb +6 -14
- data/modules/recon/http_put.rb +7 -15
- data/modules/recon/interesting_responses.rb +7 -13
- data/modules/recon/mixed_resource.rb +100 -0
- data/modules/recon/unencrypted_password_forms.rb +8 -20
- data/modules/recon/webdav.rb +6 -16
- data/modules/recon/xst.rb +7 -13
- data/path_extractors/anchors.rb +1 -1
- data/path_extractors/forms.rb +1 -1
- data/path_extractors/frames.rb +1 -1
- data/path_extractors/generic.rb +47 -3
- data/path_extractors/links.rb +1 -1
- data/path_extractors/meta_refresh.rb +1 -1
- data/path_extractors/scripts.rb +3 -4
- data/path_extractors/sitemap.rb +1 -1
- data/plugins/autologin.rb +9 -18
- data/plugins/beep_notify.rb +51 -0
- data/plugins/cookie_collector.rb +12 -12
- data/plugins/defaults/autothrottle.rb +86 -0
- data/plugins/{content_types.rb → defaults/content_types.rb} +25 -19
- data/plugins/{healthmap.rb → defaults/healthmap.rb} +30 -18
- data/plugins/defaults/metamodules/remedies/discovery.rb +164 -0
- data/plugins/defaults/metamodules/remedies/manual_verification.rb +65 -0
- data/{metamodules/timeout_notice.rb → plugins/defaults/metamodules/remedies/timing_attacks.rb} +26 -22
- data/{metamodules → plugins/defaults/metamodules}/uniformity.rb +15 -14
- data/plugins/{profiler.rb → defaults/profiler.rb} +19 -30
- data/plugins/defaults/resolver.rb +55 -0
- data/plugins/email_notify.rb +108 -0
- data/plugins/form_dicattack.rb +8 -16
- data/plugins/http_dicattack.rb +4 -12
- data/plugins/libnotify.rb +86 -0
- data/plugins/proxy.rb +8 -17
- data/plugins/proxy/server.rb +3 -3
- data/plugins/rescan.rb +60 -0
- data/plugins/waf_detector.rb +5 -16
- data/profiles/full.afp +3 -30
- data/reports/afr.rb +2 -5
- data/reports/ap.rb +3 -1
- data/reports/html.rb +210 -68
- data/reports/html/default.erb +72 -1014
- data/reports/html/default/configuration.erb +126 -0
- data/reports/html/default/css/jquery-ui.css +570 -0
- data/reports/html/default/css/jquery.jqplot.min.css +1 -0
- data/reports/html/default/css/main.css +391 -0
- data/reports/html/default/issue.erb +189 -0
- data/reports/html/default/issues.erb +65 -0
- data/reports/html/default/js/charts.js +146 -0
- data/reports/html/default/js/helpers.js +95 -0
- data/reports/html/default/js/init.js +73 -0
- data/reports/html/default/js/lib/jqplot.barRenderer.min.js +57 -0
- data/reports/html/default/js/lib/jqplot.categoryAxisRenderer.min.js +57 -0
- data/reports/html/default/js/lib/jqplot.cursor.min.js +57 -0
- data/reports/html/default/js/lib/jqplot.pieRenderer.min.js +57 -0
- data/reports/html/default/js/lib/jqplot.pointLabels.min.js +57 -0
- data/reports/html/default/js/lib/jquery-ui.min.js +404 -0
- data/reports/html/default/js/lib/jquery.jqplot.min.js +57 -0
- data/reports/html/default/js/lib/jquery.min.js +167 -0
- data/reports/html/default/plugins.erb +22 -0
- data/reports/html/default/search.erb +8 -0
- data/reports/html/default/sitemap.erb +15 -0
- data/reports/html/default/summary.erb +68 -0
- data/reports/html/default/summary_issue.erb +19 -0
- data/reports/json.rb +51 -0
- data/reports/marshal.rb +49 -0
- data/reports/metareport.rb +4 -6
- data/reports/metareport/arachni_metareport.rb +1 -1
- data/reports/plugin_formatters/html/autologin.rb +30 -41
- data/reports/plugin_formatters/html/content_types.rb +1 -10
- data/reports/plugin_formatters/html/cookie_collector.rb +36 -44
- data/reports/plugin_formatters/html/discovery.rb +50 -0
- data/reports/plugin_formatters/html/form_dicattack.rb +24 -32
- data/reports/plugin_formatters/html/healthmap.rb +45 -54
- data/reports/plugin_formatters/html/http_dicattack.rb +24 -32
- data/reports/plugin_formatters/html/profiler.rb +17 -48
- data/reports/plugin_formatters/html/profiler/template.erb +6 -99
- data/reports/plugin_formatters/html/resolver.rb +63 -0
- data/reports/plugin_formatters/html/{metaformatters/timeout_notice.rb → timing_attacks.rb} +7 -19
- data/reports/plugin_formatters/html/{metaformatters/uniformity.rb → uniformity.rb} +5 -17
- data/reports/plugin_formatters/html/waf_detector.rb +24 -32
- data/reports/plugin_formatters/stdout/autologin.rb +30 -35
- data/reports/plugin_formatters/stdout/content_types.rb +41 -46
- data/reports/plugin_formatters/stdout/cookie_collector.rb +33 -38
- data/reports/plugin_formatters/stdout/discovery.rb +47 -0
- data/reports/plugin_formatters/stdout/form_dicattack.rb +27 -32
- data/reports/plugin_formatters/stdout/healthmap.rb +47 -51
- data/reports/plugin_formatters/stdout/http_dicattack.rb +27 -32
- data/reports/plugin_formatters/stdout/metamodules.rb +48 -55
- data/reports/plugin_formatters/stdout/profiler.rb +60 -65
- data/reports/plugin_formatters/stdout/resolver.rb +45 -0
- data/reports/plugin_formatters/stdout/{metaformatters/timeout_notice.rb → timing_attacks.rb} +6 -14
- data/reports/plugin_formatters/stdout/{metaformatters/uniformity.rb → uniformity.rb} +6 -14
- data/reports/plugin_formatters/stdout/waf_detector.rb +23 -28
- data/reports/plugin_formatters/xml/autologin.rb +36 -41
- data/reports/plugin_formatters/xml/content_types.rb +47 -52
- data/reports/plugin_formatters/xml/cookie_collector.rb +39 -44
- data/reports/plugin_formatters/xml/discovery.rb +54 -0
- data/reports/plugin_formatters/xml/form_dicattack.rb +22 -27
- data/reports/plugin_formatters/xml/healthmap.rb +53 -58
- data/reports/plugin_formatters/xml/http_dicattack.rb +22 -27
- data/reports/plugin_formatters/xml/profiler.rb +61 -77
- data/reports/plugin_formatters/xml/resolver.rb +53 -0
- data/reports/plugin_formatters/xml/{metaformatters/timeout_notice.rb → timing_attacks.rb} +3 -15
- data/reports/plugin_formatters/xml/{metaformatters/uniformity.rb → uniformity.rb} +4 -14
- data/reports/plugin_formatters/xml/waf_detector.rb +23 -28
- data/reports/stdout.rb +1 -1
- data/reports/txt.rb +2 -5
- data/reports/xml.rb +2 -5
- data/reports/xml/buffer.rb +6 -2
- data/reports/yaml.rb +49 -0
- metadata +419 -278
- data/bin/arachni_xmlrpc +0 -21
- data/bin/arachni_xmlrpcd +0 -82
- data/bin/arachni_xmlrpcd_monitor +0 -74
- data/getoptslong.rb +0 -242
- data/lib/anemone.rb +0 -2
- data/lib/framework.rb +0 -673
- data/lib/module/manager.rb +0 -111
- data/lib/options.rb +0 -547
- data/lib/rpc/xml/client/base.rb +0 -76
- data/lib/rpc/xml/client/instance.rb +0 -88
- data/lib/rpc/xml/server/base.rb +0 -112
- data/lib/rpc/xml/server/dispatcher.rb +0 -386
- data/lib/rpc/xml/server/framework.rb +0 -206
- data/lib/rpc/xml/server/instance.rb +0 -191
- data/lib/ruby/xmlrpc/server.rb +0 -27
- data/lib/ui/web/addons/autodeploy.rb +0 -172
- data/lib/ui/web/addons/autodeploy/views/index.erb +0 -124
- data/lib/ui/web/dispatcher_manager.rb +0 -165
- data/lib/ui/web/instance_manager.rb +0 -87
- data/lib/ui/web/output_stream.rb +0 -94
- data/lib/ui/web/server.rb +0 -925
- data/lib/ui/web/server/public/reports/placeholder +0 -1
- data/lib/ui/web/server/views/dispatchers.erb +0 -100
- data/lib/ui/web/server/views/dispatchers_edit.erb +0 -42
- data/lib/ui/web/server/views/error.erb +0 -1
- data/lib/ui/web/server/views/home.erb +0 -25
- data/metamodules/autothrottle.rb +0 -74
- data/plugins/metamodules.rb +0 -118
- data/profiles/comprehensive.afp +0 -74
- data/reports/plugin_formatters/html/metamodules.rb +0 -93
- data/reports/plugin_formatters/xml/metamodules.rb +0 -91
File without changes
|
@@ -0,0 +1,274 @@
|
|
1
|
+
=begin
|
2
|
+
Arachni
|
3
|
+
Copyright (c) 2010-2012 Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>
|
4
|
+
|
5
|
+
This is free software; you can copy and distribute and modify
|
6
|
+
this program under the term of the GPL v2.0 License
|
7
|
+
(See LICENSE file for details)
|
8
|
+
|
9
|
+
=end
|
10
|
+
|
11
|
+
require 'datamapper'
|
12
|
+
require 'socket'
|
13
|
+
|
14
|
+
require Arachni::Options.instance.dir['lib'] + 'rpc/client/dispatcher'
|
15
|
+
|
16
|
+
module Arachni
|
17
|
+
module UI
|
18
|
+
module Web
|
19
|
+
|
20
|
+
#
|
21
|
+
# Provides methods for dispatcher management.
|
22
|
+
#
|
23
|
+
# @author: Tasos "Zapotek" Laskos
|
24
|
+
# <tasos.laskos@gmail.com>
|
25
|
+
# <zapotek@segfault.gr>
|
26
|
+
# @version: 0.1.1
|
27
|
+
#
|
28
|
+
class DispatcherManager
|
29
|
+
|
30
|
+
class Dispatcher
|
31
|
+
include DataMapper::Resource
|
32
|
+
|
33
|
+
property :id, Serial
|
34
|
+
property :url, String
|
35
|
+
end
|
36
|
+
|
37
|
+
|
38
|
+
def initialize( opts, settings )
|
39
|
+
@opts = opts
|
40
|
+
@settings = settings
|
41
|
+
|
42
|
+
DataMapper::setup( :default, "sqlite3://#{@settings.db}/default.db" )
|
43
|
+
DataMapper.finalize
|
44
|
+
|
45
|
+
Dispatcher.auto_upgrade!
|
46
|
+
end
|
47
|
+
|
48
|
+
#
|
49
|
+
# Puts a new dispatcher (and it's neighbours) in the DB.
|
50
|
+
#
|
51
|
+
# @param [String] url URL of the dispatcher
|
52
|
+
# @param [Bool] neighbours add its neighbouring dispatchers too?
|
53
|
+
#
|
54
|
+
def new( url, neighbours = true )
|
55
|
+
Dispatcher.first_or_create( :url => url )
|
56
|
+
|
57
|
+
return if !neighbours
|
58
|
+
connect( url ).node.neighbours {
|
59
|
+
|neighbours|
|
60
|
+
neighbours.each {
|
61
|
+
|node|
|
62
|
+
Dispatcher.first_or_create( :url => node )
|
63
|
+
}
|
64
|
+
}
|
65
|
+
end
|
66
|
+
|
67
|
+
#
|
68
|
+
# Provides an easy way to connect to a dispatcher.
|
69
|
+
#
|
70
|
+
# @param [String] url
|
71
|
+
#
|
72
|
+
# @return [Arachni::RPC::Client::Dispatcher]
|
73
|
+
#
|
74
|
+
def connect( url )
|
75
|
+
Arachni::RPC::Client::Dispatcher.new( @opts, url )
|
76
|
+
end
|
77
|
+
|
78
|
+
#
|
79
|
+
# Checks wether the dispatcher is alive.
|
80
|
+
#
|
81
|
+
# @param [String] url URL of the dispatcher
|
82
|
+
#
|
83
|
+
def alive?( url, &block )
|
84
|
+
raise( "This method requires a block!" ) if !block_given?
|
85
|
+
|
86
|
+
connect( url ).alive? {
|
87
|
+
|ret|
|
88
|
+
block.call( ret.rpc_connection_error? ? false : true )
|
89
|
+
}
|
90
|
+
end
|
91
|
+
|
92
|
+
def first_alive( &block )
|
93
|
+
raise( "This method requires a block!" ) if !block_given?
|
94
|
+
|
95
|
+
if !all.empty?
|
96
|
+
EM.synchrony do
|
97
|
+
dispatchers = EM::Synchrony::Iterator.new( all ).map {
|
98
|
+
|dispatcher, iter|
|
99
|
+
alive?( dispatcher.url ){
|
100
|
+
|bool|
|
101
|
+
if bool
|
102
|
+
iter.return( dispatcher )
|
103
|
+
else
|
104
|
+
iter.return( nil )
|
105
|
+
end
|
106
|
+
}
|
107
|
+
}.compact
|
108
|
+
|
109
|
+
if dispatchers.empty?
|
110
|
+
block.call( false )
|
111
|
+
else
|
112
|
+
block.call( dispatchers.pop )
|
113
|
+
end
|
114
|
+
end
|
115
|
+
else
|
116
|
+
block.call( false )
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
def jobs( &block )
|
121
|
+
::EM::Iterator.new( all, 20 ).map( proc {
|
122
|
+
|dispatcher, iter|
|
123
|
+
|
124
|
+
connect( dispatcher.url ).stats {
|
125
|
+
|stats|
|
126
|
+
iter.return( stats['running_jobs'] ) if !stats.rpc_connection_error?
|
127
|
+
}
|
128
|
+
|
129
|
+
}, proc {
|
130
|
+
|running|
|
131
|
+
block.call( running.flatten )
|
132
|
+
})
|
133
|
+
end
|
134
|
+
|
135
|
+
#
|
136
|
+
# Provides statistics about running jobs etc using the dispatcher
|
137
|
+
#
|
138
|
+
# @return [Hash]
|
139
|
+
#
|
140
|
+
def stats( &block )
|
141
|
+
raise( "This method requires a block!" ) if !block_given?
|
142
|
+
|
143
|
+
EM.synchrony do
|
144
|
+
|
145
|
+
stats = EM::Synchrony::Iterator.new( all ).map {
|
146
|
+
|dispatcher, iter|
|
147
|
+
|
148
|
+
if !dispatcher.rpc_connection_error?
|
149
|
+
connect( dispatcher.url ).stats {
|
150
|
+
|stats|
|
151
|
+
if !stats.rpc_exception?
|
152
|
+
|
153
|
+
# automatically grab and save neighbours
|
154
|
+
stats['neighbours'].each { |n| new( n ) }
|
155
|
+
|
156
|
+
iter.return( { dispatcher.url => stats } )
|
157
|
+
else
|
158
|
+
iter.return( nil )
|
159
|
+
end
|
160
|
+
}
|
161
|
+
end
|
162
|
+
}.compact
|
163
|
+
|
164
|
+
sorted_stats = {}
|
165
|
+
stats.sort{ |a, b| a.keys[0] <=> b.keys[0] }.each {
|
166
|
+
|stat|
|
167
|
+
sorted_stats.merge!( stat )
|
168
|
+
}
|
169
|
+
|
170
|
+
sorted_stats.each_pair {
|
171
|
+
|k, stats|
|
172
|
+
|
173
|
+
sorted_stats[k]['running_jobs'] =
|
174
|
+
EM::Synchrony::Iterator.new( stats['running_jobs'] ).map {
|
175
|
+
|instance, iter|
|
176
|
+
|
177
|
+
if instance['helpers']['rank'] != 'slave'
|
178
|
+
@settings.instances.connect( instance['url'] ).framework.progress_data(
|
179
|
+
:slaves => false,
|
180
|
+
:messages => false,
|
181
|
+
:issues => false
|
182
|
+
) {
|
183
|
+
|prog_data|
|
184
|
+
if prog_data.rpc_exception?
|
185
|
+
iter.return( nil )
|
186
|
+
else
|
187
|
+
instance.merge!( prog_data['stats'] )
|
188
|
+
instance['status'] = prog_data['status'].capitalize!
|
189
|
+
iter.return( instance )
|
190
|
+
end
|
191
|
+
}
|
192
|
+
else
|
193
|
+
@settings.instances.connect( instance['helpers']['master'] ).framework.progress_data(
|
194
|
+
:messages => false,
|
195
|
+
:issues => false
|
196
|
+
) {
|
197
|
+
|prog_data|
|
198
|
+
if prog_data.rpc_exception?
|
199
|
+
iter.return( nil )
|
200
|
+
else
|
201
|
+
prog_data['instances'].each {
|
202
|
+
|insdat|
|
203
|
+
if insdat['url'] == instance['url']
|
204
|
+
instance.merge!( insdat )
|
205
|
+
instance['status'].capitalize!
|
206
|
+
iter.return( instance )
|
207
|
+
end
|
208
|
+
}
|
209
|
+
end
|
210
|
+
}
|
211
|
+
end
|
212
|
+
}.compact
|
213
|
+
}
|
214
|
+
|
215
|
+
block.call( sorted_stats )
|
216
|
+
end
|
217
|
+
end
|
218
|
+
|
219
|
+
#
|
220
|
+
# Returns all dispatchers stored in the DB.
|
221
|
+
#
|
222
|
+
# @return [Array]
|
223
|
+
#
|
224
|
+
def all( *args )
|
225
|
+
Dispatcher.all( *args )
|
226
|
+
end
|
227
|
+
|
228
|
+
def all_with_liveness( &block )
|
229
|
+
raise( "This method requires a block!" ) if !block_given?
|
230
|
+
|
231
|
+
EM::Iterator.new( all ).map( proc{
|
232
|
+
|dispatcher, iter|
|
233
|
+
|
234
|
+
alive?( dispatcher.url ) {
|
235
|
+
|liveness|
|
236
|
+
|
237
|
+
m_dispatcher = {}
|
238
|
+
dispatcher.attributes.each_pair {
|
239
|
+
|k, v|
|
240
|
+
m_dispatcher[k.to_s] = v
|
241
|
+
}
|
242
|
+
m_dispatcher['alive'] = liveness
|
243
|
+
iter.return( m_dispatcher )
|
244
|
+
}
|
245
|
+
}, proc{
|
246
|
+
|dispatchers|
|
247
|
+
block.call( dispatchers )
|
248
|
+
})
|
249
|
+
end
|
250
|
+
|
251
|
+
#
|
252
|
+
# Removed all dispatchers from the DB.
|
253
|
+
#
|
254
|
+
def delete_all
|
255
|
+
all.each {
|
256
|
+
|report|
|
257
|
+
delete( report.id )
|
258
|
+
}
|
259
|
+
all.destroy
|
260
|
+
end
|
261
|
+
|
262
|
+
#
|
263
|
+
# Removed a dispatcher from the DB.
|
264
|
+
#
|
265
|
+
# @param [Integer] id
|
266
|
+
#
|
267
|
+
def delete( id )
|
268
|
+
Dispatcher.get( id ).destroy
|
269
|
+
end
|
270
|
+
|
271
|
+
end
|
272
|
+
end
|
273
|
+
end
|
274
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
=begin
|
2
|
+
Arachni
|
3
|
+
Copyright (c) 2010-2012 Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>
|
4
|
+
|
5
|
+
This is free software; you can copy and distribute and modify
|
6
|
+
this program under the term of the GPL v2.0 License
|
7
|
+
(See LICENSE file for details)
|
8
|
+
|
9
|
+
=end
|
10
|
+
|
11
|
+
require Arachni::Options.instance.dir['lib'] + 'rpc/client/instance'
|
12
|
+
require Arachni::Options.instance.dir['lib'] + 'ui/web/utilities'
|
13
|
+
require Arachni::Options.instance.dir['lib'] + 'rpc/client/instance'
|
14
|
+
|
15
|
+
module Arachni
|
16
|
+
module UI
|
17
|
+
module Web
|
18
|
+
|
19
|
+
#
|
20
|
+
# Provides methods for instance management.
|
21
|
+
#
|
22
|
+
# @author: Tasos "Zapotek" Laskos
|
23
|
+
# <tasos.laskos@gmail.com>
|
24
|
+
# <zapotek@segfault.gr>
|
25
|
+
# @version: 0.1
|
26
|
+
#
|
27
|
+
class InstanceManager
|
28
|
+
|
29
|
+
include Utilities
|
30
|
+
|
31
|
+
def initialize( opts, settings )
|
32
|
+
@opts = opts
|
33
|
+
@settings = settings
|
34
|
+
end
|
35
|
+
|
36
|
+
#
|
37
|
+
# Provides an easy way to connect to an instance
|
38
|
+
#
|
39
|
+
# @param [String] url
|
40
|
+
# @param [Hash] session session of the current user (optional)
|
41
|
+
# @param [String] token authentication token (optional)
|
42
|
+
#
|
43
|
+
# @return [Arachni::RPC::Client::Instance]
|
44
|
+
#
|
45
|
+
def connect( url, session = nil, token = nil )
|
46
|
+
#
|
47
|
+
# Sync up the session authentication tokens with the ones in the
|
48
|
+
# class variables.
|
49
|
+
#
|
50
|
+
# This will allow users to still connect to instances even if they
|
51
|
+
# shutdown the WebUI or remove their cookies.
|
52
|
+
#
|
53
|
+
@@tokens ||= {}
|
54
|
+
session['tokens'] ||= {} if session
|
55
|
+
@@tokens[url] = token if token
|
56
|
+
|
57
|
+
session['tokens'].merge!( @@tokens ) if session
|
58
|
+
@@tokens.merge!( session['tokens'] ) if session
|
59
|
+
session['tokens'].merge!( @@tokens ) if session
|
60
|
+
|
61
|
+
tmp_token = session ? session['tokens'][url] : @@tokens[url]
|
62
|
+
|
63
|
+
Arachni::RPC::Client::Instance.new( @opts, url, tmp_token )
|
64
|
+
end
|
65
|
+
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
=begin
|
2
2
|
Arachni
|
3
|
-
Copyright (c) 2010-
|
3
|
+
Copyright (c) 2010-2012 Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>
|
4
4
|
|
5
5
|
This is free software; you can copy and distribute and modify
|
6
6
|
this program under the term of the GPL v2.0 License
|
@@ -0,0 +1,54 @@
|
|
1
|
+
=begin
|
2
|
+
Arachni
|
3
|
+
Copyright (c) 2010-2012 Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>
|
4
|
+
|
5
|
+
This is free software; you can copy and distribute and modify
|
6
|
+
this program under the term of the GPL v2.0 License
|
7
|
+
(See LICENSE file for details)
|
8
|
+
|
9
|
+
=end
|
10
|
+
|
11
|
+
module Arachni
|
12
|
+
module UI
|
13
|
+
module Web
|
14
|
+
|
15
|
+
#
|
16
|
+
# This used to be a stream in the past, now it's just a compat class.
|
17
|
+
#
|
18
|
+
class OutputStream
|
19
|
+
|
20
|
+
def initialize( output, lines, &block )
|
21
|
+
@lines = lines
|
22
|
+
@output = output
|
23
|
+
@buffer = []
|
24
|
+
|
25
|
+
@icon_whitelist = {}
|
26
|
+
[ 'status', 'ok', 'error', 'info', 'bad' ].each {
|
27
|
+
|icon|
|
28
|
+
@icon_whitelist[icon] = "<img src='/icons/#{icon}.png' />"
|
29
|
+
}
|
30
|
+
|
31
|
+
end
|
32
|
+
|
33
|
+
def format
|
34
|
+
str = ''
|
35
|
+
cnt = 0
|
36
|
+
|
37
|
+
while( ( out = @output.pop ) && ( ( cnt += 1 ) < @lines ) )
|
38
|
+
|
39
|
+
type = out.keys[0]
|
40
|
+
msg = out.values[0]
|
41
|
+
|
42
|
+
next if out.values[0].empty?
|
43
|
+
|
44
|
+
icon = @icon_whitelist[type.to_s] || ''
|
45
|
+
str += icon + CGI.escapeHTML( " #{out.values[0]}" ) + "<br/>"
|
46
|
+
end
|
47
|
+
|
48
|
+
return str
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
=begin
|
2
2
|
Arachni
|
3
|
-
Copyright (c) 2010-
|
3
|
+
Copyright (c) 2010-2012 Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>
|
4
4
|
|
5
5
|
This is free software; you can copy and distribute and modify
|
6
6
|
this program under the term of the GPL v2.0 License
|
@@ -22,7 +22,7 @@ module Web
|
|
22
22
|
# @author: Tasos "Zapotek" Laskos
|
23
23
|
# <tasos.laskos@gmail.com>
|
24
24
|
# <zapotek@segfault.gr>
|
25
|
-
# @version: 0.
|
25
|
+
# @version: 0.2
|
26
26
|
#
|
27
27
|
class ReportManager
|
28
28
|
|
@@ -33,13 +33,12 @@ class ReportManager
|
|
33
33
|
include DataMapper::Resource
|
34
34
|
|
35
35
|
property :id, Serial
|
36
|
-
property :host,
|
36
|
+
property :host, Text
|
37
37
|
property :issue_count, Integer
|
38
|
-
property :filename,
|
38
|
+
property :filename, Text
|
39
39
|
property :datestamp, DateTime
|
40
40
|
end
|
41
41
|
|
42
|
-
|
43
42
|
def initialize( opts, settings )
|
44
43
|
@opts = opts
|
45
44
|
@settings = settings
|
@@ -48,6 +47,7 @@ class ReportManager
|
|
48
47
|
DataMapper::setup( :default, "sqlite3://#{@settings.db}/default.db" )
|
49
48
|
DataMapper.finalize
|
50
49
|
|
50
|
+
# Report.raise_on_save_failure = true
|
51
51
|
Report.auto_upgrade!
|
52
52
|
|
53
53
|
migrate_files
|
@@ -63,14 +63,17 @@ class ReportManager
|
|
63
63
|
next if Report.first( :filename => File.basename( file, EXTENSION ) )
|
64
64
|
|
65
65
|
begin
|
66
|
-
|
66
|
+
report = ::Arachni::AuditStore.load( file )
|
67
67
|
Report.create(
|
68
|
-
:issue_count => get_issue_count(
|
69
|
-
:host => get_host(
|
68
|
+
:issue_count => get_issue_count( report ),
|
69
|
+
:host => get_host( report ),
|
70
70
|
:filename => File.basename( file, EXTENSION ),
|
71
|
-
:datestamp => get_finish_datetime(
|
71
|
+
:datestamp => get_finish_datetime( report )
|
72
72
|
)
|
73
|
-
rescue
|
73
|
+
rescue Exception => e
|
74
|
+
# p file
|
75
|
+
# ap e
|
76
|
+
# ap e.backtrace
|
74
77
|
end
|
75
78
|
}
|
76
79
|
end
|
@@ -79,7 +82,7 @@ class ReportManager
|
|
79
82
|
# @return [String] save directory
|
80
83
|
#
|
81
84
|
def savedir
|
82
|
-
@settings.
|
85
|
+
@settings.public_folder + "/#{FOLDERNAME}/"
|
83
86
|
end
|
84
87
|
|
85
88
|
#
|
@@ -92,25 +95,23 @@ class ReportManager
|
|
92
95
|
#
|
93
96
|
# Saves the report to a file
|
94
97
|
#
|
95
|
-
# @param [
|
96
|
-
# Basically an 'afr' report as a string.
|
98
|
+
# @param [Arachni::AuditStore] report
|
97
99
|
#
|
98
100
|
# @return [String] the path to the saved report
|
99
101
|
#
|
100
102
|
def save( report )
|
101
|
-
@settings.log.report_saved( {},
|
103
|
+
@settings.log.report_saved( {}, report_to_filename( report ) )
|
102
104
|
return save_to_file( report, report_to_path( report ) )
|
103
105
|
end
|
104
106
|
|
105
107
|
#
|
106
108
|
# Gets the path to a given report based on the contents of the report
|
107
109
|
#
|
108
|
-
# @param [
|
109
|
-
# Basically an 'afr' report as a string.
|
110
|
+
# @param [Arachni::AuditStore] report
|
110
111
|
# @return [String]
|
111
112
|
#
|
112
113
|
def report_to_path( report )
|
113
|
-
savedir + File.basename(
|
114
|
+
savedir + File.basename( report_to_filename( report ) + EXTENSION )
|
114
115
|
end
|
115
116
|
|
116
117
|
#
|
@@ -158,26 +159,25 @@ class ReportManager
|
|
158
159
|
# Generates a filename based on the contents of the report in the form of
|
159
160
|
# host:audit_date
|
160
161
|
#
|
161
|
-
# @param [
|
162
|
-
# Basically an 'afr' report as a string.
|
162
|
+
# @param [Arachni::AuditStore] report
|
163
163
|
#
|
164
|
-
# @return [String] host
|
164
|
+
# @return [String] host.audit_date.ext
|
165
165
|
#
|
166
|
-
def
|
167
|
-
|
168
|
-
filename
|
166
|
+
def report_to_filename( report )
|
167
|
+
filename = "#{URI(report.options['url']).host}:#{report.start_datetime}"
|
168
|
+
filename.gsub( ':', '.' ).gsub( ' ', '_' ).gsub( '-', '_' ).gsub( '__', '_' )
|
169
169
|
end
|
170
170
|
|
171
171
|
def get_issue_count( report )
|
172
|
-
|
172
|
+
report.issues.size
|
173
173
|
end
|
174
174
|
|
175
175
|
def get_host( report )
|
176
|
-
return URI(
|
176
|
+
return URI( report.options['url'] ).host
|
177
177
|
end
|
178
178
|
|
179
179
|
def get_finish_datetime( report )
|
180
|
-
return
|
180
|
+
return report.finish_datetime
|
181
181
|
end
|
182
182
|
|
183
183
|
#
|
@@ -193,8 +193,16 @@ class ReportManager
|
|
193
193
|
|
194
194
|
begin
|
195
195
|
location = savedir + Report.get( id ).filename + EXTENSION
|
196
|
-
|
197
|
-
|
196
|
+
|
197
|
+
# if it's the default report type don't waste time converting
|
198
|
+
if '.' + type == EXTENSION
|
199
|
+
return File.read( location )
|
200
|
+
else
|
201
|
+
return convert( type, ::Arachni::AuditStore.load( location ) )
|
202
|
+
end
|
203
|
+
rescue Exception => e
|
204
|
+
ap e
|
205
|
+
ap e.backtrace
|
198
206
|
return nil
|
199
207
|
end
|
200
208
|
end
|
@@ -219,50 +227,37 @@ class ReportManager
|
|
219
227
|
|
220
228
|
private
|
221
229
|
|
222
|
-
def
|
223
|
-
|
224
|
-
Marshal.load( data )
|
225
|
-
rescue
|
226
|
-
YAML.load( data )
|
227
|
-
end
|
228
|
-
end
|
229
|
-
|
230
|
-
def save_to_file( data, file )
|
231
|
-
return file if File.exists?( file )
|
232
|
-
|
233
|
-
f = File.new( file, 'w' )
|
234
|
-
f.write( data )
|
235
|
-
f.close
|
236
|
-
|
230
|
+
def save_to_file( report, file )
|
231
|
+
report.save( file )
|
237
232
|
Report.create(
|
238
|
-
:issue_count => get_issue_count(
|
239
|
-
:host => get_host(
|
240
|
-
:filename => File.basename(
|
241
|
-
:datestamp =>
|
233
|
+
:issue_count => get_issue_count( report ),
|
234
|
+
:host => get_host( report ),
|
235
|
+
:filename => File.basename( file, EXTENSION ),
|
236
|
+
:datestamp => DateTime.now
|
242
237
|
)
|
243
238
|
|
244
|
-
return
|
239
|
+
return file
|
245
240
|
end
|
246
241
|
|
247
242
|
def convert( type, report )
|
248
|
-
|
249
243
|
opts = {}
|
244
|
+
|
250
245
|
classes[type].info[:options].each {
|
251
246
|
|opt|
|
252
247
|
opts[opt.name] = opt.default if opt.default
|
253
248
|
}
|
249
|
+
|
254
250
|
opts['outfile'] = get_tmp_outfile_name( type, report )
|
255
251
|
|
256
|
-
classes[type].new(
|
252
|
+
classes[type].new( report, opts ).run
|
257
253
|
|
258
254
|
content = File.read( opts['outfile'] )
|
259
255
|
FileUtils.rm( opts['outfile'] )
|
260
256
|
return content
|
261
257
|
end
|
262
258
|
|
263
|
-
|
264
259
|
def get_tmp_outfile_name( type, report )
|
265
|
-
tmpdir +
|
260
|
+
tmpdir + report_to_filename( report ) + '.' + type
|
266
261
|
end
|
267
262
|
|
268
263
|
def has_outfile?( options )
|
@@ -274,7 +269,6 @@ class ReportManager
|
|
274
269
|
return false
|
275
270
|
end
|
276
271
|
|
277
|
-
|
278
272
|
def populate_available
|
279
273
|
@@available ||= []
|
280
274
|
return @@available if !@@available.empty?
|
@@ -291,7 +285,7 @@ class ReportManager
|
|
291
285
|
'rep_name' => avail,
|
292
286
|
'description' => report_mgr[avail].info[:description],
|
293
287
|
'version' => report_mgr[avail].info[:version],
|
294
|
-
'author' => report_mgr[avail].info[:author]
|
288
|
+
'author' => [report_mgr[avail].info[:author]].flatten
|
295
289
|
}
|
296
290
|
|
297
291
|
@@available_rep_classes[avail] = report_mgr[avail]
|