arachni 0.4.7 → 1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/AUTHORS.md +1 -1
- data/CHANGELOG.md +211 -0
- data/CONTRIBUTORS.md +1 -0
- data/Gemfile +23 -2
- data/LICENSE.md +34 -1
- data/README.md +211 -127
- data/Rakefile +79 -67
- data/arachni.gemspec +54 -62
- data/bin/arachni +6 -18
- data/bin/arachni_console +5 -13
- data/bin/arachni_multi +6 -16
- data/bin/arachni_reporter +12 -0
- data/bin/arachni_restore +12 -0
- data/bin/arachni_rpc +6 -16
- data/bin/arachni_rpcd +6 -17
- data/bin/arachni_rpcd_monitor +6 -18
- data/bin/arachni_script +8 -19
- data/components/checks/active/code_injection.rb +123 -0
- data/components/checks/active/code_injection_php_input_wrapper.rb +99 -0
- data/components/checks/active/code_injection_timing.rb +106 -0
- data/components/checks/active/csrf.rb +218 -0
- data/components/checks/active/file_inclusion.rb +152 -0
- data/components/checks/active/ldap_injection.rb +109 -0
- data/{modules/audit/ldapi → components/checks/active/ldap_injection}/errors.txt +0 -0
- data/components/checks/active/no_sql_injection.rb +94 -0
- data/components/checks/active/no_sql_injection/patterns/mongodb +1 -0
- data/{extras/placeholder → components/checks/active/no_sql_injection/regexp_ignore.txt} +0 -0
- data/components/checks/active/no_sql_injection_differential.rb +78 -0
- data/components/checks/active/os_cmd_injection.rb +116 -0
- data/components/checks/active/os_cmd_injection_timing.rb +92 -0
- data/components/checks/active/path_traversal.rb +174 -0
- data/components/checks/active/response_splitting.rb +94 -0
- data/components/checks/active/rfi.rb +172 -0
- data/components/checks/active/session_fixation.rb +117 -0
- data/components/checks/active/source_code_disclosure.rb +177 -0
- data/components/checks/active/sql_injection.rb +123 -0
- data/{modules/audit/sqli → components/checks/active/sql_injection}/patterns/access +0 -0
- data/{modules/audit/sqli → components/checks/active/sql_injection}/patterns/coldfusion +0 -0
- data/{modules/audit/sqli → components/checks/active/sql_injection}/patterns/db2 +0 -0
- data/{modules/audit/sqli → components/checks/active/sql_injection}/patterns/emc +0 -0
- data/{modules/audit/sqli → components/checks/active/sql_injection}/patterns/firebird +0 -0
- data/{modules/audit/sqli → components/checks/active/sql_injection}/patterns/frontbase +0 -0
- data/{modules/audit/sqli → components/checks/active/sql_injection}/patterns/hsqldb +0 -0
- data/{modules/audit/sqli → components/checks/active/sql_injection}/patterns/informix +0 -0
- data/{modules/audit/sqli → components/checks/active/sql_injection}/patterns/ingres +0 -0
- data/{modules/audit/sqli → components/checks/active/sql_injection}/patterns/interbase +0 -0
- data/{modules/audit/sqli → components/checks/active/sql_injection}/patterns/maxdb +0 -0
- data/{modules/audit/sqli → components/checks/active/sql_injection}/patterns/mssql +0 -0
- data/{modules/audit/sqli → components/checks/active/sql_injection}/patterns/mysql +0 -0
- data/{modules/audit/sqli → components/checks/active/sql_injection}/patterns/oracle +0 -0
- data/{modules/audit/sqli → components/checks/active/sql_injection}/patterns/pgsql +0 -0
- data/{modules/audit/sqli → components/checks/active/sql_injection}/patterns/sqlite +0 -0
- data/{modules/audit/sqli → components/checks/active/sql_injection}/patterns/sybase +0 -0
- data/{modules/audit/sqli → components/checks/active/sql_injection}/regexp_ignore.txt +0 -0
- data/components/checks/active/sql_injection_differential.rb +114 -0
- data/{modules/audit/sqli_blind_rdiff → components/checks/active/sql_injection_differential}/payloads.txt +0 -0
- data/components/checks/active/sql_injection_timing.rb +98 -0
- data/{modules/audit/sqli_blind_timing → components/checks/active/sql_injection_timing}/mssql.txt +0 -0
- data/{modules/audit/sqli_blind_timing → components/checks/active/sql_injection_timing}/mysql.txt +0 -0
- data/{modules/audit/sqli_blind_timing → components/checks/active/sql_injection_timing}/pgsql.txt +0 -0
- data/components/checks/active/trainer.rb +40 -0
- data/components/checks/active/unvalidated_redirect.rb +108 -0
- data/components/checks/active/xpath_injection.rb +87 -0
- data/{modules/audit/xpath → components/checks/active/xpath_injection}/errors.txt +0 -0
- data/components/checks/active/xss.rb +169 -0
- data/components/checks/active/xss_dom.rb +119 -0
- data/components/checks/active/xss_dom_inputs.rb +132 -0
- data/components/checks/active/xss_dom_script_context.rb +118 -0
- data/components/checks/active/xss_event.rb +165 -0
- data/components/checks/active/xss_path.rb +146 -0
- data/components/checks/active/xss_script_context.rb +207 -0
- data/components/checks/active/xss_tag.rb +135 -0
- data/components/checks/passive/allowed_methods.rb +92 -0
- data/components/checks/passive/backdoors.rb +79 -0
- data/{modules/recon → components/checks/passive}/backdoors/filenames.txt +0 -0
- data/components/checks/passive/backup_directories.rb +86 -0
- data/components/checks/passive/backup_directories/formats.txt +56 -0
- data/components/checks/passive/backup_files.rb +99 -0
- data/components/checks/passive/backup_files/formats.txt +106 -0
- data/components/checks/passive/common_directories.rb +81 -0
- data/{modules/recon → components/checks/passive}/common_directories/directories.txt +0 -0
- data/components/checks/passive/common_files.rb +73 -0
- data/components/checks/passive/common_files/filenames.txt +24 -0
- data/components/checks/passive/directory_listing.rb +129 -0
- data/components/checks/passive/grep/captcha.rb +73 -0
- data/components/checks/passive/grep/cookie_set_for_parent_domain.rb +71 -0
- data/components/checks/passive/grep/credit_card.rb +124 -0
- data/components/checks/passive/grep/cvs_svn_users.rb +75 -0
- data/components/checks/passive/grep/emails.rb +53 -0
- data/components/checks/passive/grep/form_upload.rb +75 -0
- data/components/checks/passive/grep/hsts.rb +74 -0
- data/components/checks/passive/grep/html_objects.rb +45 -0
- data/components/checks/passive/grep/http_only_cookies.rb +72 -0
- data/components/checks/passive/grep/insecure_cookies.rb +74 -0
- data/components/checks/passive/grep/mixed_resource.rb +109 -0
- data/components/checks/passive/grep/password_autocomplete.rb +80 -0
- data/components/checks/passive/grep/private_ip.rb +73 -0
- data/components/checks/passive/grep/ssn.rb +62 -0
- data/components/checks/passive/grep/unencrypted_password_forms.rb +88 -0
- data/components/checks/passive/htaccess_limit.rb +71 -0
- data/components/checks/passive/http_put.rb +91 -0
- data/components/checks/passive/interesting_responses.rb +88 -0
- data/components/checks/passive/localstart_asp.rb +88 -0
- data/components/checks/passive/origin_spoof_access_restriction_bypass.rb +83 -0
- data/components/checks/passive/webdav.rb +101 -0
- data/components/checks/passive/xst.rb +90 -0
- data/components/fingerprinters/frameworks/rack.rb +33 -0
- data/components/fingerprinters/languages/asp.rb +34 -0
- data/components/fingerprinters/languages/aspx.rb +55 -0
- data/components/fingerprinters/languages/jsp.rb +34 -0
- data/components/fingerprinters/languages/php.rb +35 -0
- data/components/fingerprinters/languages/python.rb +32 -0
- data/components/fingerprinters/languages/ruby.rb +33 -0
- data/components/fingerprinters/os/bsd.rb +28 -0
- data/components/fingerprinters/os/linux.rb +34 -0
- data/components/fingerprinters/os/solaris.rb +33 -0
- data/components/fingerprinters/os/unix.rb +28 -0
- data/components/fingerprinters/os/windows.rb +33 -0
- data/components/fingerprinters/servers/apache.rb +28 -0
- data/components/fingerprinters/servers/iis.rb +28 -0
- data/components/fingerprinters/servers/jetty.rb +28 -0
- data/components/fingerprinters/servers/nginx.rb +28 -0
- data/components/fingerprinters/servers/tomcat.rb +28 -0
- data/components/path_extractors/anchors.rb +29 -0
- data/components/path_extractors/areas.rb +29 -0
- data/components/path_extractors/comments.rb +21 -0
- data/components/path_extractors/forms.rb +29 -0
- data/components/path_extractors/frames.rb +29 -0
- data/components/path_extractors/generic.rb +76 -0
- data/components/path_extractors/links.rb +29 -0
- data/components/path_extractors/meta_refresh.rb +50 -0
- data/components/path_extractors/scripts.rb +31 -0
- data/components/plugins/autologin.rb +120 -0
- data/components/plugins/beep_notify.rb +43 -0
- data/components/plugins/content_types.rb +110 -0
- data/components/plugins/cookie_collector.rb +94 -0
- data/components/plugins/defaults/autothrottle.rb +73 -0
- data/components/plugins/defaults/healthmap.rb +79 -0
- data/components/plugins/defaults/meta/remedies/discovery.rb +122 -0
- data/components/plugins/defaults/meta/remedies/timing_attacks.rb +98 -0
- data/components/plugins/defaults/meta/uniformity.rb +55 -0
- data/components/plugins/email_notify.rb +112 -0
- data/components/plugins/form_dicattack.rb +128 -0
- data/components/plugins/http_dicattack.rb +102 -0
- data/components/plugins/proxy.rb +492 -0
- data/{plugins → components/plugins}/proxy/panel/403_forbidden.html.erb +0 -0
- data/{plugins → components/plugins}/proxy/panel/404_not_found.html.erb +0 -0
- data/{plugins → components/plugins}/proxy/panel/css/bootstrap-responsive.css +0 -0
- data/{plugins → components/plugins}/proxy/panel/css/bootstrap.min.css +0 -0
- data/{plugins → components/plugins}/proxy/panel/css/panel.css +0 -0
- data/{plugins → components/plugins}/proxy/panel/help.html.erb +0 -0
- data/{plugins → components/plugins}/proxy/panel/img/glyphicons-halflings-white.png +0 -0
- data/{plugins → components/plugins}/proxy/panel/img/glyphicons-halflings.png +0 -0
- data/{plugins → components/plugins}/proxy/panel/img/record.png +0 -0
- data/{plugins → components/plugins}/proxy/panel/inspect.html.erb +0 -0
- data/{plugins → components/plugins}/proxy/panel/js/bootstrap.min.js +0 -0
- data/{plugins → components/plugins}/proxy/panel/js/jquery.min.js +0 -0
- data/{plugins → components/plugins}/proxy/panel/js/panel.js +0 -0
- data/{plugins → components/plugins}/proxy/panel/layout.html.erb +0 -0
- data/components/plugins/proxy/panel/page_accordion.html.erb +67 -0
- data/{plugins → components/plugins}/proxy/panel/page_twin_accordion.html.erb +0 -0
- data/components/plugins/proxy/panel/panel.html.erb +69 -0
- data/{plugins → components/plugins}/proxy/panel/shutdown_message.html.erb +0 -0
- data/{plugins → components/plugins}/proxy/panel/sign_in.html.erb +0 -0
- data/{plugins → components/plugins}/proxy/panel/vectors.yml.erb +0 -0
- data/{plugins → components/plugins}/proxy/panel/verify_login_check.html.erb +0 -0
- data/{plugins → components/plugins}/proxy/panel/verify_login_final.html.erb +0 -0
- data/components/plugins/proxy/panel/verify_login_sequence.html.erb +45 -0
- data/components/plugins/proxy/template_scope.rb +130 -0
- data/components/plugins/script.rb +48 -0
- data/components/plugins/uncommon_headers.rb +92 -0
- data/components/plugins/vector_feed.rb +225 -0
- data/components/plugins/waf_detector.rb +169 -0
- data/components/reporters/ap.rb +38 -0
- data/components/reporters/html.rb +468 -0
- data/components/reporters/html/default.erb +68 -0
- data/components/reporters/html/default/configuration.erb +78 -0
- data/components/reporters/html/default/css/lib/bootstrap-theme.min.css +7 -0
- data/components/reporters/html/default/css/lib/bootstrap.min.css +7 -0
- data/components/reporters/html/default/css/lib/c3.css +203 -0
- data/components/reporters/html/default/css/lib/font-awesome.min.css +4 -0
- data/components/reporters/html/default/css/main.css +140 -0
- data/components/reporters/html/default/fonts/FontAwesome.otf +0 -0
- data/components/reporters/html/default/fonts/fontawesome-webfont.eot +0 -0
- data/components/reporters/html/default/fonts/fontawesome-webfont.svg +504 -0
- data/components/reporters/html/default/fonts/fontawesome-webfont.ttf +0 -0
- data/components/reporters/html/default/fonts/fontawesome-webfont.woff +0 -0
- data/components/reporters/html/default/fonts/glyphicons-halflings-regular.eot +0 -0
- data/components/reporters/html/default/fonts/glyphicons-halflings-regular.svg +229 -0
- data/components/reporters/html/default/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/components/reporters/html/default/fonts/glyphicons-halflings-regular.woff +0 -0
- data/components/reporters/html/default/issue.erb +81 -0
- data/components/reporters/html/default/issue/details.erb +68 -0
- data/components/reporters/html/default/issue/info.erb +74 -0
- data/components/reporters/html/default/issue/page.erb +117 -0
- data/components/reporters/html/default/issue/page/body.erb +42 -0
- data/components/reporters/html/default/issue/page/sink/data_flow.erb +95 -0
- data/components/reporters/html/default/issue/page/sink/data_flow/arguments.erb +70 -0
- data/components/reporters/html/default/issue/page/sink/data_flow/source.erb +1 -0
- data/components/reporters/html/default/issue/page/sink/execution_flow.erb +63 -0
- data/components/reporters/html/default/issue/page/sink/frame/source.erb +32 -0
- data/components/reporters/html/default/issue/page/sink/trace/table.erb +127 -0
- data/components/reporters/html/default/issue/page/transitions.erb +86 -0
- data/components/reporters/html/default/issue/platform.erb +8 -0
- data/components/reporters/html/default/issue/remarks.erb +28 -0
- data/components/reporters/html/default/issue/vector.erb +40 -0
- data/components/reporters/html/default/issues.erb +46 -0
- data/components/reporters/html/default/issues/grouped.erb +147 -0
- data/components/reporters/html/default/js/charts.js.erb +117 -0
- data/components/reporters/html/default/js/configuration.js.erb +12 -0
- data/components/reporters/html/default/js/helpers.js +107 -0
- data/components/reporters/html/default/js/init.js.erb +23 -0
- data/components/reporters/html/default/js/lib/bootstrap.min.js +6 -0
- data/components/reporters/html/default/js/lib/c3.min.js +3 -0
- data/components/reporters/html/default/js/lib/d3.min.js +5 -0
- data/components/reporters/html/default/js/lib/jquery.min.js +4 -0
- data/components/reporters/html/default/navigation.erb +136 -0
- data/components/reporters/html/default/plugins.erb +30 -0
- data/components/reporters/html/default/shared/hash.erb +10 -0
- data/components/reporters/html/default/shared/hash_table.erb +22 -0
- data/components/reporters/html/default/sitemap.erb +29 -0
- data/components/reporters/html/default/summary.erb +34 -0
- data/components/reporters/html/default/summary/charts.erb +67 -0
- data/components/reporters/html/default/summary/issues.erb +129 -0
- data/components/reporters/json.rb +44 -0
- data/components/reporters/marshal.rb +38 -0
- data/components/reporters/plugin_formatters/html/autologin.rb +50 -0
- data/components/reporters/plugin_formatters/html/content_types.rb +59 -0
- data/components/reporters/plugin_formatters/html/cookie_collector.rb +46 -0
- data/components/reporters/plugin_formatters/html/form_dicattack.rb +36 -0
- data/components/reporters/plugin_formatters/html/healthmap.rb +88 -0
- data/components/reporters/plugin_formatters/html/http_dicattack.rb +36 -0
- data/components/reporters/plugin_formatters/html/uncommon_headers.rb +40 -0
- data/components/reporters/plugin_formatters/html/uniformity.rb +55 -0
- data/components/reporters/plugin_formatters/html/waf_detector.rb +69 -0
- data/components/reporters/plugin_formatters/stdout/autologin.rb +25 -0
- data/components/reporters/plugin_formatters/stdout/content_types.rb +39 -0
- data/components/reporters/plugin_formatters/stdout/cookie_collector.rb +31 -0
- data/components/reporters/plugin_formatters/stdout/form_dicattack.rb +24 -0
- data/components/reporters/plugin_formatters/stdout/healthmap.rb +41 -0
- data/components/reporters/plugin_formatters/stdout/http_dicattack.rb +24 -0
- data/components/reporters/plugin_formatters/stdout/uncommon_headers.rb +29 -0
- data/components/reporters/plugin_formatters/stdout/uniformity.rb +35 -0
- data/components/reporters/plugin_formatters/stdout/waf_detector.rb +21 -0
- data/components/reporters/plugin_formatters/xml/autologin.rb +28 -0
- data/components/reporters/plugin_formatters/xml/content_types.rb +36 -0
- data/components/reporters/plugin_formatters/xml/cookie_collector.rb +32 -0
- data/components/reporters/plugin_formatters/xml/form_dicattack.rb +22 -0
- data/components/reporters/plugin_formatters/xml/healthmap.rb +30 -0
- data/components/reporters/plugin_formatters/xml/http_dicattack.rb +22 -0
- data/components/reporters/plugin_formatters/xml/uncommon_headers.rb +29 -0
- data/components/reporters/plugin_formatters/xml/uniformity.rb +23 -0
- data/components/reporters/plugin_formatters/xml/waf_detector.rb +22 -0
- data/components/reporters/stdout.rb +226 -0
- data/components/reporters/txt.rb +50 -0
- data/components/reporters/xml.rb +285 -0
- data/components/reporters/xml/schema.xsd +664 -0
- data/components/reporters/yaml.rb +37 -0
- data/{rpcd_handlers → components/services}/placeholder +0 -0
- data/lib/arachni.rb +29 -18
- data/lib/arachni/banner.rb +5 -13
- data/lib/arachni/browser.rb +1292 -0
- data/lib/arachni/browser/element_locator.rb +137 -0
- data/lib/arachni/browser/javascript.rb +383 -0
- data/lib/arachni/browser/javascript/dom_monitor.rb +31 -0
- data/lib/arachni/browser/javascript/proxy.rb +92 -0
- data/lib/arachni/browser/javascript/proxy/stub.rb +90 -0
- data/lib/arachni/browser/javascript/scripts/dom_monitor.js +146 -0
- data/lib/arachni/browser/javascript/scripts/taint_tracer.js +486 -0
- data/lib/arachni/browser/javascript/taint_tracer.rb +101 -0
- data/lib/arachni/browser/javascript/taint_tracer/frame.rb +73 -0
- data/lib/arachni/browser/javascript/taint_tracer/frame/called_function.rb +78 -0
- data/lib/arachni/browser/javascript/taint_tracer/sink/base.rb +63 -0
- data/lib/arachni/browser/javascript/taint_tracer/sink/data_flow.rb +83 -0
- data/lib/arachni/browser/javascript/taint_tracer/sink/execution_flow.rb +30 -0
- data/lib/arachni/browser_cluster.rb +414 -0
- data/lib/arachni/browser_cluster/job.rb +193 -0
- data/lib/arachni/browser_cluster/job/result.rb +29 -0
- data/lib/arachni/browser_cluster/jobs/browser_provider.rb +27 -0
- data/lib/arachni/browser_cluster/jobs/resource_exploration.rb +60 -0
- data/lib/arachni/browser_cluster/jobs/resource_exploration/event_trigger.rb +43 -0
- data/lib/arachni/browser_cluster/jobs/resource_exploration/event_trigger/result.rb +23 -0
- data/lib/arachni/browser_cluster/jobs/resource_exploration/result.rb +23 -0
- data/lib/arachni/browser_cluster/jobs/taint_trace.rb +48 -0
- data/lib/arachni/browser_cluster/jobs/taint_trace/event_trigger.rb +33 -0
- data/lib/arachni/browser_cluster/jobs/taint_trace/event_trigger/result.rb +23 -0
- data/lib/arachni/browser_cluster/jobs/taint_trace/result.rb +23 -0
- data/lib/arachni/browser_cluster/worker.rb +277 -0
- data/lib/arachni/check.rb +12 -0
- data/lib/arachni/check/auditor.rb +612 -0
- data/lib/arachni/check/base.rb +177 -0
- data/lib/arachni/check/manager.rb +137 -0
- data/lib/arachni/component.rb +11 -0
- data/lib/arachni/component/base.rb +62 -0
- data/lib/arachni/component/manager.rb +92 -90
- data/lib/arachni/component/options.rb +6 -28
- data/lib/arachni/component/options/address.rb +14 -30
- data/lib/arachni/component/options/base.rb +96 -81
- data/lib/arachni/component/options/bool.rb +20 -37
- data/lib/arachni/component/options/float.rb +12 -31
- data/lib/arachni/component/options/int.rb +14 -31
- data/lib/arachni/component/options/multiple_choice.rb +40 -0
- data/lib/arachni/component/options/object.rb +16 -0
- data/lib/arachni/component/options/path.rb +12 -25
- data/lib/arachni/component/options/port.rb +15 -25
- data/lib/arachni/component/options/string.rb +10 -32
- data/lib/arachni/component/options/url.rb +15 -30
- data/lib/arachni/component/output.rb +33 -0
- data/lib/arachni/component/utilities.rb +49 -0
- data/lib/arachni/data.rb +109 -0
- data/lib/arachni/data/framework.rb +160 -0
- data/lib/arachni/data/framework/rpc.rb +68 -0
- data/lib/arachni/data/issues.rb +227 -0
- data/lib/arachni/data/plugins.rb +109 -0
- data/lib/arachni/data/session.rb +48 -0
- data/lib/arachni/element/base.rb +131 -82
- data/lib/arachni/element/body.rb +43 -13
- data/lib/arachni/element/capabilities/analyzable.rb +46 -0
- data/lib/arachni/element/capabilities/analyzable/differential.rb +436 -0
- data/lib/arachni/element/capabilities/analyzable/taint.rb +218 -0
- data/lib/arachni/element/capabilities/analyzable/timeout.rb +433 -0
- data/lib/arachni/element/capabilities/auditable.rb +172 -577
- data/lib/arachni/element/capabilities/auditable/dom.rb +156 -0
- data/lib/arachni/element/capabilities/inputtable.rb +267 -0
- data/lib/arachni/element/capabilities/mutable.rb +197 -155
- data/lib/arachni/element/capabilities/refreshable.rb +31 -24
- data/lib/arachni/element/capabilities/submittable.rb +128 -0
- data/lib/arachni/element/capabilities/with_auditor.rb +60 -0
- data/lib/arachni/element/capabilities/with_auditor/output.rb +33 -0
- data/lib/arachni/element/capabilities/with_dom.rb +40 -0
- data/lib/arachni/element/capabilities/with_node.rb +52 -0
- data/lib/arachni/element/capabilities/with_scope.rb +25 -0
- data/lib/arachni/element/capabilities/with_scope/scope.rb +38 -0
- data/lib/arachni/element/cookie.rb +337 -862
- data/lib/arachni/element/cookie/dom.rb +67 -0
- data/lib/arachni/element/form.rb +326 -756
- data/lib/arachni/element/form/dom.rb +52 -0
- data/lib/arachni/element/generic_dom.rb +133 -0
- data/lib/arachni/element/header.rb +46 -46
- data/lib/arachni/element/link.rb +134 -172
- data/lib/arachni/element/link/dom.rb +128 -0
- data/lib/arachni/element/link_template.rb +268 -0
- data/lib/arachni/element/link_template/dom.rb +143 -0
- data/lib/arachni/element/path.rb +24 -13
- data/lib/arachni/element/server.rb +89 -13
- data/lib/arachni/element_filter.rb +101 -99
- data/lib/arachni/error.rb +5 -15
- data/lib/arachni/ethon/easy.rb +22 -0
- data/lib/arachni/framework.rb +841 -476
- data/lib/arachni/http.rb +6 -714
- data/lib/arachni/http/client.rb +801 -0
- data/lib/arachni/http/cookie_jar.rb +50 -51
- data/lib/arachni/http/headers.rb +122 -0
- data/lib/arachni/http/message.rb +76 -0
- data/lib/arachni/http/message/scope.rb +35 -0
- data/lib/arachni/http/proxy_server.rb +303 -0
- data/{plugins/proxy → lib/arachni/http/proxy_server}/ssl-interceptor-cert.pem +0 -0
- data/{plugins/proxy → lib/arachni/http/proxy_server}/ssl-interceptor-pkey.pem +0 -0
- data/lib/arachni/http/request.rb +471 -0
- data/lib/arachni/http/request/scope.rb +30 -0
- data/lib/arachni/http/response.rb +226 -0
- data/lib/arachni/http/response/scope.rb +67 -0
- data/lib/arachni/issue.rb +389 -223
- data/lib/arachni/issue/severity.rb +34 -0
- data/lib/arachni/issue/severity/base.rb +39 -0
- data/lib/arachni/option_group.rb +137 -0
- data/lib/arachni/option_groups.rb +13 -0
- data/lib/arachni/option_groups/audit.rb +226 -0
- data/lib/arachni/option_groups/browser_cluster.rb +50 -0
- data/lib/arachni/option_groups/datastore.rb +31 -0
- data/lib/arachni/option_groups/dispatcher.rb +132 -0
- data/lib/arachni/option_groups/http.rb +174 -0
- data/lib/arachni/option_groups/input.rb +156 -0
- data/lib/arachni/option_groups/output.rb +22 -0
- data/lib/arachni/option_groups/paths.rb +63 -0
- data/lib/arachni/option_groups/rpc.rb +87 -0
- data/lib/arachni/option_groups/scope.rb +233 -0
- data/lib/arachni/option_groups/session.rb +54 -0
- data/lib/arachni/option_groups/snapshot.rb +22 -0
- data/lib/arachni/options.rb +286 -1486
- data/lib/arachni/page.rb +504 -108
- data/lib/arachni/page/dom.rb +280 -0
- data/lib/arachni/page/dom/transition.rb +302 -0
- data/lib/arachni/page/scope.rb +53 -0
- data/lib/arachni/parser.rb +177 -210
- data/lib/arachni/platform.rb +5 -13
- data/lib/arachni/platform/fingerprinter.rb +24 -23
- data/lib/arachni/platform/list.rb +48 -27
- data/lib/arachni/platform/manager.rb +146 -83
- data/lib/arachni/plugin.rb +5 -13
- data/lib/arachni/plugin/base.rb +90 -110
- data/lib/arachni/plugin/formatter.rb +40 -0
- data/lib/arachni/plugin/manager.rb +129 -108
- data/lib/arachni/processes.rb +6 -14
- data/lib/arachni/processes/dispatchers.rb +51 -58
- data/lib/arachni/processes/executables/base.rb +9 -0
- data/lib/arachni/processes/executables/dispatcher.rb +6 -0
- data/lib/arachni/processes/executables/instance.rb +13 -0
- data/lib/arachni/processes/helpers.rb +4 -12
- data/lib/arachni/processes/helpers/dispatchers.rb +8 -12
- data/lib/arachni/processes/helpers/instances.rb +13 -13
- data/lib/arachni/processes/helpers/processes.rb +8 -28
- data/lib/arachni/processes/instances.rb +86 -63
- data/lib/arachni/processes/manager.rb +89 -52
- data/lib/arachni/report.rb +282 -15
- data/lib/arachni/reporter.rb +12 -0
- data/lib/arachni/reporter/base.rb +126 -0
- data/lib/arachni/reporter/formatter_manager.rb +20 -0
- data/lib/arachni/reporter/manager.rb +54 -0
- data/lib/arachni/reporter/options.rb +47 -0
- data/lib/arachni/rpc/client/base.rb +27 -35
- data/lib/arachni/rpc/client/dispatcher.rb +13 -21
- data/lib/arachni/rpc/client/instance.rb +45 -40
- data/lib/arachni/rpc/client/instance/framework.rb +88 -0
- data/lib/arachni/rpc/client/instance/service.rb +106 -0
- data/lib/arachni/rpc/serializer.rb +98 -0
- data/lib/arachni/rpc/server/active_options.rb +26 -42
- data/lib/arachni/rpc/server/base.rb +35 -26
- data/lib/arachni/rpc/server/check/manager.rb +38 -0
- data/lib/arachni/rpc/server/dispatcher.rb +125 -211
- data/lib/arachni/rpc/server/dispatcher/node.rb +36 -50
- data/lib/arachni/rpc/server/dispatcher/service.rb +153 -0
- data/lib/arachni/rpc/server/framework.rb +83 -176
- data/lib/arachni/rpc/server/framework/distributor.rb +292 -271
- data/lib/arachni/rpc/server/framework/master.rb +164 -296
- data/lib/arachni/rpc/server/framework/multi_instance.rb +96 -128
- data/lib/arachni/rpc/server/framework/slave.rb +79 -89
- data/lib/arachni/rpc/server/instance.rb +362 -413
- data/lib/arachni/rpc/server/output.rb +33 -147
- data/lib/arachni/rpc/server/plugin/manager.rb +18 -54
- data/lib/arachni/ruby.rb +5 -14
- data/lib/arachni/ruby/array.rb +4 -14
- data/lib/arachni/ruby/hash.rb +47 -15
- data/lib/arachni/ruby/io.rb +4 -14
- data/lib/arachni/ruby/object.rb +10 -52
- data/lib/arachni/ruby/set.rb +4 -12
- data/lib/arachni/ruby/string.rb +60 -40
- data/lib/arachni/ruby/webrick.rb +4 -12
- data/lib/arachni/ruby/webrick/cookie.rb +4 -12
- data/lib/arachni/ruby/webrick/httprequest.rb +4 -12
- data/lib/arachni/scope.rb +40 -0
- data/lib/arachni/selenium/webdriver/remote/http/typhoeus.rb +46 -0
- data/lib/arachni/session.rb +150 -173
- data/lib/arachni/snapshot.rb +181 -0
- data/lib/arachni/state.rb +122 -0
- data/lib/arachni/state/audit.rb +57 -0
- data/lib/arachni/state/element_filter.rb +67 -0
- data/lib/arachni/state/framework.rb +419 -0
- data/lib/arachni/state/framework/rpc.rb +63 -0
- data/lib/arachni/state/http.rb +60 -0
- data/lib/arachni/state/options.rb +39 -0
- data/lib/arachni/state/plugins.rb +94 -0
- data/lib/arachni/support.rb +6 -15
- data/lib/arachni/support/buffer.rb +5 -13
- data/lib/arachni/support/buffer/autoflush.rb +5 -15
- data/lib/arachni/support/buffer/base.rb +41 -70
- data/lib/arachni/support/cache.rb +5 -13
- data/lib/arachni/support/cache/base.rb +45 -50
- data/lib/arachni/support/cache/least_cost_replacement.rb +9 -19
- data/lib/arachni/support/cache/least_recently_used.rb +5 -15
- data/lib/arachni/support/cache/preference.rb +11 -20
- data/lib/arachni/support/cache/random_replacement.rb +10 -15
- data/lib/arachni/support/crypto.rb +5 -13
- data/lib/arachni/support/crypto/rsa_aes_cbc.rb +15 -27
- data/lib/arachni/support/database.rb +5 -13
- data/lib/arachni/support/database/base.rb +20 -37
- data/lib/arachni/support/database/hash.rb +265 -350
- data/lib/arachni/support/database/queue.rb +86 -27
- data/lib/arachni/support/lookup.rb +5 -13
- data/lib/arachni/support/lookup/base.rb +33 -26
- data/lib/arachni/support/lookup/hash_set.rb +11 -15
- data/lib/arachni/support/lookup/moolb.rb +9 -20
- data/lib/arachni/support/mixins.rb +14 -0
- data/lib/arachni/support/mixins/observable.rb +105 -0
- data/lib/arachni/support/mixins/terminal.rb +65 -0
- data/lib/arachni/support/profiler.rb +130 -0
- data/lib/arachni/support/signature.rb +37 -67
- data/lib/arachni/trainer.rb +57 -97
- data/lib/arachni/ui/foo/output.rb +31 -33
- data/lib/arachni/uri.rb +456 -462
- data/lib/arachni/uri/scope.rb +168 -0
- data/lib/arachni/utilities.rb +125 -147
- data/lib/arachni/version.rb +4 -12
- data/lib/arachni/watir/element.rb +17 -0
- data/lib/version +1 -1
- data/{spec/support/servers/modules/audit/sqli/jdbc → profiles/placeholder} +0 -0
- data/spec/arachni/browser/element_locator_spec.rb +228 -0
- data/spec/arachni/browser/javascript/dom_monitor_spec.rb +195 -0
- data/spec/arachni/browser/javascript/proxy/stub_spec.rb +106 -0
- data/spec/arachni/browser/javascript/proxy_spec.rb +144 -0
- data/spec/arachni/browser/javascript/taint_tracer/frame/called_function_spec.rb +72 -0
- data/spec/arachni/browser/javascript/taint_tracer/frame_spec.rb +46 -0
- data/spec/arachni/browser/javascript/taint_tracer/sink/data_flow_spec.rb +81 -0
- data/spec/arachni/browser/javascript/taint_tracer/sink/execution_flow_spec.rb +47 -0
- data/spec/arachni/browser/javascript/taint_tracer_spec.rb +1304 -0
- data/spec/arachni/browser/javascript_spec.rb +355 -0
- data/spec/arachni/browser_cluster/job/result_spec.rb +14 -0
- data/spec/arachni/browser_cluster/job_spec.rb +264 -0
- data/spec/arachni/browser_cluster/jobs/resource_exploration/event_trigger/result_spec.rb +7 -0
- data/spec/arachni/browser_cluster/jobs/resource_exploration/event_trigger_spec.rb +68 -0
- data/spec/arachni/browser_cluster/jobs/resource_exploration/result_spec.rb +7 -0
- data/spec/arachni/browser_cluster/jobs/resource_exploration_spec.rb +89 -0
- data/spec/arachni/browser_cluster/jobs/taint_tracer_spec.rb +149 -0
- data/spec/arachni/browser_cluster/worker_spec.rb +314 -0
- data/spec/arachni/browser_cluster_spec.rb +543 -0
- data/spec/arachni/browser_spec.rb +2368 -0
- data/spec/arachni/check/auditor_spec.rb +1089 -0
- data/spec/arachni/check/base_spec.rb +33 -0
- data/spec/arachni/check/manager_spec.rb +100 -0
- data/spec/arachni/component/base_spec.rb +64 -0
- data/spec/arachni/component/manager_spec.rb +37 -26
- data/spec/arachni/component/options/address_spec.rb +5 -11
- data/spec/arachni/component/options/base_spec.rb +29 -81
- data/spec/arachni/component/options/bool_spec.rb +16 -19
- data/spec/arachni/component/options/float_spec.rb +17 -16
- data/spec/arachni/component/options/int_spec.rb +17 -20
- data/spec/arachni/component/options/multiple_choice_spec.rb +82 -0
- data/spec/arachni/component/options/object_spec.rb +24 -0
- data/spec/arachni/component/options/path_spec.rb +8 -11
- data/spec/arachni/component/options/port_spec.rb +16 -15
- data/spec/arachni/component/options/string_spec.rb +8 -17
- data/spec/arachni/component/options/url_spec.rb +16 -14
- data/spec/arachni/component/utilities_spec.rb +30 -0
- data/spec/arachni/{module → component}/utilities_spec/read_file.txt +0 -0
- data/spec/arachni/data/framework/rpc_spec.rb +72 -0
- data/spec/arachni/data/framework_spec.rb +266 -0
- data/spec/arachni/data/issues_spec.rb +347 -0
- data/spec/arachni/data/plugins_spec.rb +102 -0
- data/spec/arachni/data/session_spec.rb +59 -0
- data/spec/arachni/data_spec.rb +71 -0
- data/spec/arachni/element/body_spec.rb +63 -4
- data/spec/arachni/element/capabilities/analyzable/differential_spec.rb +135 -0
- data/spec/arachni/element/capabilities/analyzable/taint_spec.rb +355 -0
- data/spec/arachni/element/capabilities/analyzable/timeout_spec.rb +386 -0
- data/spec/arachni/element/capabilities/with_scope/scope_spec.rb +25 -0
- data/spec/arachni/element/cookie/dom_spec.rb +145 -0
- data/spec/arachni/element/cookie_spec.rb +147 -108
- data/spec/arachni/element/form/dom_spec.rb +146 -0
- data/spec/arachni/element/form_spec.rb +519 -271
- data/spec/arachni/element/generic_dom_spec.rb +113 -0
- data/spec/arachni/element/header_spec.rb +68 -20
- data/spec/arachni/element/link/dom_spec.rb +206 -0
- data/spec/arachni/element/link_spec.rb +218 -130
- data/spec/arachni/element/link_template/dom_spec.rb +218 -0
- data/spec/arachni/element/link_template_spec.rb +403 -0
- data/spec/arachni/element/path_spec.rb +28 -4
- data/spec/arachni/element/server_spec.rb +171 -4
- data/spec/arachni/element_filter_spec.rb +227 -96
- data/spec/arachni/framework_spec.rb +1099 -759
- data/spec/arachni/http/client_spec.rb +1470 -0
- data/spec/arachni/http/cookie_jar_spec.rb +164 -130
- data/spec/arachni/http/headers_spec.rb +111 -0
- data/spec/arachni/http/message_spec.rb +5 -0
- data/spec/arachni/http/proxy_server_spec.rb +354 -0
- data/spec/arachni/http/request_spec.rb +602 -0
- data/spec/arachni/http/response/scope_spec.rb +135 -0
- data/spec/arachni/http/response_spec.rb +350 -0
- data/spec/arachni/issue/severity/base_spec.rb +15 -0
- data/spec/arachni/issue/severity_spec.rb +43 -0
- data/spec/arachni/issue_spec.rb +547 -284
- data/spec/arachni/option_groups/audit_spec.rb +298 -0
- data/spec/arachni/option_groups/browser_cluster_spec.rb +12 -0
- data/spec/arachni/option_groups/datastore_spec.rb +54 -0
- data/spec/arachni/option_groups/dispatcher_spec.rb +123 -0
- data/spec/arachni/option_groups/http_spec.rb +42 -0
- data/spec/arachni/option_groups/input_spec.rb +202 -0
- data/spec/arachni/option_groups/output_spec.rb +11 -0
- data/spec/arachni/option_groups/paths_spec.rb +34 -0
- data/spec/arachni/option_groups/rpc_spec.rb +13 -0
- data/spec/arachni/option_groups/scope_spec.rb +237 -0
- data/spec/arachni/option_groups/session_spec.rb +51 -0
- data/spec/arachni/option_groups/snapshot_spec.rb +11 -0
- data/spec/arachni/options_spec.rb +202 -756
- data/spec/arachni/page/dom/transition_spec.rb +515 -0
- data/spec/arachni/page/dom_spec.rb +308 -0
- data/spec/arachni/page/scope_spec.rb +80 -0
- data/spec/arachni/page_spec.rb +789 -175
- data/spec/arachni/parser_spec.rb +308 -200
- data/spec/arachni/platform/fingerprinter_spec.rb +51 -52
- data/spec/arachni/platform/manager_spec.rb +146 -34
- data/spec/arachni/plugin/base_spec.rb +97 -0
- data/spec/arachni/plugin/manager_spec.rb +186 -80
- data/spec/arachni/report_spec.rb +275 -0
- data/spec/arachni/reporter/base_spec.rb +96 -0
- data/spec/arachni/reporter/manager_spec.rb +38 -0
- data/spec/arachni/reporter/options_spec.rb +48 -0
- data/spec/arachni/rpc/client/base_spec.rb +43 -45
- data/spec/arachni/rpc/client/dispatcher_spec.rb +3 -3
- data/spec/arachni/rpc/client/instance_spec.rb +18 -40
- data/spec/arachni/rpc/server/active_options_spec.rb +35 -296
- data/spec/arachni/rpc/server/base_spec.rb +12 -6
- data/spec/arachni/rpc/server/checks/manager_spec.rb +48 -0
- data/spec/arachni/rpc/server/dispatcher/node_spec.rb +47 -74
- data/spec/arachni/rpc/server/dispatcher/service_spec.rb +99 -0
- data/spec/arachni/rpc/server/dispatcher_spec.rb +77 -38
- data/spec/arachni/rpc/server/framework/distributor_spec.rb +356 -396
- data/spec/arachni/rpc/server/framework_multi_spec.rb +336 -0
- data/spec/arachni/rpc/server/framework_spec.rb +396 -0
- data/spec/arachni/rpc/server/instance_spec.rb +480 -281
- data/spec/arachni/rpc/server/output_spec.rb +9 -212
- data/spec/arachni/rpc/server/plugin/manager_spec.rb +6 -11
- data/spec/arachni/ruby/hash_spec.rb +30 -0
- data/spec/arachni/ruby/object_spec.rb +0 -16
- data/spec/arachni/ruby/string_spec.rb +98 -6
- data/spec/arachni/scope_spec.rb +13 -0
- data/spec/arachni/session_spec.rb +279 -251
- data/spec/arachni/snapshot_spec.rb +127 -0
- data/spec/arachni/state/audit_spec.rb +107 -0
- data/spec/arachni/state/element_filter_spec.rb +66 -0
- data/spec/arachni/state/framework/rpc_spec.rb +85 -0
- data/spec/arachni/state/framework_spec.rb +853 -0
- data/spec/arachni/state/http_spec.rb +63 -0
- data/spec/arachni/state/options_spec.rb +55 -0
- data/spec/arachni/state/plugins_spec.rb +76 -0
- data/spec/arachni/state_spec.rb +87 -0
- data/spec/arachni/support/cache/least_cost_replacement_spec.rb +30 -32
- data/spec/arachni/support/cache/least_recently_used_spec.rb +39 -40
- data/spec/arachni/support/cache/preference_spec.rb +17 -18
- data/spec/arachni/support/cache/random_replacement_spec.rb +19 -20
- data/spec/arachni/support/database/queue_spec.rb +200 -32
- data/spec/arachni/support/lookup/hash_set_spec.rb +74 -0
- data/spec/arachni/support/mixins/observable_spec.rb +81 -0
- data/spec/arachni/support/signature_spec.rb +9 -25
- data/spec/arachni/trainer_spec.rb +141 -124
- data/spec/arachni/uri/scope_spec.rb +416 -0
- data/spec/arachni/uri_spec.rb +187 -195
- data/spec/arachni/utilities_spec.rb +178 -525
- data/spec/components/checks/active/code_injection_spec.rb +26 -0
- data/spec/components/checks/active/code_injection_timing_spec.rb +26 -0
- data/spec/components/checks/active/csrf_spec.rb +44 -0
- data/spec/components/checks/active/file_inclusion_spec.rb +56 -0
- data/spec/components/checks/active/ldap_injection_spec.rb +16 -0
- data/spec/components/checks/active/no_sql_injection_differential_spec.rb +15 -0
- data/spec/components/checks/active/no_sql_injection_spec.rb +28 -0
- data/spec/components/checks/active/os_cmd_injection_spec.rb +26 -0
- data/spec/components/checks/active/os_cmd_injection_timing_spec.rb +26 -0
- data/spec/components/checks/active/path_traversal_spec.rb +42 -0
- data/spec/components/checks/active/response_splitting_spec.rb +22 -0
- data/spec/components/checks/active/rfi_spec.rb +20 -0
- data/spec/components/checks/active/session_fixation_spec.rb +20 -0
- data/spec/components/checks/active/source_code_disclosure_spec.rb +26 -0
- data/spec/components/checks/active/sql_injection_differential_spec.rb +15 -0
- data/spec/components/checks/active/sql_injection_spec.rb +142 -0
- data/spec/components/checks/active/sql_injection_timing_spec.rb +24 -0
- data/spec/components/checks/active/trainer_spec.rb +36 -0
- data/spec/components/checks/active/unvalidated_redirect_spec.rb +20 -0
- data/spec/components/checks/active/xpath_injection_spec.rb +16 -0
- data/spec/components/checks/active/xss_dom_inputs_spec.rb +32 -0
- data/spec/components/checks/active/xss_dom_script_context_spec.rb +63 -0
- data/spec/components/checks/active/xss_dom_spec.rb +67 -0
- data/spec/components/checks/active/xss_event_spec.rb +15 -0
- data/spec/components/checks/active/xss_path_spec.rb +15 -0
- data/spec/components/checks/active/xss_script_context_spec.rb +22 -0
- data/spec/components/checks/active/xss_spec.rb +22 -0
- data/spec/components/checks/active/xss_tag_spec.rb +15 -0
- data/spec/components/checks/passive/allowed_methods_spec.rb +15 -0
- data/spec/components/checks/passive/backdoors_spec.rb +15 -0
- data/spec/components/checks/passive/backup_directories_spec.rb +15 -0
- data/spec/components/checks/passive/backup_files_spec.rb +15 -0
- data/spec/components/checks/passive/common_directories_spec.rb +15 -0
- data/spec/components/checks/passive/common_files_spec.rb +15 -0
- data/spec/components/checks/passive/directory_listing_spec.rb +15 -0
- data/spec/components/checks/passive/grep/captcha_spec.rb +15 -0
- data/spec/components/checks/passive/grep/cookie_set_for_parent_domain_spec.rb +15 -0
- data/spec/components/checks/passive/grep/credit_card_spec.rb +15 -0
- data/spec/components/checks/passive/grep/cvs_svn_users_spec.rb +15 -0
- data/spec/components/checks/passive/grep/emails_spec.rb +15 -0
- data/spec/components/checks/passive/grep/form_upload_spec.rb +15 -0
- data/spec/components/checks/passive/grep/hsts_spec.rb +17 -0
- data/spec/components/checks/passive/grep/html_objects_spec.rb +15 -0
- data/spec/components/checks/passive/grep/http_only_cookies_spec.rb +15 -0
- data/spec/components/checks/passive/grep/insecure_cookies_spec.rb +15 -0
- data/spec/components/checks/passive/grep/mixed_resource_spec.rb +16 -0
- data/spec/components/checks/passive/grep/password_autocomplete_spec.rb +15 -0
- data/spec/components/checks/passive/grep/private_ip_spec.rb +22 -0
- data/spec/components/checks/passive/grep/ssn_spec.rb +15 -0
- data/spec/components/checks/passive/grep/unencrypted_password_forms_spec.rb +15 -0
- data/spec/components/checks/passive/htaccess_limit_spec.rb +15 -0
- data/spec/components/checks/passive/http_put_spec.rb +15 -0
- data/spec/components/checks/passive/interesting_responses_spec.rb +23 -0
- data/spec/components/checks/passive/localstart_asp_spec.rb +15 -0
- data/spec/components/checks/passive/origin_spoof_access_restriction_bypass_spec.rb +15 -0
- data/spec/components/checks/passive/webdav_spec.rb +15 -0
- data/spec/components/checks/passive/xst_spec.rb +15 -0
- data/spec/components/fingerprinters/frameworks/rack_spec.rb +42 -0
- data/spec/components/fingerprinters/languages/asp_spec.rb +38 -0
- data/spec/components/fingerprinters/languages/aspx_spec.rb +79 -0
- data/spec/components/fingerprinters/languages/jsp_spec.rb +56 -0
- data/spec/components/fingerprinters/languages/php_spec.rb +59 -0
- data/spec/components/fingerprinters/languages/python_spec.rb +23 -0
- data/spec/components/fingerprinters/languages/ruby.rb +34 -0
- data/spec/components/fingerprinters/os/bsd_spec.rb +26 -0
- data/spec/components/fingerprinters/os/linux_spec.rb +34 -0
- data/spec/components/fingerprinters/os/solaris_spec.rb +34 -0
- data/spec/components/fingerprinters/os/unix_spec.rb +26 -0
- data/spec/components/fingerprinters/os/windows_spec.rb +34 -0
- data/spec/components/fingerprinters/servers/apache_spec.rb +26 -0
- data/spec/components/fingerprinters/servers/iis_spec.rb +28 -0
- data/spec/components/fingerprinters/servers/jetty_spec.rb +28 -0
- data/spec/components/fingerprinters/servers/nginx_spec.rb +26 -0
- data/spec/components/fingerprinters/servers/tomcat_spec.rb +28 -0
- data/spec/{path_extractors → components/path_extractors}/anchors_spec.rb +0 -0
- data/spec/{path_extractors → components/path_extractors}/areas_spec.rb +0 -0
- data/spec/components/path_extractors/comments_spec.rb +23 -0
- data/spec/{path_extractors → components/path_extractors}/forms_spec.rb +0 -0
- data/spec/{path_extractors → components/path_extractors}/frames_spec.rb +0 -0
- data/spec/{path_extractors → components/path_extractors}/generic_spec.rb +0 -0
- data/spec/{path_extractors → components/path_extractors}/links_spec.rb +0 -0
- data/spec/{path_extractors → components/path_extractors}/meta_refresh_spec.rb +0 -0
- data/spec/components/path_extractors/scripts_spec.rb +30 -0
- data/spec/components/plugins/autologin_spec.rb +96 -0
- data/spec/components/plugins/autothrottle_spec.rb +56 -0
- data/spec/components/plugins/content_types_spec.rb +91 -0
- data/spec/components/plugins/cookie_collector_spec.rb +41 -0
- data/spec/components/plugins/form_dicattack_spec.rb +54 -0
- data/spec/components/plugins/healthmap_spec.rb +40 -0
- data/spec/components/plugins/http_dicattack_spec.rb +40 -0
- data/spec/components/plugins/meta/remedies/discovery_spec.rb +23 -0
- data/spec/components/plugins/meta/remedies/timing_attacks_spec.rb +31 -0
- data/spec/components/plugins/meta/uniformity_spec.rb +29 -0
- data/spec/components/plugins/script_spec.rb +13 -0
- data/spec/components/plugins/uncommon_headers_spec.rb +64 -0
- data/spec/components/plugins/vector_feed_spec.rb +169 -0
- data/spec/components/plugins/waf_detector_spec.rb +50 -0
- data/spec/components/reporters/ap_spec.rb +9 -0
- data/spec/components/reporters/html_spec.rb +9 -0
- data/spec/components/reporters/json_spec.rb +17 -0
- data/spec/components/reporters/marshal_spec.rb +13 -0
- data/spec/components/reporters/stdout_spec.rb +9 -0
- data/spec/components/reporters/txt_spec.rb +8 -0
- data/spec/components/reporters/xml_spec.rb +9 -0
- data/spec/components/reporters/yaml_spec.rb +14 -0
- data/spec/external/wavsep/active/lfi_spec.rb +1 -1
- data/spec/external/wavsep/active/obsolete_files_spec.rb +225 -0
- data/spec/external/wavsep/active/rfi_spec.rb +1 -1
- data/spec/external/wavsep/active/sqli_spec.rb +8 -6
- data/spec/external/wavsep/active/unvalidated_redirect_spec.rb +57 -0
- data/spec/external/wavsep/active/xss_dom_spec.rb +27 -0
- data/spec/external/wavsep/active/xss_spec.rb +13 -3
- data/spec/external/wavsep/false_positives/lfi_spec.rb +4 -16
- data/spec/external/wavsep/false_positives/obsolete_files_spec.rb +21 -0
- data/spec/external/wavsep/false_positives/rfi_spec.rb +2 -2
- data/spec/external/wavsep/false_positives/sqli_spec.rb +4 -15
- data/spec/external/wavsep/false_positives/unvalidated_redirect_spec.rb +21 -0
- data/spec/external/wavsep/false_positives/xss_spec.rb +2 -2
- data/spec/spec_helper.rb +17 -18
- data/spec/support/factories/browser/javascript/taint_tracer/frame.rb +10 -0
- data/spec/support/factories/browser/javascript/taint_tracer/frame/called_function.rb +11 -0
- data/spec/support/factories/browser/javascript/taint_tracer/sink/data_flow.rb +14 -0
- data/spec/support/factories/browser/javascript/taint_tracer/sink/execution_flow.rb +10 -0
- data/spec/support/factories/browser_cluster/job.rb +27 -0
- data/spec/support/factories/element/cookie.rb +7 -0
- data/spec/support/factories/element/form.rb +12 -0
- data/spec/support/factories/element/header.rb +5 -0
- data/spec/support/factories/element/link.rb +11 -0
- data/spec/support/factories/element/link_template.rb +11 -0
- data/spec/support/factories/http/request.rb +9 -0
- data/spec/support/factories/http/response.rb +42 -0
- data/spec/support/factories/issue.rb +67 -0
- data/spec/support/factories/page.rb +7 -0
- data/spec/support/factories/page/dom.rb +13 -0
- data/spec/support/factories/page/dom/transition.rb +21 -0
- data/spec/support/factories/scan_report.rb +35 -0
- data/spec/support/factories/vector.rb +32 -0
- data/spec/support/fixtures/check_with_invalid_platforms/with_invalid_platforms.rb +37 -0
- data/spec/support/fixtures/checks/test.rb +58 -0
- data/spec/support/fixtures/checks/test2.rb +41 -0
- data/spec/support/fixtures/checks/test3.rb +41 -0
- data/spec/support/fixtures/executables/node.rb +47 -0
- data/spec/support/fixtures/fingerprinters/test.rb +5 -13
- data/spec/support/fixtures/option_groups/input.yml +2 -0
- data/spec/support/fixtures/plugins/bad.rb +5 -13
- data/spec/support/fixtures/plugins/defaults/default.rb +6 -14
- data/spec/support/fixtures/plugins/distributable.rb +7 -15
- data/spec/support/fixtures/plugins/loop.rb +5 -13
- data/spec/support/fixtures/plugins/suspendable.rb +44 -0
- data/spec/support/fixtures/plugins/wait.rb +6 -14
- data/spec/support/fixtures/plugins/with_options.rb +20 -16
- data/spec/support/fixtures/plugins_with_priorities/p0.rb +17 -0
- data/spec/support/fixtures/plugins_with_priorities/p00.rb +17 -0
- data/spec/support/fixtures/plugins_with_priorities/p1.rb +17 -0
- data/spec/support/fixtures/plugins_with_priorities/p2.rb +17 -0
- data/spec/support/fixtures/plugins_with_priorities/p22.rb +17 -0
- data/spec/support/fixtures/plugins_with_priorities/p222.rb +17 -0
- data/spec/support/fixtures/plugins_with_priorities/p_nil.rb +16 -0
- data/spec/support/fixtures/plugins_with_priorities/p_nil2.rb +16 -0
- data/spec/support/fixtures/report.afr +0 -0
- data/spec/support/fixtures/reporters/base_spec/plugin_formatters/with_formatters/foobar.rb +13 -0
- data/spec/support/fixtures/reporters/base_spec/with_formatters.rb +15 -0
- data/spec/support/fixtures/reporters/base_spec/with_outfile.rb +16 -0
- data/spec/support/fixtures/reporters/base_spec/without_outfile.rb +12 -0
- data/spec/support/fixtures/reporters/manager_spec/afr.rb +13 -0
- data/spec/support/fixtures/reporters/manager_spec/foo.rb +18 -0
- data/spec/support/fixtures/rescan.afr.tpl +4 -5
- data/spec/support/fixtures/run_check/body.rb +48 -0
- data/spec/support/fixtures/run_check/cookies.rb +48 -0
- data/spec/support/fixtures/run_check/empty.rb +34 -0
- data/spec/support/fixtures/run_check/flch.rb +53 -0
- data/spec/support/fixtures/run_check/forms.rb +48 -0
- data/spec/support/fixtures/run_check/headers.rb +48 -0
- data/spec/support/fixtures/run_check/links.rb +48 -0
- data/spec/support/fixtures/run_check/nil.rb +47 -0
- data/spec/support/fixtures/run_check/path.rb +48 -0
- data/spec/support/fixtures/run_check/server.rb +48 -0
- data/spec/support/fixtures/services/echo.rb +64 -0
- data/spec/support/fixtures/taint_check/taint.rb +38 -0
- data/spec/support/fixtures/wait_check/wait.rb +38 -0
- data/spec/support/helpers/auditor.rb +18 -5
- data/spec/support/helpers/browser.rb +6 -0
- data/spec/support/helpers/browser_cluster/jobs/taint_tracer.rb +32 -0
- data/spec/support/helpers/framework.rb +5 -13
- data/spec/support/helpers/misc.rb +4 -12
- data/spec/support/helpers/pages.rb +18 -0
- data/spec/support/helpers/paths.rb +4 -12
- data/spec/support/helpers/requires.rb +5 -13
- data/spec/support/helpers/resets.rb +12 -19
- data/spec/support/helpers/web_server.rb +11 -15
- data/spec/support/lib/factory.rb +115 -0
- data/spec/support/lib/web_server_client.rb +49 -0
- data/spec/support/lib/web_server_dispatcher.rb +33 -0
- data/spec/support/lib/web_server_manager.rb +29 -32
- data/spec/support/pems/cacert.pem +35 -37
- data/spec/support/pems/client/cert.pem +35 -37
- data/spec/support/pems/client/key.pem +49 -49
- data/spec/support/pems/server/cert.pem +35 -37
- data/spec/support/pems/server/key.pem +49 -49
- data/spec/support/servers/arachni/browser.rb +836 -0
- data/spec/support/servers/arachni/browser/javascript.rb +7 -0
- data/spec/support/servers/arachni/browser/javascript/angular-1.2.8.js +20554 -0
- data/spec/support/servers/arachni/browser/javascript/angular-route.js +911 -0
- data/spec/support/servers/arachni/browser/javascript/dom_monitor.rb +90 -0
- data/spec/support/servers/arachni/browser/javascript/jquery-2.0.3.js +8829 -0
- data/spec/support/servers/arachni/browser/javascript/proxy.rb +17 -0
- data/spec/support/servers/arachni/browser/javascript/taint_tracer.rb +714 -0
- data/spec/support/servers/arachni/browser_cluster/jobs/event_trigger.rb +25 -0
- data/spec/support/servers/arachni/browser_https.rb +60 -0
- data/spec/support/servers/arachni/check/auditor.rb +247 -0
- data/spec/support/servers/arachni/element/body.rb +5 -0
- data/spec/support/servers/arachni/element/capabilities/analyzable/differential.rb +162 -0
- data/spec/support/servers/arachni/element/capabilities/{auditable → analyzable}/taint.rb +0 -0
- data/spec/support/servers/arachni/element/capabilities/analyzable/timeout.rb +37 -0
- data/spec/support/servers/arachni/element/cookie.rb +1 -1
- data/spec/support/servers/arachni/element/cookie/cookie_dom.rb +21 -0
- data/spec/support/servers/arachni/element/form.rb +6 -22
- data/spec/support/servers/arachni/element/form/form_dom.rb +50 -0
- data/spec/support/servers/arachni/element/header.rb +7 -8
- data/spec/support/servers/arachni/element/link.rb +15 -7
- data/spec/support/servers/arachni/element/link/link_dom.rb +49 -0
- data/spec/support/servers/arachni/element/link_template.rb +11 -0
- data/spec/support/servers/arachni/element/link_template/link_template_dom.rb +43 -0
- data/spec/support/servers/arachni/framework.rb +18 -0
- data/spec/support/servers/arachni/http/client.rb +176 -0
- data/spec/support/servers/arachni/http/proxy_server.rb +9 -0
- data/spec/support/servers/arachni/http/proxy_server_https.rb +25 -0
- data/spec/support/servers/arachni/page/page_dom.rb +83 -0
- data/spec/support/servers/arachni/parser.rb +4 -0
- data/spec/support/servers/arachni/rpc/server/{framework_hpg.rb → framework_multi.rb} +0 -0
- data/spec/support/servers/arachni/session.rb +43 -9
- data/spec/support/servers/arachni/trainer.rb +11 -7
- data/spec/support/servers/checks/active/code_injection.rb +163 -0
- data/spec/support/servers/checks/active/code_injection_timing.rb +134 -0
- data/spec/support/servers/{modules/audit → checks/active}/csrf.rb +0 -0
- data/spec/support/servers/checks/active/file_inclusion.rb +228 -0
- data/spec/support/servers/checks/active/ldap_injection.rb +88 -0
- data/spec/support/servers/checks/active/no_sql_injection.rb +134 -0
- data/spec/support/servers/checks/active/no_sql_injection/mongodb +1 -0
- data/spec/support/servers/checks/active/no_sql_injection_differential.rb +61 -0
- data/spec/support/servers/checks/active/os_cmd_injection.rb +172 -0
- data/spec/support/servers/checks/active/os_cmd_injection_timing.rb +118 -0
- data/spec/support/servers/checks/active/path_traversal.rb +219 -0
- data/spec/support/servers/checks/active/response_splitting.rb +138 -0
- data/spec/support/servers/{modules/audit → checks/active}/rfi.rb +0 -0
- data/spec/support/servers/checks/active/session_fixation.rb +111 -0
- data/spec/support/servers/checks/active/source_code_disclosure.rb +118 -0
- data/spec/support/servers/checks/active/sql_injection.rb +133 -0
- data/spec/support/servers/{modules/audit/sqli → checks/active/sql_injection}/access +0 -0
- data/spec/support/servers/{modules/audit/sqli → checks/active/sql_injection}/coldfusion +0 -0
- data/spec/support/servers/{modules/audit/sqli → checks/active/sql_injection}/db2 +0 -0
- data/spec/support/servers/{modules/audit/sqli → checks/active/sql_injection}/emc +0 -0
- data/spec/support/servers/{modules/audit/sqli → checks/active/sql_injection}/firebird +0 -0
- data/spec/support/servers/{modules/audit/sqli → checks/active/sql_injection}/frontbase +0 -0
- data/spec/support/servers/{modules/audit/sqli → checks/active/sql_injection}/hsqldb +0 -0
- data/spec/support/servers/{modules/audit/sqli → checks/active/sql_injection}/informix +0 -0
- data/spec/support/servers/{modules/audit/sqli → checks/active/sql_injection}/ingres +0 -0
- data/spec/support/servers/{modules/audit/sqli → checks/active/sql_injection}/interbase +0 -0
- data/spec/support/servers/checks/active/sql_injection/jdbc +0 -0
- data/spec/support/servers/{modules/audit/sqli → checks/active/sql_injection}/maxdb +0 -0
- data/spec/support/servers/{modules/audit/sqli → checks/active/sql_injection}/mssql +0 -0
- data/spec/support/servers/{modules/audit/sqli → checks/active/sql_injection}/mysql +0 -0
- data/spec/support/servers/{modules/audit/sqli → checks/active/sql_injection}/oracle +0 -0
- data/spec/support/servers/{modules/audit/sqli/postgresql → checks/active/sql_injection/pgsql} +0 -0
- data/spec/support/servers/{modules/audit/sqli → checks/active/sql_injection}/sqlite +0 -0
- data/spec/support/servers/{modules/audit/sqli → checks/active/sql_injection}/sybase +0 -0
- data/spec/support/servers/{modules/audit/sqli_blind_rdiff.rb → checks/active/sql_injection_differential.rb} +0 -0
- data/spec/support/servers/checks/active/sql_injection_timing.rb +145 -0
- data/spec/support/servers/{modules/audit/trainer_module.rb → checks/active/trainer_check.rb} +0 -0
- data/spec/support/servers/checks/active/unvalidated_redirect.rb +141 -0
- data/spec/support/servers/checks/active/xpath_injection.rb +121 -0
- data/spec/support/servers/{modules/audit/xpath → checks/active/xpath_injection}/dotnet +0 -0
- data/spec/support/servers/{modules/audit/xpath → checks/active/xpath_injection}/general +0 -0
- data/spec/support/servers/{modules/audit/xpath → checks/active/xpath_injection}/java +0 -0
- data/spec/support/servers/{modules/audit/xpath → checks/active/xpath_injection}/libxml2 +0 -0
- data/spec/support/servers/{modules/audit/xpath → checks/active/xpath_injection}/php +0 -0
- data/spec/support/servers/checks/active/xss.rb +239 -0
- data/spec/support/servers/checks/active/xss_dom.rb +133 -0
- data/spec/support/servers/checks/active/xss_dom_inputs.rb +35 -0
- data/spec/support/servers/checks/active/xss_dom_script_context.rb +139 -0
- data/spec/support/servers/checks/active/xss_event.rb +80 -0
- data/spec/support/servers/{modules/audit → checks/active}/xss_path.rb +0 -0
- data/spec/support/servers/checks/active/xss_script_context.rb +90 -0
- data/spec/support/servers/{modules/audit → checks/active}/xss_tag.rb +0 -0
- data/spec/support/servers/checks/check_server.rb +14 -0
- data/spec/support/servers/{modules/recon → checks/passive}/allowed_methods.rb +0 -0
- data/spec/support/servers/checks/passive/backdoors.rb +4 -0
- data/spec/support/servers/checks/passive/backup_directories.rb +15 -0
- data/spec/support/servers/checks/passive/backup_files.rb +15 -0
- data/spec/support/servers/checks/passive/common_directories.rb +6 -0
- data/spec/support/servers/checks/passive/common_files.rb +6 -0
- data/spec/support/servers/checks/passive/directory_listing.rb +30 -0
- data/spec/support/servers/{modules/recon → checks/passive}/grep/captcha.rb +0 -0
- data/spec/support/servers/checks/passive/grep/cookie_set_for_parent_domain.rb +21 -0
- data/spec/support/servers/{modules/recon → checks/passive}/grep/credit_card.rb +0 -0
- data/spec/support/servers/{modules/recon → checks/passive}/grep/cvs_svn_users.rb +0 -0
- data/spec/support/servers/checks/passive/grep/emails.rb +23 -0
- data/spec/support/servers/{modules/recon → checks/passive}/grep/form_upload.rb +0 -0
- data/spec/support/servers/checks/passive/grep/hsts_https.rb +37 -0
- data/spec/support/servers/{modules/recon → checks/passive}/grep/html_objects.rb +0 -0
- data/spec/support/servers/{modules/recon → checks/passive}/grep/http_only_cookies.rb +0 -0
- data/spec/support/servers/checks/passive/grep/insecure_cookies_https.rb +40 -0
- data/spec/support/servers/checks/passive/grep/mixed_resource_https.rb +69 -0
- data/spec/support/servers/checks/passive/grep/password_autocomplete.rb +33 -0
- data/spec/support/servers/{modules/recon → checks/passive}/grep/private_ip.rb +0 -0
- data/spec/support/servers/{modules/recon → checks/passive}/grep/ssn.rb +0 -0
- data/spec/support/servers/checks/passive/grep/unencrypted_password_forms.rb +33 -0
- data/spec/support/servers/{modules/recon → checks/passive}/htaccess_limit.rb +0 -0
- data/spec/support/servers/checks/passive/http_put.rb +7 -0
- data/spec/support/servers/checks/passive/interesting_responses.rb +5 -0
- data/spec/support/servers/{modules/recon → checks/passive}/localstart_asp.rb +0 -0
- data/spec/support/servers/checks/passive/origin_spoof_access_restriction_bypass.rb +30 -0
- data/spec/support/servers/checks/passive/webdav.rb +25 -0
- data/spec/support/servers/{modules/recon → checks/passive}/xst.rb +0 -0
- data/spec/support/servers/plugins/meta/remedies/discovery.rb +2 -2
- data/spec/support/servers/plugins/meta/remedies/timing_attacks.rb +2 -0
- data/spec/support/shared/browser/javascript/taint_tracer/sink/base.rb +36 -0
- data/spec/support/shared/check.rb +198 -0
- data/spec/support/shared/component.rb +15 -4
- data/spec/support/shared/component/options/base.rb +187 -0
- data/spec/support/shared/element/base.rb +131 -0
- data/spec/support/shared/element/capabilities/auditable.rb +371 -604
- data/spec/support/shared/element/capabilities/auditable/dom.rb +303 -0
- data/spec/support/shared/element/capabilities/inputtable.rb +499 -0
- data/spec/support/shared/element/capabilities/mutable.rb +362 -0
- data/spec/support/shared/element/capabilities/refreshable.rb +26 -26
- data/spec/support/shared/element/capabilities/submitable.rb +155 -0
- data/spec/support/shared/element/capabilities/with_auditor.rb +75 -0
- data/spec/support/shared/element/capabilities/with_dom.rb +39 -0
- data/spec/support/shared/element/capabilities/with_node.rb +42 -0
- data/spec/support/shared/element/capabilities/with_scope.rb +22 -0
- data/spec/support/shared/external/wavsep.rb +30 -9
- data/spec/support/shared/http/message.rb +72 -0
- data/spec/support/shared/option_group.rb +98 -0
- data/spec/support/shared/path_extractor.rb +1 -1
- data/spec/support/shared/plugin.rb +33 -16
- data/spec/support/shared/reporter.rb +41 -0
- data/spec/support/shared/support/cache.rb +341 -0
- data/spec/support/shared/support/lookup.rb +93 -13
- data/ui/cli/framework.rb +466 -0
- data/ui/cli/framework/option_parser.rb +628 -0
- data/ui/cli/option_parser.rb +104 -0
- data/ui/cli/output.rb +377 -0
- data/ui/cli/reporter.rb +52 -0
- data/ui/cli/reporter/option_parser.rb +102 -0
- data/ui/cli/restored_framework.rb +127 -0
- data/ui/cli/restored_framework/option_parser.rb +115 -0
- data/ui/cli/rpc/client/dispatcher_monitor.rb +157 -0
- data/ui/cli/rpc/client/dispatcher_monitor/option_parser.rb +41 -0
- data/ui/cli/rpc/client/instance.rb +294 -0
- data/ui/cli/rpc/client/local.rb +65 -0
- data/ui/cli/rpc/client/local/option_parser.rb +35 -0
- data/ui/cli/rpc/client/remote.rb +84 -0
- data/ui/cli/rpc/client/remote/option_parser.rb +99 -0
- data/ui/cli/rpc/server/dispatcher.rb +36 -0
- data/ui/cli/rpc/server/dispatcher/option_parser.rb +165 -0
- data/ui/cli/utilities.rb +228 -0
- metadata +1260 -1266
- data/EXPLOITATION.md +0 -431
- data/HACKING.md +0 -120
- data/NOTICE +0 -12
- data/data/crypto/public.pem +0 -9
- data/external/metasploit/LICENSE +0 -24
- data/external/metasploit/plugins/arachni.rb +0 -516
- data/external/metasploit/plugins/arachni/modules/auxiliary/arachni_sqlmap.rb +0 -91
- data/external/metasploit/plugins/arachni/modules/exploits/unix/webapp/arachni_exec.rb +0 -142
- data/external/metasploit/plugins/arachni/modules/exploits/unix/webapp/arachni_path_traversal.rb +0 -113
- data/external/metasploit/plugins/arachni/modules/exploits/unix/webapp/arachni_php_eval.rb +0 -150
- data/external/metasploit/plugins/arachni/modules/exploits/unix/webapp/arachni_php_include.rb +0 -141
- data/fingerprinters/frameworks/rack.rb +0 -41
- data/fingerprinters/languages/asp.rb +0 -42
- data/fingerprinters/languages/aspx.rb +0 -63
- data/fingerprinters/languages/jsp.rb +0 -42
- data/fingerprinters/languages/php.rb +0 -43
- data/fingerprinters/languages/python.rb +0 -40
- data/fingerprinters/languages/ruby.rb +0 -41
- data/fingerprinters/os/bsd.rb +0 -36
- data/fingerprinters/os/linux.rb +0 -42
- data/fingerprinters/os/solaris.rb +0 -41
- data/fingerprinters/os/unix.rb +0 -36
- data/fingerprinters/os/windows.rb +0 -41
- data/fingerprinters/servers/apache.rb +0 -36
- data/fingerprinters/servers/iis.rb +0 -36
- data/fingerprinters/servers/jetty.rb +0 -36
- data/fingerprinters/servers/nginx.rb +0 -36
- data/fingerprinters/servers/tomcat.rb +0 -36
- data/gfx/README.md +0 -18
- data/gfx/compiled/banner.png +0 -0
- data/gfx/compiled/favicon.ico +0 -0
- data/gfx/compiled/icon.png +0 -0
- data/gfx/compiled/logo.png +0 -0
- data/gfx/compiled/spider.png +0 -0
- data/gfx/font/Beneath_the_Surface.ttf +0 -0
- data/gfx/font/bts_readme.txt +0 -14
- data/gfx/source/banner.svg +0 -999
- data/gfx/source/icon.svg +0 -627
- data/gfx/source/logo.svg +0 -672
- data/gfx/source/spider.png +0 -0
- data/gfx/source/spider.svg +0 -277
- data/lib/arachni/audit_store.rb +0 -321
- data/lib/arachni/component/options/enum.rb +0 -51
- data/lib/arachni/element/capabilities/auditable/rdiff.rb +0 -489
- data/lib/arachni/element/capabilities/auditable/taint.rb +0 -238
- data/lib/arachni/element/capabilities/auditable/timeout.rb +0 -469
- data/lib/arachni/mixins/observable.rb +0 -91
- data/lib/arachni/mixins/progress_bar.rb +0 -87
- data/lib/arachni/mixins/terminal.rb +0 -112
- data/lib/arachni/module.rb +0 -20
- data/lib/arachni/module/auditor.rb +0 -618
- data/lib/arachni/module/base.rb +0 -188
- data/lib/arachni/module/manager.rb +0 -255
- data/lib/arachni/module/output.rb +0 -68
- data/lib/arachni/module/utilities.rb +0 -64
- data/lib/arachni/report/base.rb +0 -201
- data/lib/arachni/report/manager.rb +0 -86
- data/lib/arachni/rpc/server/dispatcher/handler.rb +0 -166
- data/lib/arachni/rpc/server/module/manager.rb +0 -46
- data/lib/arachni/rpc/server/spider.rb +0 -404
- data/lib/arachni/ruby/enumerable.rb +0 -29
- data/lib/arachni/spider.rb +0 -477
- data/lib/arachni/support/key_filler.rb +0 -68
- data/lib/arachni/support/queue.rb +0 -18
- data/lib/arachni/support/queue/disk.rb +0 -171
- data/lib/arachni/typhoeus/hydra.rb +0 -56
- data/lib/arachni/typhoeus/request.rb +0 -80
- data/lib/arachni/typhoeus/response.rb +0 -103
- data/lib/arachni/typhoeus/utils.rb +0 -25
- data/lib/arachni/ui/cli/cli.rb +0 -469
- data/lib/arachni/ui/cli/output.rb +0 -391
- data/lib/arachni/ui/cli/rpc/dispatcher_monitor.rb +0 -188
- data/lib/arachni/ui/cli/rpc/instance.rb +0 -407
- data/lib/arachni/ui/cli/rpc/local.rb +0 -80
- data/lib/arachni/ui/cli/rpc/remote.rb +0 -134
- data/lib/arachni/ui/cli/utilities.rb +0 -509
- data/modules/audit/code_injection.rb +0 -137
- data/modules/audit/code_injection_php_input_wrapper.rb +0 -109
- data/modules/audit/code_injection_timing.rb +0 -122
- data/modules/audit/csrf.rb +0 -225
- data/modules/audit/file_inclusion.rb +0 -156
- data/modules/audit/ldapi.rb +0 -97
- data/modules/audit/os_cmd_injection.rb +0 -109
- data/modules/audit/os_cmd_injection_timing.rb +0 -98
- data/modules/audit/path_traversal.rb +0 -170
- data/modules/audit/response_splitting.rb +0 -99
- data/modules/audit/rfi.rb +0 -181
- data/modules/audit/session_fixation.rb +0 -117
- data/modules/audit/source_code_disclosure.rb +0 -179
- data/modules/audit/sqli.rb +0 -148
- data/modules/audit/sqli_blind_rdiff.rb +0 -138
- data/modules/audit/sqli_blind_timing.rb +0 -126
- data/modules/audit/trainer.rb +0 -49
- data/modules/audit/unvalidated_redirect.rb +0 -91
- data/modules/audit/xpath.rb +0 -97
- data/modules/audit/xss.rb +0 -154
- data/modules/audit/xss_event.rb +0 -153
- data/modules/audit/xss_path.rb +0 -152
- data/modules/audit/xss_script_tag.rb +0 -137
- data/modules/audit/xss_tag.rb +0 -137
- data/modules/recon/allowed_methods.rb +0 -99
- data/modules/recon/backdoors.rb +0 -82
- data/modules/recon/backup_files.rb +0 -100
- data/modules/recon/backup_files/extensions.txt +0 -28
- data/modules/recon/common_directories.rb +0 -87
- data/modules/recon/common_files.rb +0 -78
- data/modules/recon/common_files/filenames.txt +0 -21
- data/modules/recon/directory_listing.rb +0 -133
- data/modules/recon/grep/captcha.rb +0 -74
- data/modules/recon/grep/credit_card.rb +0 -128
- data/modules/recon/grep/cvs_svn_users.rb +0 -81
- data/modules/recon/grep/emails.rb +0 -73
- data/modules/recon/grep/form_upload.rb +0 -86
- data/modules/recon/grep/html_objects.rb +0 -56
- data/modules/recon/grep/http_only_cookies.rb +0 -82
- data/modules/recon/grep/insecure_cookies.rb +0 -82
- data/modules/recon/grep/mixed_resource.rb +0 -113
- data/modules/recon/grep/password_autocomplete.rb +0 -85
- data/modules/recon/grep/private_ip.rb +0 -70
- data/modules/recon/grep/ssn.rb +0 -66
- data/modules/recon/grep/unencrypted_password_forms.rb +0 -103
- data/modules/recon/htaccess_limit.rb +0 -76
- data/modules/recon/http_put.rb +0 -95
- data/modules/recon/interesting_responses.rb +0 -91
- data/modules/recon/localstart_asp.rb +0 -97
- data/modules/recon/webdav.rb +0 -106
- data/modules/recon/x_forwarded_for_access_restriction_bypass.rb +0 -76
- data/modules/recon/xst.rb +0 -103
- data/path_extractors/anchors.rb +0 -37
- data/path_extractors/areas.rb +0 -37
- data/path_extractors/forms.rb +0 -37
- data/path_extractors/frames.rb +0 -37
- data/path_extractors/generic.rb +0 -84
- data/path_extractors/links.rb +0 -37
- data/path_extractors/meta_refresh.rb +0 -58
- data/path_extractors/scripts.rb +0 -38
- data/plugins/autologin.rb +0 -133
- data/plugins/beep_notify.rb +0 -49
- data/plugins/content_types.rb +0 -107
- data/plugins/cookie_collector.rb +0 -85
- data/plugins/defaults/autothrottle.rb +0 -78
- data/plugins/defaults/healthmap.rb +0 -89
- data/plugins/defaults/meta/remedies/discovery.rb +0 -138
- data/plugins/defaults/meta/remedies/timing_attacks.rb +0 -117
- data/plugins/defaults/meta/uniformity.rb +0 -82
- data/plugins/defaults/resolver.rb +0 -60
- data/plugins/email_notify.rb +0 -106
- data/plugins/form_dicattack.rb +0 -123
- data/plugins/http_dicattack.rb +0 -108
- data/plugins/libnotify.rb +0 -82
- data/plugins/profiler.rb +0 -179
- data/plugins/proxy.rb +0 -502
- data/plugins/proxy/panel/page_accordion.html.erb +0 -67
- data/plugins/proxy/panel/panel.html.erb +0 -69
- data/plugins/proxy/panel/verify_login_sequence.html.erb +0 -45
- data/plugins/proxy/server.rb +0 -215
- data/plugins/proxy/template_scope.rb +0 -138
- data/plugins/rescan.rb +0 -59
- data/plugins/script.rb +0 -53
- data/plugins/uncommon_headers.rb +0 -92
- data/plugins/vector_feed.rb +0 -226
- data/plugins/waf_detector.rb +0 -167
- data/profiles/full.afp +0 -48
- data/reports/afr.rb +0 -44
- data/reports/ap.rb +0 -46
- data/reports/html.rb +0 -273
- data/reports/html/default.erb +0 -82
- data/reports/html/default/configuration.erb +0 -126
- data/reports/html/default/css/jquery-ui.css +0 -570
- data/reports/html/default/css/jquery.jqplot.min.css +0 -1
- data/reports/html/default/css/main.css +0 -391
- data/reports/html/default/headers.erb +0 -19
- data/reports/html/default/issue.erb +0 -178
- data/reports/html/default/issues.erb +0 -52
- data/reports/html/default/js/charts.js +0 -147
- data/reports/html/default/js/helpers.js +0 -53
- data/reports/html/default/js/init.js +0 -72
- data/reports/html/default/js/lib/jqplot.barRenderer.min.js +0 -57
- data/reports/html/default/js/lib/jqplot.categoryAxisRenderer.min.js +0 -57
- data/reports/html/default/js/lib/jqplot.cursor.min.js +0 -57
- data/reports/html/default/js/lib/jqplot.pieRenderer.min.js +0 -57
- data/reports/html/default/js/lib/jqplot.pointLabels.min.js +0 -57
- data/reports/html/default/js/lib/jquery-ui.min.js +0 -404
- data/reports/html/default/js/lib/jquery.jqplot.min.js +0 -57
- data/reports/html/default/js/lib/jquery.min.js +0 -167
- data/reports/html/default/plugins.erb +0 -22
- data/reports/html/default/search.erb +0 -8
- data/reports/html/default/sitemap.erb +0 -15
- data/reports/html/default/summary.erb +0 -75
- data/reports/html/default/summary_issue.erb +0 -20
- data/reports/json.rb +0 -52
- data/reports/marshal.rb +0 -46
- data/reports/metareport.rb +0 -104
- data/reports/plugin_formatters/html/autologin.rb +0 -45
- data/reports/plugin_formatters/html/content_types.rb +0 -67
- data/reports/plugin_formatters/html/cookie_collector.rb +0 -52
- data/reports/plugin_formatters/html/discovery.rb +0 -45
- data/reports/plugin_formatters/html/form_dicattack.rb +0 -40
- data/reports/plugin_formatters/html/healthmap.rb +0 -60
- data/reports/plugin_formatters/html/http_dicattack.rb +0 -40
- data/reports/plugin_formatters/html/profiler.rb +0 -36
- data/reports/plugin_formatters/html/profiler/template.erb +0 -84
- data/reports/plugin_formatters/html/resolver.rb +0 -55
- data/reports/plugin_formatters/html/timing_attacks.rb +0 -51
- data/reports/plugin_formatters/html/uncommon_headers.rb +0 -47
- data/reports/plugin_formatters/html/uniformity.rb +0 -54
- data/reports/plugin_formatters/html/waf_detector.rb +0 -38
- data/reports/plugin_formatters/stdout/autologin.rb +0 -38
- data/reports/plugin_formatters/stdout/content_types.rb +0 -51
- data/reports/plugin_formatters/stdout/cookie_collector.rb +0 -43
- data/reports/plugin_formatters/stdout/discovery.rb +0 -37
- data/reports/plugin_formatters/stdout/form_dicattack.rb +0 -34
- data/reports/plugin_formatters/stdout/healthmap.rb +0 -49
- data/reports/plugin_formatters/stdout/http_dicattack.rb +0 -34
- data/reports/plugin_formatters/stdout/profiler.rb +0 -66
- data/reports/plugin_formatters/stdout/resolver.rb +0 -29
- data/reports/plugin_formatters/stdout/timing_attacks.rb +0 -37
- data/reports/plugin_formatters/stdout/uncommon_headers.rb +0 -37
- data/reports/plugin_formatters/stdout/uniformity.rb +0 -48
- data/reports/plugin_formatters/stdout/waf_detector.rb +0 -31
- data/reports/plugin_formatters/xml/autologin.rb +0 -41
- data/reports/plugin_formatters/xml/content_types.rb +0 -61
- data/reports/plugin_formatters/xml/cookie_collector.rb +0 -45
- data/reports/plugin_formatters/xml/discovery.rb +0 -38
- data/reports/plugin_formatters/xml/form_dicattack.rb +0 -34
- data/reports/plugin_formatters/xml/healthmap.rb +0 -58
- data/reports/plugin_formatters/xml/http_dicattack.rb +0 -33
- data/reports/plugin_formatters/xml/profiler.rb +0 -80
- data/reports/plugin_formatters/xml/resolver.rb +0 -33
- data/reports/plugin_formatters/xml/timing_attacks.rb +0 -39
- data/reports/plugin_formatters/xml/uncommon_headers.rb +0 -38
- data/reports/plugin_formatters/xml/uniformity.rb +0 -54
- data/reports/plugin_formatters/xml/waf_detector.rb +0 -34
- data/reports/stdout.rb +0 -203
- data/reports/txt.rb +0 -58
- data/reports/xml.rb +0 -176
- data/reports/xml/buffer.rb +0 -97
- data/reports/yaml.rb +0 -46
- data/spec/arachni/audit_store_spec.rb +0 -239
- data/spec/arachni/component/options/enum_spec.rb +0 -51
- data/spec/arachni/element/base_spec.rb +0 -138
- data/spec/arachni/element/capabilities/auditable/rdiff_spec.rb +0 -134
- data/spec/arachni/element/capabilities/auditable/taint_spec.rb +0 -409
- data/spec/arachni/element/capabilities/auditable/timeout_spec.rb +0 -157
- data/spec/arachni/element/capabilities/mutable_spec.rb +0 -284
- data/spec/arachni/http_spec.rb +0 -962
- data/spec/arachni/mixins/observable_spec.rb +0 -75
- data/spec/arachni/mixins/progress_bar_spec.rb +0 -47
- data/spec/arachni/module/auditor_spec.rb +0 -544
- data/spec/arachni/module/manager_spec.rb +0 -150
- data/spec/arachni/module/utilities_spec.rb +0 -30
- data/spec/arachni/report/base_spec.rb +0 -61
- data/spec/arachni/report/manager_spec.rb +0 -82
- data/spec/arachni/rpc/server/dispatcher/handler_spec.rb +0 -102
- data/spec/arachni/rpc/server/framework_hpg_spec.rb +0 -376
- data/spec/arachni/rpc/server/framework_simple_spec.rb +0 -501
- data/spec/arachni/rpc/server/modules/manager_spec.rb +0 -47
- data/spec/arachni/rpc/server/spider_spec.rb +0 -68
- data/spec/arachni/ruby/enumerable_spec.rb +0 -37
- data/spec/arachni/spider_spec.rb +0 -539
- data/spec/arachni/support/cache/base_spec.rb +0 -282
- data/spec/arachni/support/key_filler.rb +0 -60
- data/spec/arachni/support/queue/disk_spec.rb +0 -116
- data/spec/arachni/typhoeus/requrest_spec.rb +0 -58
- data/spec/arachni/typhoeus/response_spec.rb +0 -171
- data/spec/fingerprinters/frameworks/rack_spec.rb +0 -41
- data/spec/fingerprinters/languages/asp_spec.rb +0 -40
- data/spec/fingerprinters/languages/aspx_spec.rb +0 -78
- data/spec/fingerprinters/languages/jsp_spec.rb +0 -58
- data/spec/fingerprinters/languages/php_spec.rb +0 -61
- data/spec/fingerprinters/languages/python_spec.rb +0 -23
- data/spec/fingerprinters/languages/ruby.rb +0 -34
- data/spec/fingerprinters/os/bsd_spec.rb +0 -26
- data/spec/fingerprinters/os/linux_spec.rb +0 -34
- data/spec/fingerprinters/os/solaris_spec.rb +0 -34
- data/spec/fingerprinters/os/unix_spec.rb +0 -26
- data/spec/fingerprinters/os/windows_spec.rb +0 -34
- data/spec/fingerprinters/servers/apache_spec.rb +0 -26
- data/spec/fingerprinters/servers/iis_spec.rb +0 -28
- data/spec/fingerprinters/servers/jetty_spec.rb +0 -28
- data/spec/fingerprinters/servers/nginx_spec.rb +0 -26
- data/spec/fingerprinters/servers/tomcat_spec.rb +0 -28
- data/spec/modules/audit/code_injection_spec.rb +0 -25
- data/spec/modules/audit/code_injection_timing_spec.rb +0 -24
- data/spec/modules/audit/csrf_spec.rb +0 -45
- data/spec/modules/audit/file_inclusion_spec.rb +0 -25
- data/spec/modules/audit/ldapi_spec.rb +0 -19
- data/spec/modules/audit/os_cmd_injection_spec.rb +0 -24
- data/spec/modules/audit/os_cmd_injection_timing_spec.rb +0 -24
- data/spec/modules/audit/path_traversal_spec.rb +0 -23
- data/spec/modules/audit/response_splitting_spec.rb +0 -19
- data/spec/modules/audit/rfi_spec.rb +0 -19
- data/spec/modules/audit/session_fixation_spec.rb +0 -23
- data/spec/modules/audit/source_code_disclosure_spec.rb +0 -24
- data/spec/modules/audit/sqli_blind_rdiff_spec.rb +0 -19
- data/spec/modules/audit/sqli_blind_timing_spec.rb +0 -23
- data/spec/modules/audit/sqli_spec.rb +0 -25
- data/spec/modules/audit/trainer_spec.rb +0 -35
- data/spec/modules/audit/unvalidated_redirect_spec.rb +0 -24
- data/spec/modules/audit/xpath_spec.rb +0 -25
- data/spec/modules/audit/xss_event_spec.rb +0 -19
- data/spec/modules/audit/xss_path_spec.rb +0 -19
- data/spec/modules/audit/xss_script_tag_spec.rb +0 -27
- data/spec/modules/audit/xss_spec.rb +0 -24
- data/spec/modules/audit/xss_tag_spec.rb +0 -19
- data/spec/modules/recon/allowed_methods_spec.rb +0 -19
- data/spec/modules/recon/backdoors_spec.rb +0 -19
- data/spec/modules/recon/backup_files_spec.rb +0 -19
- data/spec/modules/recon/common_directories_spec.rb +0 -19
- data/spec/modules/recon/common_files_spec.rb +0 -19
- data/spec/modules/recon/directory_listing_spec.rb +0 -19
- data/spec/modules/recon/grep/captcha_spec.rb +0 -19
- data/spec/modules/recon/grep/credit_card_spec.rb +0 -19
- data/spec/modules/recon/grep/cvs_svn_users_spec.rb +0 -19
- data/spec/modules/recon/grep/emails_spec.rb +0 -19
- data/spec/modules/recon/grep/form_upload_spec.rb +0 -19
- data/spec/modules/recon/grep/html_objects_spec.rb +0 -19
- data/spec/modules/recon/grep/http_only_cookies_spec.rb +0 -19
- data/spec/modules/recon/grep/insecure_cookies_spec.rb +0 -19
- data/spec/modules/recon/grep/mixed_resource_spec.rb +0 -20
- data/spec/modules/recon/grep/password_autocomplete_spec.rb +0 -19
- data/spec/modules/recon/grep/private_ip_spec.rb +0 -26
- data/spec/modules/recon/grep/ssn_spec.rb +0 -19
- data/spec/modules/recon/grep/unencrypted_password_forms_spec.rb +0 -19
- data/spec/modules/recon/htaccess_limit_spec.rb +0 -19
- data/spec/modules/recon/http_put_spec.rb +0 -19
- data/spec/modules/recon/interesting_responses_spec.rb +0 -30
- data/spec/modules/recon/localstart_asp_spec.rb +0 -19
- data/spec/modules/recon/webdav_spec.rb +0 -19
- data/spec/modules/recon/x_forwarded_for_access_restriction_bypass_spec.rb +0 -19
- data/spec/modules/recon/xst_spec.rb +0 -19
- data/spec/path_extractors/scripts_spec.rb +0 -19
- data/spec/plugins/autologin_spec.rb +0 -94
- data/spec/plugins/autothrottle_spec.rb +0 -45
- data/spec/plugins/content_types_spec.rb +0 -93
- data/spec/plugins/cookie_collector_spec.rb +0 -49
- data/spec/plugins/form_dicattack_spec.rb +0 -60
- data/spec/plugins/healthmap_spec.rb +0 -40
- data/spec/plugins/http_dicattack_spec.rb +0 -40
- data/spec/plugins/meta/remedies/discovery_spec.rb +0 -21
- data/spec/plugins/meta/remedies/timing_attacks_spec.rb +0 -34
- data/spec/plugins/meta/uniformity_spec.rb +0 -83
- data/spec/plugins/profiler_spec.rb +0 -82
- data/spec/plugins/rescan_spec.rb +0 -26
- data/spec/plugins/resolver_spec.rb +0 -16
- data/spec/plugins/script_spec.rb +0 -12
- data/spec/plugins/uncommon_headers_spec.rb +0 -64
- data/spec/plugins/vector_feed_spec.rb +0 -167
- data/spec/plugins/waf_detector_spec.rb +0 -41
- data/spec/reports/afr_spec.rb +0 -13
- data/spec/reports/ap_spec.rb +0 -9
- data/spec/reports/html_spec.rb +0 -13
- data/spec/reports/json_spec.rb +0 -17
- data/spec/reports/marshal_spec.rb +0 -13
- data/spec/reports/stdout_spec.rb +0 -9
- data/spec/reports/txt_spec.rb +0 -8
- data/spec/reports/xml_spec.rb +0 -13
- data/spec/reports/yaml_spec.rb +0 -13
- data/spec/support/fixtures/auditstore.afr +0 -76074
- data/spec/support/fixtures/modules/test.rb +0 -58
- data/spec/support/fixtures/modules/test2.rb +0 -46
- data/spec/support/fixtures/modules/test3.rb +0 -46
- data/spec/support/fixtures/plugins/spider_hook.rb +0 -50
- data/spec/support/fixtures/reports/base_spec/plugin_formatters/with_formatters/foobar.rb +0 -21
- data/spec/support/fixtures/reports/base_spec/with_formatters.rb +0 -23
- data/spec/support/fixtures/reports/base_spec/with_outfile.rb +0 -24
- data/spec/support/fixtures/reports/base_spec/without_outfile.rb +0 -20
- data/spec/support/fixtures/reports/manager_spec/afr.rb +0 -21
- data/spec/support/fixtures/reports/manager_spec/foo.rb +0 -26
- data/spec/support/fixtures/rpcd_handlers/echo.rb +0 -68
- data/spec/support/fixtures/run_mod/body.rb +0 -58
- data/spec/support/fixtures/run_mod/cookies.rb +0 -58
- data/spec/support/fixtures/run_mod/empty.rb +0 -58
- data/spec/support/fixtures/run_mod/flch.rb +0 -63
- data/spec/support/fixtures/run_mod/forms.rb +0 -58
- data/spec/support/fixtures/run_mod/headers.rb +0 -58
- data/spec/support/fixtures/run_mod/links.rb +0 -58
- data/spec/support/fixtures/run_mod/nil.rb +0 -57
- data/spec/support/fixtures/run_mod/path.rb +0 -58
- data/spec/support/fixtures/run_mod/server.rb +0 -58
- data/spec/support/fixtures/taint_module/taint.rb +0 -48
- data/spec/support/fixtures/wait_module/wait.rb +0 -48
- data/spec/support/logs/Dispatcher - 1332-56847.log +0 -9
- data/spec/support/logs/Dispatcher - 1361-63434.log +0 -21
- data/spec/support/logs/Dispatcher - 1545-55308.log +0 -9
- data/spec/support/logs/Dispatcher - 1559-18938.log +0 -19
- data/spec/support/logs/Dispatcher - 1568-25013.log +0 -17
- data/spec/support/logs/Dispatcher - 1577-55689.log +0 -13
- data/spec/support/logs/Dispatcher - 1586-18577.log +0 -9
- data/spec/support/logs/Dispatcher - 1595-49353.log +0 -9
- data/spec/support/logs/Dispatcher - 1604-27831.log +0 -11
- data/spec/support/logs/Dispatcher - 1617-57444.log +0 -11
- data/spec/support/logs/Dispatcher - 1631-28737.log +0 -11
- data/spec/support/logs/Dispatcher - 1644-21815.log +0 -33
- data/spec/support/logs/Dispatcher - 1738-53470.log +0 -21
- data/spec/support/logs/Dispatcher - 1747-64173.log +0 -21
- data/spec/support/logs/Dispatcher - 1756-11866.log +0 -23
- data/spec/support/logs/Dispatcher - 1798-12175.log +0 -19
- data/spec/support/logs/Dispatcher - 1807-22790.log +0 -17
- data/spec/support/logs/Dispatcher - 1816-57823.log +0 -15
- data/spec/support/logs/Dispatcher - 1831-64825.log +0 -11
- data/spec/support/logs/Dispatcher - 1845-27623.log +0 -9
- data/spec/support/logs/Dispatcher - 1854-26066.log +0 -9
- data/spec/support/logs/Dispatcher - 1863-37486.log +0 -9
- data/spec/support/logs/Dispatcher - 1874-22463.log +0 -9
- data/spec/support/logs/Dispatcher - 1883-41263.log +0 -11
- data/spec/support/logs/Dispatcher - 1900-53660.log +0 -9
- data/spec/support/logs/Dispatcher - 1909-44423.log +0 -9
- data/spec/support/logs/Dispatcher - 1921-58931.log +0 -9
- data/spec/support/logs/Dispatcher - 1993-6448.log +0 -63
- data/spec/support/logs/Dispatcher - 2002-19206.log +0 -43
- data/spec/support/logs/Dispatcher - 2011-11852.log +0 -39
- data/spec/support/logs/Dispatcher - 2020-65055.log +0 -34
- data/spec/support/logs/Dispatcher - 2029-48445.log +0 -28
- data/spec/support/logs/Dispatcher - 2038-55271.log +0 -21
- data/spec/support/logs/Dispatcher - 2047-45722.log +0 -13
- data/spec/support/logs/Dispatcher - 2057-48194.log +0 -9
- data/spec/support/logs/Dispatcher - 2189-39843.log +0 -19
- data/spec/support/logs/Dispatcher - 2199-15985.log +0 -21
- data/spec/support/logs/Dispatcher - 2208-22080.log +0 -15
- data/spec/support/logs/Dispatcher - 2221-37690.log +0 -19
- data/spec/support/logs/Dispatcher - 2230-47867.log +0 -21
- data/spec/support/logs/Dispatcher - 2239-27060.log +0 -15
- data/spec/support/logs/Dispatcher - 2358-8967.log +0 -17
- data/spec/support/logs/Dispatcher - 2367-27103.log +0 -21
- data/spec/support/logs/Dispatcher - 2376-16287.log +0 -13
- data/spec/support/logs/Dispatcher - 2389-9109.log +0 -19
- data/spec/support/logs/Dispatcher - 2398-62926.log +0 -21
- data/spec/support/logs/Dispatcher - 2407-48685.log +0 -15
- data/spec/support/logs/Dispatcher - 2459-62480.log +0 -17
- data/spec/support/logs/Dispatcher - 2470-57894.log +0 -21
- data/spec/support/logs/Dispatcher - 2479-51883.log +0 -13
- data/spec/support/logs/Dispatcher - 2493-36944.log +0 -17
- data/spec/support/logs/Dispatcher - 2503-59143.log +0 -21
- data/spec/support/logs/Dispatcher - 2513-33084.log +0 -13
- data/spec/support/logs/Dispatcher - 25430-46306.log +0 -9
- data/spec/support/logs/Dispatcher - 25457-10711.log +0 -23
- data/spec/support/logs/Dispatcher - 25603-48892.log +0 -9
- data/spec/support/logs/Dispatcher - 25613-24775.log +0 -19
- data/spec/support/logs/Dispatcher - 25622-59684.log +0 -17
- data/spec/support/logs/Dispatcher - 25631-23195.log +0 -13
- data/spec/support/logs/Dispatcher - 25640-9810.log +0 -9
- data/spec/support/logs/Dispatcher - 25649-52757.log +0 -9
- data/spec/support/logs/Dispatcher - 25658-58550.log +0 -11
- data/spec/support/logs/Dispatcher - 25671-30871.log +0 -11
- data/spec/support/logs/Dispatcher - 25684-48620.log +0 -11
- data/spec/support/logs/Dispatcher - 25697-18124.log +0 -37
- data/spec/support/logs/Dispatcher - 25762-35321.log +0 -21
- data/spec/support/logs/Dispatcher - 25771-64633.log +0 -21
- data/spec/support/logs/Dispatcher - 25780-43558.log +0 -23
- data/spec/support/logs/Dispatcher - 25821-43561.log +0 -19
- data/spec/support/logs/Dispatcher - 25830-39112.log +0 -17
- data/spec/support/logs/Dispatcher - 25839-44093.log +0 -15
- data/spec/support/logs/Dispatcher - 25852-12057.log +0 -11
- data/spec/support/logs/Dispatcher - 25866-49029.log +0 -9
- data/spec/support/logs/Dispatcher - 25875-32179.log +0 -9
- data/spec/support/logs/Dispatcher - 25884-62703.log +0 -9
- data/spec/support/logs/Dispatcher - 25894-4228.log +0 -9
- data/spec/support/logs/Dispatcher - 25903-6709.log +0 -11
- data/spec/support/logs/Dispatcher - 25917-29651.log +0 -9
- data/spec/support/logs/Dispatcher - 25926-12708.log +0 -9
- data/spec/support/logs/Dispatcher - 25935-54092.log +0 -9
- data/spec/support/logs/Dispatcher - 25990-26756.log +0 -63
- data/spec/support/logs/Dispatcher - 25999-4016.log +0 -43
- data/spec/support/logs/Dispatcher - 26008-52076.log +0 -39
- data/spec/support/logs/Dispatcher - 26017-48497.log +0 -34
- data/spec/support/logs/Dispatcher - 26026-28839.log +0 -28
- data/spec/support/logs/Dispatcher - 26035-54215.log +0 -21
- data/spec/support/logs/Dispatcher - 26044-27216.log +0 -13
- data/spec/support/logs/Dispatcher - 26054-53464.log +0 -9
- data/spec/support/logs/Dispatcher - 26163-65271.log +0 -19
- data/spec/support/logs/Dispatcher - 26173-58105.log +0 -21
- data/spec/support/logs/Dispatcher - 26182-40848.log +0 -15
- data/spec/support/logs/Dispatcher - 26195-2855.log +0 -19
- data/spec/support/logs/Dispatcher - 26204-35297.log +0 -21
- data/spec/support/logs/Dispatcher - 26213-59588.log +0 -15
- data/spec/support/logs/Dispatcher - 26333-40774.log +0 -17
- data/spec/support/logs/Dispatcher - 26342-45541.log +0 -21
- data/spec/support/logs/Dispatcher - 26351-3349.log +0 -13
- data/spec/support/logs/Dispatcher - 26364-37456.log +0 -19
- data/spec/support/logs/Dispatcher - 26373-37340.log +0 -21
- data/spec/support/logs/Dispatcher - 26382-54864.log +0 -15
- data/spec/support/logs/Dispatcher - 26434-3070.log +0 -17
- data/spec/support/logs/Dispatcher - 26448-14295.log +0 -21
- data/spec/support/logs/Dispatcher - 26474-30587.log +0 -13
- data/spec/support/logs/Dispatcher - 26500-32529.log +0 -17
- data/spec/support/logs/Dispatcher - 26509-16952.log +0 -21
- data/spec/support/logs/Dispatcher - 26519-43332.log +0 -13
- data/spec/support/logs/Dispatcher - 26750-61867.log +0 -19
- data/spec/support/logs/Dispatcher - 26759-22532.log +0 -21
- data/spec/support/logs/Dispatcher - 26768-18231.log +0 -15
- data/spec/support/logs/Dispatcher - 26792-41661.log +0 -21
- data/spec/support/logs/Dispatcher - 26801-14384.log +0 -25
- data/spec/support/logs/Dispatcher - 26810-2591.log +0 -15
- data/spec/support/logs/Dispatcher - 26846-14591.log +0 -17
- data/spec/support/logs/Dispatcher - 26855-15708.log +0 -21
- data/spec/support/logs/Dispatcher - 26864-2062.log +0 -13
- data/spec/support/logs/Dispatcher - 26877-14471.log +0 -21
- data/spec/support/logs/Dispatcher - 26886-49795.log +0 -25
- data/spec/support/logs/Dispatcher - 26895-21093.log +0 -15
- data/spec/support/logs/Dispatcher - 26931-30049.log +0 -17
- data/spec/support/logs/Dispatcher - 26940-34273.log +0 -21
- data/spec/support/logs/Dispatcher - 26949-30040.log +0 -13
- data/spec/support/logs/Dispatcher - 26962-8152.log +0 -17
- data/spec/support/logs/Dispatcher - 26971-53062.log +0 -21
- data/spec/support/logs/Dispatcher - 26980-7548.log +0 -13
- data/spec/support/logs/Dispatcher - 2737-20989.log +0 -19
- data/spec/support/logs/Dispatcher - 2746-5423.log +0 -21
- data/spec/support/logs/Dispatcher - 2755-53393.log +0 -15
- data/spec/support/logs/Dispatcher - 27615-41812.log +0 -19
- data/spec/support/logs/Dispatcher - 27624-43683.log +0 -21
- data/spec/support/logs/Dispatcher - 27633-11593.log +0 -15
- data/spec/support/logs/Dispatcher - 27658-12186.log +0 -21
- data/spec/support/logs/Dispatcher - 27667-15575.log +0 -25
- data/spec/support/logs/Dispatcher - 27676-17207.log +0 -15
- data/spec/support/logs/Dispatcher - 27712-2233.log +0 -17
- data/spec/support/logs/Dispatcher - 27721-3842.log +0 -21
- data/spec/support/logs/Dispatcher - 27730-22695.log +0 -13
- data/spec/support/logs/Dispatcher - 27743-8364.log +0 -21
- data/spec/support/logs/Dispatcher - 27752-6140.log +0 -25
- data/spec/support/logs/Dispatcher - 27761-25015.log +0 -15
- data/spec/support/logs/Dispatcher - 27797-9270.log +0 -17
- data/spec/support/logs/Dispatcher - 2780-58168.log +0 -21
- data/spec/support/logs/Dispatcher - 27806-48623.log +0 -21
- data/spec/support/logs/Dispatcher - 27815-58778.log +0 -13
- data/spec/support/logs/Dispatcher - 27828-29742.log +0 -17
- data/spec/support/logs/Dispatcher - 27837-46211.log +0 -21
- data/spec/support/logs/Dispatcher - 27846-16143.log +0 -13
- data/spec/support/logs/Dispatcher - 2789-29375.log +0 -25
- data/spec/support/logs/Dispatcher - 2798-10983.log +0 -15
- data/spec/support/logs/Dispatcher - 2836-2354.log +0 -17
- data/spec/support/logs/Dispatcher - 2845-65341.log +0 -21
- data/spec/support/logs/Dispatcher - 2854-18936.log +0 -13
- data/spec/support/logs/Dispatcher - 2867-51979.log +0 -21
- data/spec/support/logs/Dispatcher - 2876-21086.log +0 -25
- data/spec/support/logs/Dispatcher - 2887-17393.log +0 -15
- data/spec/support/logs/Dispatcher - 2930-37394.log +0 -17
- data/spec/support/logs/Dispatcher - 2943-46737.log +0 -21
- data/spec/support/logs/Dispatcher - 2956-37866.log +0 -13
- data/spec/support/logs/Dispatcher - 2976-21012.log +0 -17
- data/spec/support/logs/Dispatcher - 2990-48082.log +0 -21
- data/spec/support/logs/Dispatcher - 2999-16391.log +0 -13
- data/spec/support/logs/Instance - 2204-45164.error.log +0 -356
- data/spec/support/logs/Instance - 2475-49789.error.log +0 -356
- data/spec/support/logs/Instance - 2509-39450.error.log +0 -455
- data/spec/support/logs/Instance - 2533-5785.error.log +0 -354
- data/spec/support/logs/Instance - 2539-42941.error.log +0 -356
- data/spec/support/logs/Instance - 26178-57631.error.log +0 -324
- data/spec/support/logs/Instance - 26458-60253.error.log +0 -326
- data/spec/support/logs/Instance - 26514-44685.error.log +0 -423
- data/spec/support/logs/Instance - 26538-43093.error.log +0 -322
- data/spec/support/logs/Instance - 26544-52217.error.log +0 -328
- data/spec/support/logs/Instance - 26682-37056.error.log +0 -345
- data/spec/support/logs/Instance - 2669-56818.error.log +0 -354
- data/spec/support/logs/Instance - 27547-3928.error.log +0 -309
- data/spec/support/servers/arachni/element/capabilities/auditable/rdiff.rb +0 -162
- data/spec/support/servers/arachni/element/capabilities/auditable/timeout.rb +0 -34
- data/spec/support/servers/arachni/http.rb +0 -127
- data/spec/support/servers/arachni/http_auth.rb +0 -9
- data/spec/support/servers/arachni/module/auditor.rb +0 -136
- data/spec/support/servers/arachni/rpc/server/framework_simple.rb +0 -30
- data/spec/support/servers/arachni/spider.rb +0 -234
- data/spec/support/servers/arachni/spider_https.rb +0 -58
- data/spec/support/servers/modules/audit/code_injection.rb +0 -139
- data/spec/support/servers/modules/audit/code_injection_timing.rb +0 -110
- data/spec/support/servers/modules/audit/file_inclusion.rb +0 -202
- data/spec/support/servers/modules/audit/ldapi.rb +0 -73
- data/spec/support/servers/modules/audit/os_cmd_injection.rb +0 -140
- data/spec/support/servers/modules/audit/os_cmd_injection_timing.rb +0 -103
- data/spec/support/servers/modules/audit/path_traversal.rb +0 -197
- data/spec/support/servers/modules/audit/response_splitting.rb +0 -114
- data/spec/support/servers/modules/audit/session_fixation.rb +0 -87
- data/spec/support/servers/modules/audit/source_code_disclosure.rb +0 -95
- data/spec/support/servers/modules/audit/sqli.rb +0 -118
- data/spec/support/servers/modules/audit/sqli_blind_timing.rb +0 -121
- data/spec/support/servers/modules/audit/unvalidated_redirect.rb +0 -115
- data/spec/support/servers/modules/audit/xpath.rb +0 -111
- data/spec/support/servers/modules/audit/xss.rb +0 -152
- data/spec/support/servers/modules/audit/xss_event.rb +0 -80
- data/spec/support/servers/modules/audit/xss_script_tag.rb +0 -73
- data/spec/support/servers/modules/module_server.rb +0 -14
- data/spec/support/servers/modules/recon/backdoors.rb +0 -4
- data/spec/support/servers/modules/recon/backup_files.rb +0 -28
- data/spec/support/servers/modules/recon/common_directories.rb +0 -6
- data/spec/support/servers/modules/recon/common_files.rb +0 -6
- data/spec/support/servers/modules/recon/directory_listing.rb +0 -30
- data/spec/support/servers/modules/recon/grep/emails.rb +0 -21
- data/spec/support/servers/modules/recon/grep/insecure_cookies.rb +0 -21
- data/spec/support/servers/modules/recon/grep/mixed_resource.rb +0 -83
- data/spec/support/servers/modules/recon/grep/password_autocomplete.rb +0 -33
- data/spec/support/servers/modules/recon/grep/unencrypted_password_forms.rb +0 -33
- data/spec/support/servers/modules/recon/http_put.rb +0 -7
- data/spec/support/servers/modules/recon/interesting_responses.rb +0 -5
- data/spec/support/servers/modules/recon/webdav.rb +0 -25
- data/spec/support/servers/modules/recon/x_forwarded_for_access_restriction_bypass.rb +0 -16
- data/spec/support/servers/plugins/profiler.rb +0 -82
- data/spec/support/servers/plugins/rescan.rb +0 -31
- data/spec/support/shared/module.rb +0 -162
- data/spec/support/shared/reports.rb +0 -47
@@ -6,747 +6,891 @@ describe Arachni::Framework do
|
|
6
6
|
@url = web_server_url_for( :auditor )
|
7
7
|
@f_url = web_server_url_for( :framework )
|
8
8
|
|
9
|
-
@
|
9
|
+
@options = Arachni::Options.instance
|
10
10
|
end
|
11
11
|
|
12
12
|
before( :each ) do
|
13
13
|
reset_options
|
14
|
-
@
|
15
|
-
@
|
14
|
+
@options.paths.reporters = fixtures_path + '/reporters/manager_spec/'
|
15
|
+
@options.paths.checks = fixtures_path + '/taint_check/'
|
16
16
|
|
17
17
|
@f = Arachni::Framework.new
|
18
|
+
@f.options.url = @url
|
19
|
+
end
|
20
|
+
after( :each ) do
|
21
|
+
File.delete( @snapshot ) rescue nil
|
22
|
+
|
23
|
+
@f.clean_up
|
18
24
|
@f.reset
|
19
25
|
end
|
20
|
-
after( :each ) { @f.reset }
|
21
26
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
+
subject { @f }
|
28
|
+
|
29
|
+
describe '#initialize' do
|
30
|
+
context 'when passed a block' do
|
31
|
+
it 'executes it' do
|
32
|
+
ran = false
|
33
|
+
Arachni::Framework.new do |f|
|
34
|
+
ran = true
|
35
|
+
end
|
36
|
+
|
37
|
+
ran.should be_true
|
38
|
+
end
|
39
|
+
|
40
|
+
it 'resets the framework' do
|
41
|
+
Arachni::Checks.constants.include?( :Taint ).should be_false
|
42
|
+
|
43
|
+
Arachni::Framework.new do |f|
|
44
|
+
f.checks.load_all.should == %w(taint)
|
45
|
+
Arachni::Checks.constants.include?( :Taint ).should be_true
|
46
|
+
end
|
47
|
+
|
48
|
+
Arachni::Checks.constants.include?( :Taint ).should be_false
|
49
|
+
end
|
50
|
+
|
51
|
+
context 'when an exception is raised' do
|
52
|
+
it 'raises it' do
|
53
|
+
expect { Arachni::Framework.new { |f| raise } }.to raise_error
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
describe '#version' do
|
60
|
+
it "returns #{Arachni::VERSION}" do
|
61
|
+
subject.version.should == Arachni::VERSION
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
describe '#browser_cluster' do
|
66
|
+
it "returns #{Arachni::BrowserCluster}" do
|
67
|
+
subject.browser_cluster.should be_kind_of Arachni::BrowserCluster
|
68
|
+
end
|
69
|
+
|
70
|
+
context "when #{Arachni::OptionGroups::BrowserCluster}#pool_size" do
|
71
|
+
it 'returns nil' do
|
72
|
+
subject.options.browser_cluster.pool_size = 0
|
73
|
+
subject.browser_cluster.should be_nil
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
context "when #{Arachni::OptionGroups::Scope}#dom_depth_limit" do
|
78
|
+
it 'returns nil' do
|
79
|
+
subject.options.scope.dom_depth_limit = 0
|
80
|
+
subject.browser_cluster.should be_nil
|
27
81
|
end
|
82
|
+
end
|
83
|
+
end
|
28
84
|
|
29
|
-
|
85
|
+
describe '#state' do
|
86
|
+
it "returns #{Arachni::State::Framework}" do
|
87
|
+
subject.state.should be_kind_of Arachni::State::Framework
|
30
88
|
end
|
89
|
+
end
|
31
90
|
|
32
|
-
|
33
|
-
|
91
|
+
describe '#data' do
|
92
|
+
it "returns #{Arachni::Data::Framework}" do
|
93
|
+
subject.data.should be_kind_of Arachni::Data::Framework
|
94
|
+
end
|
95
|
+
end
|
34
96
|
|
97
|
+
describe '#on_page_audit' do
|
98
|
+
it 'calls the given block before each page is audited' do
|
99
|
+
ok = false
|
35
100
|
Arachni::Framework.new do |f|
|
36
|
-
f.
|
37
|
-
|
101
|
+
f.options.url = @url
|
102
|
+
f.on_page_audit { ok = true }
|
103
|
+
|
104
|
+
f.audit_page Arachni::Page.from_url( @url + '/link' )
|
38
105
|
end
|
106
|
+
ok.should be_true
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
describe '#after_page_audit' do
|
111
|
+
it 'calls the given block before each page is audited' do
|
112
|
+
ok = false
|
113
|
+
Arachni::Framework.new do |f|
|
114
|
+
f.options.url = @url
|
115
|
+
f.after_page_audit { ok = true }
|
39
116
|
|
40
|
-
|
117
|
+
f.audit_page Arachni::Page.from_url( @url + '/link' )
|
118
|
+
end
|
119
|
+
ok.should be_true
|
41
120
|
end
|
42
121
|
end
|
43
122
|
|
44
123
|
context 'when unable to get a response for the given URL' do
|
45
124
|
context 'due to a network error' do
|
46
125
|
it 'returns an empty sitemap and have failures' do
|
47
|
-
@
|
48
|
-
@
|
126
|
+
@options.url = 'http://blahaha'
|
127
|
+
@options.scope.restrict_paths = [@options.url]
|
49
128
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
@f.failures.should be_any
|
129
|
+
subject.checks.load :taint
|
130
|
+
subject.run
|
131
|
+
subject.failures.should be_any
|
54
132
|
end
|
55
133
|
end
|
56
134
|
|
57
135
|
context 'due to a server error' do
|
58
136
|
it 'returns an empty sitemap and have failures' do
|
59
|
-
@
|
60
|
-
@
|
137
|
+
@options.url = @f_url + '/fail'
|
138
|
+
@options.scope.restrict_paths = [@options.url]
|
61
139
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
@f.failures.should be_any
|
140
|
+
subject.checks.load :taint
|
141
|
+
subject.run
|
142
|
+
subject.failures.should be_any
|
66
143
|
end
|
67
144
|
end
|
68
145
|
|
69
146
|
it "retries #{Arachni::Framework::AUDIT_PAGE_MAX_TRIES} times" do
|
70
|
-
@
|
71
|
-
@
|
147
|
+
@options.url = @f_url + '/fail_4_times'
|
148
|
+
@options.scope.restrict_paths = [@options.url]
|
72
149
|
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
@f.failures.should be_empty
|
150
|
+
subject.checks.load :taint
|
151
|
+
subject.run
|
152
|
+
subject.failures.should be_empty
|
77
153
|
end
|
78
154
|
end
|
79
155
|
|
80
156
|
describe '#failures' do
|
81
157
|
context 'when there are no failed requests' do
|
82
158
|
it 'returns an empty array' do
|
83
|
-
@
|
84
|
-
@
|
159
|
+
@options.url = @f_url
|
160
|
+
@options.scope.restrict_paths = [@options.url]
|
85
161
|
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
@f.failures.should be_empty
|
162
|
+
subject.checks.load :taint
|
163
|
+
subject.run
|
164
|
+
subject.failures.should be_empty
|
90
165
|
end
|
91
166
|
end
|
92
167
|
context 'when there are failed requests' do
|
93
168
|
it 'returns an array containing the failed URLs' do
|
94
|
-
@
|
95
|
-
@
|
169
|
+
@options.url = @f_url + '/fail'
|
170
|
+
@options.scope.restrict_paths = [@options.url]
|
96
171
|
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
@f.failures.should be_any
|
172
|
+
subject.checks.load :taint
|
173
|
+
subject.run
|
174
|
+
subject.failures.should be_any
|
101
175
|
end
|
102
176
|
end
|
103
177
|
end
|
104
178
|
|
105
|
-
describe '#
|
106
|
-
it
|
107
|
-
|
179
|
+
describe '#options' do
|
180
|
+
it "provides access to #{Arachni::Options}" do
|
181
|
+
subject.options.should be_kind_of Arachni::Options
|
108
182
|
end
|
109
183
|
|
110
|
-
describe
|
111
|
-
it 'excludes binary pages from the
|
112
|
-
|
184
|
+
describe "#{Arachni::OptionGroups::Scope}#exclude_binaries" do
|
185
|
+
it 'excludes binary pages from the scan' do
|
186
|
+
audited = []
|
187
|
+
Arachni::Framework.new do |f|
|
188
|
+
f.options.url = @url
|
189
|
+
f.options.scope.restrict_paths << @url + '/binary'
|
190
|
+
f.options.audit.elements :links, :forms, :cookies
|
191
|
+
f.checks.load :taint
|
192
|
+
|
193
|
+
f.on_page_audit { |p| audited << p.url }
|
194
|
+
f.run
|
195
|
+
end
|
196
|
+
audited.sort.should == [@url + '/binary'].sort
|
113
197
|
|
114
|
-
|
115
|
-
|
116
|
-
|
198
|
+
audited = []
|
199
|
+
Arachni::Framework.new do |f|
|
200
|
+
f.options.url = @url
|
201
|
+
f.options.scope.restrict_paths << @url + '/binary'
|
202
|
+
f.options.scope.exclude_binaries = true
|
203
|
+
f.checks.load :taint
|
117
204
|
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
205
|
+
f.on_page_audit { |p| audited << p.url }
|
206
|
+
f.run
|
207
|
+
end
|
208
|
+
audited.should be_empty
|
209
|
+
end
|
210
|
+
end
|
123
211
|
|
124
|
-
|
125
|
-
|
126
|
-
|
212
|
+
describe "#{Arachni::OptionGroups::Scope}#restrict_paths" do
|
213
|
+
it 'serves as a replacement to crawling' do
|
214
|
+
Arachni::Framework.new do |f|
|
215
|
+
f.options.url = "#{@url}/elem_combo"
|
216
|
+
f.options.scope.restrict_paths = %w(/log_remote_file_if_exists/true)
|
217
|
+
f.options.audit.elements :links, :forms, :cookies
|
218
|
+
f.checks.load :taint
|
127
219
|
|
128
|
-
|
129
|
-
f.on_audit_page { ok = false }
|
220
|
+
f.run
|
130
221
|
|
131
|
-
|
132
|
-
|
133
|
-
|
222
|
+
sitemap = f.report.sitemap.map { |u, _| u.split( '?' ).first }
|
223
|
+
sitemap.sort.uniq.should == f.options.scope.restrict_paths.
|
224
|
+
map { |p| f.to_absolute( p ) }.sort
|
225
|
+
end
|
134
226
|
end
|
135
227
|
end
|
136
|
-
|
137
|
-
it 'serves as a replacement to crawling' do
|
138
|
-
f = Arachni::Framework.new
|
139
|
-
f.opts.url = @url
|
140
|
-
f.opts.restrict_paths = %w(/elem_combo /log_remote_file_if_exists/true)
|
141
|
-
f.opts.audit :links, :forms, :cookies
|
142
|
-
f.modules.load :taint
|
228
|
+
end
|
143
229
|
|
144
|
-
|
230
|
+
describe '#sitemap' do
|
231
|
+
it 'returns a hash with covered URLs and HTTP status codes' do
|
232
|
+
Arachni::Framework.new do |f|
|
233
|
+
f.options.url = "#{@url}/"
|
234
|
+
f.options.audit.elements :links, :forms, :cookies
|
235
|
+
f.checks.load :taint
|
145
236
|
|
146
|
-
|
147
|
-
sitemap.
|
148
|
-
f.modules.clear
|
237
|
+
f.run
|
238
|
+
f.sitemap.should == { "#{@url}/" => 200 }
|
149
239
|
end
|
150
240
|
end
|
151
241
|
end
|
152
242
|
|
153
|
-
describe '#
|
154
|
-
it 'provides access to the
|
155
|
-
|
156
|
-
|
243
|
+
describe '#reporters' do
|
244
|
+
it 'provides access to the reporter manager' do
|
245
|
+
subject.reporters.is_a?( Arachni::Reporter::Manager ).should be_true
|
246
|
+
subject.reporters.available.sort.should == %w(afr foo).sort
|
157
247
|
end
|
158
248
|
end
|
159
249
|
|
160
|
-
describe '#
|
161
|
-
it 'provides access to the
|
162
|
-
|
163
|
-
|
250
|
+
describe '#checks' do
|
251
|
+
it 'provides access to the check manager' do
|
252
|
+
subject.checks.is_a?( Arachni::Check::Manager ).should be_true
|
253
|
+
subject.checks.available.should == %w(taint)
|
164
254
|
end
|
165
255
|
end
|
166
256
|
|
167
257
|
describe '#plugins' do
|
168
258
|
it 'provides access to the plugin manager' do
|
169
|
-
|
170
|
-
|
171
|
-
%w(wait bad with_options distributable loop default
|
259
|
+
subject.plugins.is_a?( Arachni::Plugin::Manager ).should be_true
|
260
|
+
subject.plugins.available.sort.should ==
|
261
|
+
%w(wait bad with_options distributable loop default suspendable).sort
|
172
262
|
end
|
173
263
|
end
|
174
264
|
|
175
265
|
describe '#http' do
|
176
266
|
it 'provides access to the HTTP interface' do
|
177
|
-
|
267
|
+
subject.http.is_a?( Arachni::HTTP::Client ).should be_true
|
178
268
|
end
|
179
269
|
end
|
180
270
|
|
181
|
-
describe '#
|
182
|
-
it
|
183
|
-
|
271
|
+
describe '#scanning?' do
|
272
|
+
it "delegates to #{Arachni::State::Framework}#scanning?" do
|
273
|
+
subject.state.stub(:scanning?) { :stuff }
|
274
|
+
subject.scanning?.should == :stuff
|
184
275
|
end
|
185
276
|
end
|
186
277
|
|
187
|
-
describe '#
|
278
|
+
describe '#paused?' do
|
279
|
+
it "delegates to #{Arachni::State::Framework}#paused?" do
|
280
|
+
subject.state.stub(:paused?) { :stuff }
|
281
|
+
subject.paused?.should == :stuff
|
282
|
+
end
|
283
|
+
end
|
188
284
|
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
285
|
+
describe '#run' do
|
286
|
+
it 'follows redirects' do
|
287
|
+
subject.options.url = @f_url + '/redirect'
|
288
|
+
subject.run
|
289
|
+
subject.sitemap.should == {
|
290
|
+
"#{@f_url}/redirect" => 302,
|
291
|
+
"#{@f_url}/redirected" => 200
|
292
|
+
}
|
293
|
+
end
|
195
294
|
|
196
|
-
|
295
|
+
it 'performs the scan' do
|
296
|
+
subject.options.url = @url + '/elem_combo'
|
297
|
+
subject.options.audit.elements :links, :forms, :cookies
|
298
|
+
subject.checks.load :taint
|
299
|
+
subject.plugins.load :wait
|
197
300
|
|
198
|
-
|
199
|
-
|
301
|
+
subject.run
|
302
|
+
subject.report.issues.size.should == 3
|
200
303
|
|
201
|
-
|
202
|
-
|
304
|
+
subject.report.plugins[:wait][:results].should == { 'stuff' => true }
|
305
|
+
end
|
203
306
|
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
}
|
210
|
-
}
|
307
|
+
it 'sets #status to scanning' do
|
308
|
+
described_class.new do |f|
|
309
|
+
f.options.url = @url + '/elem_combo'
|
310
|
+
f.options.audit.elements :links, :forms, :cookies
|
311
|
+
f.checks.load :taint
|
211
312
|
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
sleep( 0.01 ) while @f.status == 'auditing'
|
218
|
-
}
|
219
|
-
rescue TimeoutError
|
220
|
-
raised = true
|
313
|
+
t = Thread.new { f.run }
|
314
|
+
Timeout.timeout( 5 ) do
|
315
|
+
sleep 0.1 while f.status != :scanning
|
316
|
+
end
|
317
|
+
t.join
|
221
318
|
end
|
319
|
+
end
|
222
320
|
|
223
|
-
|
224
|
-
|
225
|
-
t.join
|
226
|
-
called.should be_true
|
321
|
+
it 'handles heavy load' do
|
322
|
+
@options.paths.checks = fixtures_path + '/taint_check/'
|
227
323
|
|
228
|
-
|
229
|
-
|
324
|
+
Arachni::Framework.new do |f|
|
325
|
+
f.options.url = web_server_url_for :framework_multi
|
326
|
+
f.options.audit.elements :links
|
230
327
|
|
231
|
-
|
328
|
+
f.checks.load :taint
|
232
329
|
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
File.delete( 'afr' )
|
330
|
+
f.run
|
331
|
+
f.report.issues.size.should == 500
|
332
|
+
end
|
237
333
|
end
|
238
334
|
|
239
|
-
it 'handles
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
f.opts.url = web_server_url_for :framework_hpg
|
244
|
-
f.opts.audit :links
|
335
|
+
it 'handles pages with JavaScript code' do
|
336
|
+
Arachni::Framework.new do |f|
|
337
|
+
f.options.url = @url + '/with_javascript'
|
338
|
+
f.options.audit.elements :links, :forms, :cookies
|
245
339
|
|
246
|
-
|
340
|
+
f.checks.load :taint
|
341
|
+
f.run
|
247
342
|
|
248
|
-
|
249
|
-
|
250
|
-
|
343
|
+
f.report.issues.
|
344
|
+
map { |i| i.variations.first.vector.affected_input_name }.
|
345
|
+
uniq.sort.should == %w(link_input form_input cookie_input).sort
|
346
|
+
end
|
251
347
|
end
|
252
348
|
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
f = Arachni::Framework.new
|
349
|
+
it 'handles AJAX' do
|
350
|
+
Arachni::Framework.new do |f|
|
351
|
+
f.options.url = @url + '/with_ajax'
|
352
|
+
f.options.audit.elements :links, :forms, :cookies
|
258
353
|
|
259
|
-
|
260
|
-
|
354
|
+
f.checks.load :taint
|
355
|
+
f.run
|
261
356
|
|
262
|
-
|
263
|
-
|
264
|
-
|
357
|
+
f.report.issues.
|
358
|
+
map { |i| i.variations.first.vector.affected_input_name }.
|
359
|
+
uniq.sort.should == %w(link_input form_input cookie_taint).sort
|
360
|
+
end
|
361
|
+
end
|
362
|
+
|
363
|
+
context 'when done' do
|
364
|
+
it 'sets #status to :done' do
|
365
|
+
described_class.new do |f|
|
366
|
+
f.options.url = @url + '/elem_combo'
|
367
|
+
f.options.audit.elements :links, :forms, :cookies
|
368
|
+
f.checks.load :taint
|
265
369
|
|
266
370
|
f.run
|
267
|
-
f.
|
268
|
-
f.modules.clear
|
371
|
+
f.status.should == :done
|
269
372
|
end
|
270
373
|
end
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
374
|
+
end
|
375
|
+
|
376
|
+
context 'when it has log-in capabilities and gets logged out' do
|
377
|
+
it 'logs-in again before continuing with the audit' do
|
378
|
+
Arachni::Framework.new do |f|
|
379
|
+
url = web_server_url_for( :framework ) + '/'
|
380
|
+
f.options.url = "#{url}/congrats"
|
275
381
|
|
276
|
-
f.
|
277
|
-
f.
|
382
|
+
f.options.audit.elements :links, :forms
|
383
|
+
f.checks.load_all
|
278
384
|
|
279
|
-
|
280
|
-
|
281
|
-
|
385
|
+
f.session.configure(
|
386
|
+
url: url,
|
387
|
+
inputs: {
|
388
|
+
username: 'john',
|
389
|
+
password: 'doe'
|
390
|
+
}
|
391
|
+
)
|
392
|
+
|
393
|
+
f.options.session.check_url = url
|
394
|
+
f.options.session.check_pattern = 'logged-in user'
|
282
395
|
|
283
396
|
f.run
|
284
|
-
f.
|
285
|
-
f.modules.clear
|
397
|
+
f.report.issues.size.should == 1
|
286
398
|
end
|
287
399
|
end
|
288
400
|
end
|
401
|
+
end
|
289
402
|
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
it 'runs modules that audit links' do
|
294
|
-
@opts.dir['modules'] = fixtures_path + '/run_mod/'
|
295
|
-
f = Arachni::Framework.new
|
403
|
+
describe '#abort' do
|
404
|
+
it 'aborts the system' do
|
405
|
+
@options.paths.checks = fixtures_path + '/taint_check/'
|
296
406
|
|
297
|
-
|
298
|
-
|
407
|
+
described_class.new do |f|
|
408
|
+
f.options.url = web_server_url_for :framework_multi
|
409
|
+
f.options.audit.elements :links
|
299
410
|
|
300
|
-
|
301
|
-
|
302
|
-
f.push_to_page_queue( p )
|
411
|
+
f.plugins.load :wait
|
412
|
+
f.checks.load :taint
|
303
413
|
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
end
|
414
|
+
t = Thread.new do
|
415
|
+
f.run
|
416
|
+
end
|
308
417
|
|
309
|
-
|
310
|
-
@opts.dir['modules'] = fixtures_path + '/run_mod/'
|
311
|
-
f = Arachni::Framework.new
|
418
|
+
sleep 0.1 while Arachni::Data.issues.size < 2
|
312
419
|
|
313
|
-
|
314
|
-
|
420
|
+
f.abort
|
421
|
+
t.join
|
315
422
|
|
316
|
-
|
317
|
-
|
318
|
-
|
423
|
+
Arachni::Data.issues.size.should < 500
|
424
|
+
end
|
425
|
+
end
|
319
426
|
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
427
|
+
it 'sets #status to :aborted' do
|
428
|
+
described_class.new do |f|
|
429
|
+
f.options.url = web_server_url_for :framework_multi
|
430
|
+
f.options.audit.elements :links
|
431
|
+
f.checks.load :taint
|
432
|
+
|
433
|
+
t = Thread.new do
|
434
|
+
f.run
|
435
|
+
end
|
436
|
+
sleep 0.1 while f.status != :scanning
|
324
437
|
|
325
|
-
|
326
|
-
|
327
|
-
f = Arachni::Framework.new
|
438
|
+
f.abort
|
439
|
+
f.status.should == :aborted
|
328
440
|
|
329
|
-
|
330
|
-
|
441
|
+
t.join
|
442
|
+
f.status.should == :aborted
|
443
|
+
end
|
444
|
+
end
|
445
|
+
end
|
331
446
|
|
332
|
-
|
333
|
-
|
334
|
-
|
447
|
+
describe '#suspend' do
|
448
|
+
it 'suspends the system' do
|
449
|
+
@options.paths.checks = fixtures_path + '/taint_check/'
|
335
450
|
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
451
|
+
described_class.new do |f|
|
452
|
+
f.options.url = web_server_url_for :framework_multi
|
453
|
+
f.options.audit.elements :links
|
454
|
+
|
455
|
+
f.plugins.load :wait
|
456
|
+
f.checks.load :taint
|
457
|
+
|
458
|
+
t = Thread.new do
|
459
|
+
f.run
|
340
460
|
end
|
341
|
-
end
|
342
461
|
|
343
|
-
|
344
|
-
context 'and the page contains links' do
|
345
|
-
it 'skips modules that audit links' do
|
346
|
-
@opts.dir['modules'] = fixtures_path + '/run_mod/'
|
347
|
-
f = Arachni::Framework.new
|
462
|
+
sleep 0.1 while Arachni::Data.issues.size < 2
|
348
463
|
|
349
|
-
|
350
|
-
|
464
|
+
@snapshot = f.suspend
|
465
|
+
t.join
|
351
466
|
|
352
|
-
|
353
|
-
|
354
|
-
f.push_to_page_queue( p )
|
467
|
+
Arachni::Data.issues.size.should < 500
|
468
|
+
end
|
355
469
|
|
356
|
-
|
357
|
-
|
358
|
-
f.modules.clear
|
359
|
-
end
|
470
|
+
Arachni::Snapshot.load( @snapshot ).should be_true
|
471
|
+
end
|
360
472
|
|
361
|
-
|
362
|
-
|
363
|
-
|
473
|
+
it 'sets #status to :suspended' do
|
474
|
+
described_class.new do |f|
|
475
|
+
f.options.url = web_server_url_for :framework_multi
|
476
|
+
f.options.audit.elements :links
|
477
|
+
f.checks.load :taint
|
364
478
|
|
365
|
-
|
366
|
-
|
479
|
+
t = Thread.new do
|
480
|
+
f.run
|
481
|
+
end
|
482
|
+
sleep 0.1 while f.status != :scanning
|
367
483
|
|
368
|
-
|
369
|
-
|
370
|
-
f.push_to_page_queue( p )
|
484
|
+
@snapshot = f.suspend
|
485
|
+
f.status.should == :suspended
|
371
486
|
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
487
|
+
t.join
|
488
|
+
f.status.should == :suspended
|
489
|
+
end
|
490
|
+
end
|
376
491
|
|
377
|
-
|
378
|
-
|
379
|
-
|
492
|
+
it 'suspends plugins' do
|
493
|
+
Arachni::Options.plugins['suspendable'] = {
|
494
|
+
'my_option' => 'my value'
|
495
|
+
}
|
380
496
|
|
381
|
-
|
382
|
-
|
497
|
+
described_class.new do |f|
|
498
|
+
f.options.url = web_server_url_for :framework_multi
|
499
|
+
f.options.audit.elements :links
|
383
500
|
|
384
|
-
|
385
|
-
|
386
|
-
f.push_to_page_queue( p )
|
501
|
+
f.checks.load :taint
|
502
|
+
f.plugins.load :suspendable
|
387
503
|
|
388
|
-
|
389
|
-
|
390
|
-
f.modules.clear
|
391
|
-
end
|
504
|
+
t = Thread.new do
|
505
|
+
f.run
|
392
506
|
end
|
393
|
-
end
|
394
507
|
|
508
|
+
sleep 0.1 while f.status != :scanning
|
509
|
+
|
510
|
+
f.suspend
|
511
|
+
t.join
|
512
|
+
|
513
|
+
Arachni::State.plugins.runtime[:suspendable][:data].should == 1
|
514
|
+
end
|
395
515
|
end
|
396
516
|
|
397
|
-
|
398
|
-
context 'enabled' do
|
399
|
-
context 'and the page contains forms' do
|
400
|
-
it 'runs modules that audit forms' do
|
401
|
-
@opts.dir['modules'] = fixtures_path + '/run_mod/'
|
402
|
-
f = Arachni::Framework.new
|
517
|
+
it 'waits for the BrowserCluster jobs to finish'
|
403
518
|
|
404
|
-
|
405
|
-
|
519
|
+
context "when #{Arachni::OptionGroups::Snapshot}#save_path" do
|
520
|
+
context 'is a directory' do
|
521
|
+
it 'stores the snapshot under it' do
|
522
|
+
@options.paths.checks = fixtures_path + '/taint_check/'
|
523
|
+
@options.snapshot.save_path = Dir.tmpdir
|
406
524
|
|
407
|
-
|
408
|
-
|
409
|
-
f.
|
525
|
+
described_class.new do |f|
|
526
|
+
f.options.url = web_server_url_for :framework_multi
|
527
|
+
f.options.audit.elements :links
|
410
528
|
|
411
|
-
f.
|
412
|
-
f.
|
413
|
-
f.modules.clear
|
414
|
-
end
|
529
|
+
f.plugins.load :wait
|
530
|
+
f.checks.load :taint
|
415
531
|
|
416
|
-
|
417
|
-
|
418
|
-
|
532
|
+
t = Thread.new do
|
533
|
+
f.run
|
534
|
+
end
|
419
535
|
|
420
|
-
|
421
|
-
f.modules.load %w(path server)
|
536
|
+
sleep 0.1 while Arachni::Data.issues.size < 2
|
422
537
|
|
423
|
-
|
424
|
-
|
425
|
-
f.push_to_page_queue( p )
|
538
|
+
@snapshot = f.suspend
|
539
|
+
t.join
|
426
540
|
|
427
|
-
|
428
|
-
f.auditstore.issues.size.should == 2
|
429
|
-
f.modules.clear
|
541
|
+
Arachni::Data.issues.size.should < 500
|
430
542
|
end
|
431
543
|
|
432
|
-
|
433
|
-
|
434
|
-
|
544
|
+
File.dirname( @snapshot ).should == Dir.tmpdir
|
545
|
+
Arachni::Snapshot.load( @snapshot ).should be_true
|
546
|
+
end
|
547
|
+
end
|
435
548
|
|
436
|
-
|
437
|
-
|
549
|
+
context 'is a file path' do
|
550
|
+
it 'stores the snapshot there' do
|
551
|
+
@options.paths.checks = fixtures_path + '/taint_check/'
|
552
|
+
@options.snapshot.save_path = "#{Dir.tmpdir}/snapshot"
|
438
553
|
|
439
|
-
|
440
|
-
|
441
|
-
f.
|
554
|
+
described_class.new do |f|
|
555
|
+
f.options.url = web_server_url_for :framework_multi
|
556
|
+
f.options.audit.elements :links
|
442
557
|
|
443
|
-
f.
|
444
|
-
f.
|
445
|
-
|
558
|
+
f.plugins.load :wait
|
559
|
+
f.checks.load :taint
|
560
|
+
|
561
|
+
t = Thread.new do
|
562
|
+
f.run
|
563
|
+
end
|
564
|
+
|
565
|
+
sleep 0.1 while Arachni::Data.issues.size < 2
|
566
|
+
|
567
|
+
@snapshot = f.suspend
|
568
|
+
t.join
|
569
|
+
|
570
|
+
Arachni::Data.issues.size.should < 500
|
446
571
|
end
|
572
|
+
|
573
|
+
@snapshot.should == "#{Dir.tmpdir}/snapshot"
|
574
|
+
Arachni::Snapshot.load( @snapshot ).should be_true
|
447
575
|
end
|
448
576
|
end
|
577
|
+
end
|
578
|
+
end
|
449
579
|
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
@opts.dir['modules'] = fixtures_path + '/run_mod/'
|
454
|
-
f = Arachni::Framework.new
|
455
|
-
|
456
|
-
f.opts.dont_audit :forms
|
457
|
-
f.modules.load %w(links forms cookies headers flch)
|
580
|
+
describe '#restore' do
|
581
|
+
it 'restores a suspended scan' do
|
582
|
+
@options.paths.checks = fixtures_path + '/taint_check/'
|
458
583
|
|
459
|
-
|
460
|
-
|
461
|
-
|
584
|
+
logged_issues = 0
|
585
|
+
described_class.new do |f|
|
586
|
+
f.options.url = web_server_url_for :framework_multi
|
587
|
+
f.options.audit.elements :links
|
462
588
|
|
463
|
-
|
464
|
-
|
465
|
-
f.modules.clear
|
466
|
-
end
|
589
|
+
f.plugins.load :wait
|
590
|
+
f.checks.load :taint
|
467
591
|
|
468
|
-
|
469
|
-
|
470
|
-
|
592
|
+
Arachni::Data.issues.on_new do
|
593
|
+
logged_issues += 1
|
594
|
+
end
|
471
595
|
|
472
|
-
|
473
|
-
|
596
|
+
t = Thread.new do
|
597
|
+
f.run
|
598
|
+
end
|
474
599
|
|
475
|
-
|
476
|
-
p = Arachni::Page.new( url: 'http://test', forms: [form] )
|
477
|
-
f.push_to_page_queue( p )
|
600
|
+
sleep 0.1 while logged_issues < 200
|
478
601
|
|
479
|
-
|
480
|
-
|
481
|
-
f.modules.clear
|
482
|
-
end
|
602
|
+
@snapshot = f.suspend
|
603
|
+
t.join
|
483
604
|
|
484
|
-
|
485
|
-
|
486
|
-
f = Arachni::Framework.new
|
605
|
+
logged_issues.should < 500
|
606
|
+
end
|
487
607
|
|
488
|
-
|
489
|
-
|
608
|
+
reset_options
|
609
|
+
@options.paths.checks = fixtures_path + '/taint_check/'
|
490
610
|
|
491
|
-
|
492
|
-
|
493
|
-
f.push_to_page_queue( p )
|
611
|
+
described_class.new do |f|
|
612
|
+
f.restore @snapshot
|
494
613
|
|
495
|
-
|
496
|
-
|
497
|
-
f.modules.clear
|
498
|
-
end
|
614
|
+
Arachni::Data.issues.on_new do
|
615
|
+
logged_issues += 1
|
499
616
|
end
|
500
|
-
|
617
|
+
f.run
|
618
|
+
|
619
|
+
# logged_issues.should == 500
|
620
|
+
Arachni::Data.issues.size.should == 500
|
501
621
|
|
622
|
+
f.report.plugins[:wait][:results].should == { 'stuff' => true }
|
623
|
+
end
|
502
624
|
end
|
503
625
|
|
504
|
-
|
505
|
-
|
506
|
-
context 'and the page contains cookies' do
|
507
|
-
it 'runs modules that audit cookies' do
|
508
|
-
@opts.dir['modules'] = fixtures_path + '/run_mod/'
|
509
|
-
f = Arachni::Framework.new
|
626
|
+
it 'restores options' do
|
627
|
+
options_hash = nil
|
510
628
|
|
511
|
-
|
512
|
-
|
629
|
+
described_class.new do |f|
|
630
|
+
f.options.url = @url + '/with_ajax'
|
631
|
+
f.options.audit.elements :links, :forms, :cookies
|
632
|
+
f.options.datastore.my_custom_option = 'my custom value'
|
633
|
+
options_hash = f.options.update( f.options.to_rpc_data ).to_h.deep_clone
|
513
634
|
|
514
|
-
|
515
|
-
p = Arachni::Page.new( url: 'http://test', cookies: [cookie] )
|
516
|
-
f.push_to_page_queue( p )
|
635
|
+
f.checks.load :taint
|
517
636
|
|
518
|
-
|
519
|
-
f.auditstore.issues.size.should == 2
|
520
|
-
f.modules.clear
|
521
|
-
end
|
637
|
+
t = Thread.new { f.run }
|
522
638
|
|
523
|
-
|
524
|
-
|
525
|
-
f = Arachni::Framework.new
|
639
|
+
sleep 0.1 while f.browser_cluster.done?
|
640
|
+
@snapshot = f.suspend
|
526
641
|
|
527
|
-
|
528
|
-
|
642
|
+
t.join
|
643
|
+
end
|
529
644
|
|
530
|
-
|
531
|
-
|
532
|
-
|
645
|
+
described_class.restore( @snapshot ) do |f|
|
646
|
+
f.options.to_h.should == options_hash.merge( checks: ['taint'] )
|
647
|
+
f.browser_job_skip_states.should be_any
|
648
|
+
end
|
649
|
+
end
|
533
650
|
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
651
|
+
it 'restores BrowserCluster skip states' do
|
652
|
+
described_class.new do |f|
|
653
|
+
f.options.url = @url + '/with_ajax'
|
654
|
+
f.options.audit.elements :links, :forms, :cookies
|
538
655
|
|
539
|
-
|
540
|
-
@opts.dir['modules'] = fixtures_path + '/run_mod/'
|
541
|
-
f = Arachni::Framework.new
|
656
|
+
f.checks.load :taint
|
542
657
|
|
543
|
-
|
544
|
-
f.modules.load %w(nil empty)
|
658
|
+
t = Thread.new { f.run }
|
545
659
|
|
546
|
-
|
547
|
-
|
548
|
-
f.push_to_page_queue( p )
|
660
|
+
sleep 0.1 while f.browser_cluster.done?
|
661
|
+
@snapshot = f.suspend
|
549
662
|
|
550
|
-
|
551
|
-
f.auditstore.issues.size.should == 1
|
552
|
-
f.modules.clear
|
553
|
-
end
|
554
|
-
end
|
663
|
+
t.join
|
555
664
|
end
|
556
665
|
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
f = Arachni::Framework.new
|
666
|
+
described_class.restore( @snapshot ) do |f|
|
667
|
+
f.browser_job_skip_states.should be_any
|
668
|
+
end
|
669
|
+
end
|
562
670
|
|
563
|
-
|
564
|
-
|
671
|
+
it 'restores loaded checks' do
|
672
|
+
described_class.new do |f|
|
673
|
+
f.options.url = @url
|
674
|
+
f.checks.load :taint
|
565
675
|
|
566
|
-
|
567
|
-
|
568
|
-
f.push_to_page_queue( p )
|
676
|
+
t = Thread.new { f.run }
|
677
|
+
sleep 0.1 while f.status != :scanning
|
569
678
|
|
570
|
-
|
571
|
-
f.auditstore.issues.size.should == 0
|
572
|
-
f.modules.clear
|
573
|
-
end
|
679
|
+
@snapshot = f.suspend
|
574
680
|
|
575
|
-
|
576
|
-
|
577
|
-
f = Arachni::Framework.new
|
681
|
+
t.join
|
682
|
+
end
|
578
683
|
|
579
|
-
|
580
|
-
|
684
|
+
described_class.restore( @snapshot ) do |f|
|
685
|
+
f.checks.loaded.should == ['taint']
|
686
|
+
end
|
687
|
+
end
|
581
688
|
|
582
|
-
|
583
|
-
|
584
|
-
|
689
|
+
it 'restores loaded plugins' do
|
690
|
+
described_class.new do |f|
|
691
|
+
f.options.url = @url
|
692
|
+
f.plugins.load :wait
|
585
693
|
|
586
|
-
|
587
|
-
|
588
|
-
f.modules.clear
|
589
|
-
end
|
694
|
+
t = Thread.new { f.run }
|
695
|
+
sleep 0.1 while f.status != :scanning
|
590
696
|
|
591
|
-
|
592
|
-
|
593
|
-
|
697
|
+
@snapshot = f.suspend
|
698
|
+
t.join
|
699
|
+
end
|
594
700
|
|
595
|
-
|
596
|
-
|
701
|
+
described_class.restore( @snapshot ) do |f|
|
702
|
+
f.plugins.loaded.should == ['wait']
|
703
|
+
end
|
704
|
+
end
|
705
|
+
|
706
|
+
it 'restores plugin states' do
|
707
|
+
Arachni::Options.plugins['suspendable'] = {
|
708
|
+
'my_option' => 'my value'
|
709
|
+
}
|
597
710
|
|
598
|
-
|
599
|
-
|
600
|
-
|
711
|
+
described_class.new do |f|
|
712
|
+
f.options.url = web_server_url_for :framework_multi
|
713
|
+
f.options.audit.elements :links
|
601
714
|
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
715
|
+
f.checks.load :taint
|
716
|
+
f.plugins.load :suspendable
|
717
|
+
|
718
|
+
t = Thread.new do
|
719
|
+
f.run
|
606
720
|
end
|
607
|
-
end
|
608
721
|
|
609
|
-
|
722
|
+
sleep 0.1 while f.status != :scanning
|
610
723
|
|
611
|
-
|
612
|
-
|
613
|
-
context 'and the page contains headers' do
|
614
|
-
it 'runs modules that audit headers' do
|
615
|
-
@opts.dir['modules'] = fixtures_path + '/run_mod/'
|
616
|
-
f = Arachni::Framework.new
|
724
|
+
@snapshot = f.suspend
|
725
|
+
t.join
|
617
726
|
|
618
|
-
|
619
|
-
|
727
|
+
Arachni::State.plugins.runtime[:suspendable][:data].should == 1
|
728
|
+
end
|
620
729
|
|
621
|
-
|
622
|
-
|
623
|
-
|
730
|
+
described_class.restore( @snapshot ) do |f|
|
731
|
+
t = Thread.new do
|
732
|
+
f.run
|
733
|
+
end
|
624
734
|
|
625
|
-
|
626
|
-
f.auditstore.issues.size.should == 2
|
627
|
-
f.modules.clear
|
628
|
-
end
|
735
|
+
sleep 0.1 while f.status != :scanning
|
629
736
|
|
630
|
-
|
631
|
-
@opts.dir['modules'] = fixtures_path + '/run_mod/'
|
632
|
-
f = Arachni::Framework.new
|
737
|
+
f.plugins.jobs[:suspendable][:instance].counter.should == 2
|
633
738
|
|
634
|
-
|
635
|
-
|
739
|
+
f.abort
|
740
|
+
t.join
|
741
|
+
end
|
742
|
+
end
|
743
|
+
end
|
636
744
|
|
637
|
-
|
638
|
-
|
639
|
-
|
745
|
+
describe '#pause' do
|
746
|
+
it 'pauses the system' do
|
747
|
+
described_class.new do |f|
|
748
|
+
f.options.url = @url + '/elem_combo'
|
749
|
+
f.options.audit.elements :links, :forms, :cookies
|
750
|
+
f.checks.load :taint
|
640
751
|
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
end
|
752
|
+
t = Thread.new do
|
753
|
+
f.run
|
754
|
+
end
|
645
755
|
|
646
|
-
|
647
|
-
@opts.dir['modules'] = fixtures_path + '/run_mod/'
|
648
|
-
f = Arachni::Framework.new
|
756
|
+
f.pause
|
649
757
|
|
650
|
-
|
651
|
-
f.modules.load %w(nil empty)
|
758
|
+
sleep 10
|
652
759
|
|
653
|
-
|
654
|
-
|
655
|
-
|
760
|
+
f.running?.should be_true
|
761
|
+
t.kill
|
762
|
+
end
|
763
|
+
end
|
656
764
|
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
765
|
+
it 'returns an Integer request ID' do
|
766
|
+
described_class.new do |f|
|
767
|
+
f.options.url = @url + '/elem_combo'
|
768
|
+
f.options.audit.elements :links, :forms, :cookies
|
769
|
+
f.checks.load :taint
|
770
|
+
|
771
|
+
t = Thread.new do
|
772
|
+
f.run
|
661
773
|
end
|
774
|
+
|
775
|
+
f.pause.should be_kind_of Integer
|
776
|
+
|
777
|
+
sleep 10
|
778
|
+
|
779
|
+
f.running?.should be_true
|
780
|
+
t.kill
|
662
781
|
end
|
782
|
+
end
|
663
783
|
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
784
|
+
it 'sets #status to :paused' do
|
785
|
+
described_class.new do |f|
|
786
|
+
f.options.url = @url + '/elem_combo'
|
787
|
+
f.options.audit.elements :links, :forms, :cookies
|
788
|
+
f.checks.load :taint
|
669
789
|
|
670
|
-
|
671
|
-
|
790
|
+
t = Thread.new do
|
791
|
+
f.run
|
792
|
+
end
|
793
|
+
sleep 0.1 while f.status != :scanning
|
672
794
|
|
673
|
-
|
674
|
-
|
675
|
-
f.push_to_page_queue( p )
|
795
|
+
f.pause
|
796
|
+
f.status.should == :paused
|
676
797
|
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
798
|
+
t.kill
|
799
|
+
end
|
800
|
+
end
|
801
|
+
end
|
802
|
+
|
803
|
+
describe '#resume' do
|
804
|
+
it 'resumes the system' do
|
805
|
+
described_class.new do |f|
|
806
|
+
f.options.url = @url + '/elem_combo'
|
807
|
+
f.options.audit.elements :links, :forms, :cookies
|
808
|
+
f.checks.load :taint
|
681
809
|
|
682
|
-
|
683
|
-
|
684
|
-
|
810
|
+
t = Thread.new do
|
811
|
+
f.run
|
812
|
+
end
|
685
813
|
|
686
|
-
|
687
|
-
f.modules.load %w(path server)
|
814
|
+
id = f.pause
|
688
815
|
|
689
|
-
|
690
|
-
p = Arachni::Page.new( url: 'http://test', headers: [header] )
|
691
|
-
f.push_to_page_queue( p )
|
816
|
+
sleep 10
|
692
817
|
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
818
|
+
f.running?.should be_true
|
819
|
+
f.resume id
|
820
|
+
t.join
|
821
|
+
end
|
822
|
+
end
|
697
823
|
|
698
|
-
|
699
|
-
|
700
|
-
|
824
|
+
it 'sets #status to scanning' do
|
825
|
+
described_class.new do |f|
|
826
|
+
f.options.url = @url + '/elem_combo'
|
827
|
+
f.options.audit.elements :links, :forms, :cookies
|
828
|
+
f.checks.load :taint
|
701
829
|
|
702
|
-
|
703
|
-
|
830
|
+
t = Thread.new do
|
831
|
+
f.run
|
832
|
+
end
|
704
833
|
|
705
|
-
|
706
|
-
|
707
|
-
f.push_to_page_queue( p )
|
834
|
+
id = f.pause
|
835
|
+
f.status.should == :paused
|
708
836
|
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
end
|
837
|
+
f.resume id
|
838
|
+
Timeout.timeout( 5 ) do
|
839
|
+
sleep 0.1 while f.status != :scanning
|
713
840
|
end
|
841
|
+
t.join
|
714
842
|
end
|
715
|
-
|
716
843
|
end
|
844
|
+
end
|
717
845
|
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
url =
|
722
|
-
f.
|
846
|
+
describe '#clean_up' do
|
847
|
+
it 'stops the #plugins' do
|
848
|
+
described_class.new do |f|
|
849
|
+
f.options.url = @url + '/elem_combo'
|
850
|
+
f.plugins.load :wait
|
723
851
|
|
724
|
-
f.
|
725
|
-
f.
|
852
|
+
f.plugins.run
|
853
|
+
f.clean_up
|
854
|
+
f.plugins.jobs.should be_empty
|
855
|
+
end
|
856
|
+
end
|
726
857
|
|
727
|
-
|
728
|
-
|
729
|
-
|
858
|
+
it 'sets the status to cleanup' do
|
859
|
+
described_class.new do |f|
|
860
|
+
f.options.url = @url + '/elem_combo'
|
730
861
|
|
731
|
-
|
732
|
-
|
862
|
+
f.clean_up
|
863
|
+
f.status.should == :cleanup
|
864
|
+
end
|
865
|
+
end
|
733
866
|
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
867
|
+
it 'clears the page queue' do
|
868
|
+
described_class.new do |f|
|
869
|
+
f.options.url = @url + '/elem_combo'
|
870
|
+
f.push_to_page_queue Arachni::Page.from_url( f.options.url )
|
738
871
|
|
739
|
-
|
740
|
-
|
872
|
+
f.data.page_queue.should_not be_empty
|
873
|
+
f.clean_up
|
874
|
+
f.data.page_queue.should be_empty
|
875
|
+
end
|
876
|
+
end
|
741
877
|
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
878
|
+
it 'clears the URL queue' do
|
879
|
+
described_class.new do |f|
|
880
|
+
f.options.url = @url + '/elem_combo'
|
881
|
+
f.push_to_url_queue f.options.url
|
746
882
|
|
747
|
-
f.
|
748
|
-
f.
|
749
|
-
f.
|
883
|
+
f.data.url_queue.should_not be_empty
|
884
|
+
f.clean_up
|
885
|
+
f.data.url_queue.should be_empty
|
886
|
+
end
|
887
|
+
end
|
888
|
+
|
889
|
+
it 'sets #running? to false' do
|
890
|
+
described_class.new do |f|
|
891
|
+
f.options.url = @url + '/elem_combo'
|
892
|
+
f.clean_up
|
893
|
+
f.should_not be_running
|
750
894
|
end
|
751
895
|
end
|
752
896
|
end
|
@@ -757,10 +901,10 @@ describe Arachni::Framework do
|
|
757
901
|
@new_framework = Arachni::Framework.new
|
758
902
|
end
|
759
903
|
|
760
|
-
context 'when passed a valid
|
761
|
-
it 'returns the
|
904
|
+
context 'when passed a valid reporter name' do
|
905
|
+
it 'returns the reporter as a string' do
|
762
906
|
json = @new_framework.report_as( :json )
|
763
|
-
JSON.load( json )['issues'].size.should == @new_framework.
|
907
|
+
JSON.load( json )['issues'].size.should == @new_framework.report.issues.size
|
764
908
|
end
|
765
909
|
|
766
910
|
context 'which does not support the \'outfile\' option' do
|
@@ -770,7 +914,7 @@ describe Arachni::Framework do
|
|
770
914
|
end
|
771
915
|
end
|
772
916
|
|
773
|
-
context 'when passed an invalid
|
917
|
+
context 'when passed an invalid reporter name' do
|
774
918
|
it 'raises Arachni::Component::Error::NotFound' do
|
775
919
|
expect { @new_framework.report_as( :blah ) }.to raise_error Arachni::Component::Error::NotFound
|
776
920
|
end
|
@@ -778,41 +922,205 @@ describe Arachni::Framework do
|
|
778
922
|
end
|
779
923
|
|
780
924
|
describe '#audit_page' do
|
781
|
-
|
782
|
-
|
783
|
-
|
925
|
+
it 'updates the #sitemap with the DOM URL' do
|
926
|
+
subject.options.audit.elements :links, :forms, :cookies
|
927
|
+
subject.checks.load :taint
|
928
|
+
|
929
|
+
subject.sitemap.should be_empty
|
930
|
+
|
931
|
+
page = Arachni::Page.from_url( @url + '/link' )
|
932
|
+
page.dom.url = @url + '/link/#/stuff'
|
933
|
+
|
934
|
+
subject.audit_page page
|
935
|
+
subject.sitemap.should include @url + '/link/#/stuff'
|
936
|
+
end
|
937
|
+
|
938
|
+
it "runs #{Arachni::Check::Manager}#without_platforms before #{Arachni::Check::Manager}#with_platforms" do
|
939
|
+
@options.paths.checks = fixtures_path + '/checks/'
|
940
|
+
|
941
|
+
described_class.new do |f|
|
942
|
+
f.checks.load_all
|
943
|
+
|
944
|
+
page = Arachni::Page.from_url( @url + '/link' )
|
945
|
+
|
946
|
+
responses = []
|
947
|
+
f.http.on_complete do |response|
|
948
|
+
responses << response.url
|
949
|
+
end
|
950
|
+
|
951
|
+
f.audit_page page
|
952
|
+
|
953
|
+
responses.sort.should ==
|
954
|
+
%w(http://localhost/test3 http://localhost/test
|
955
|
+
http://localhost/test2).sort
|
956
|
+
end
|
957
|
+
end
|
958
|
+
|
959
|
+
context 'when checks were' do
|
960
|
+
context 'ran against the page' do
|
961
|
+
it 'returns true' do
|
962
|
+
subject.checks.load :taint
|
963
|
+
subject.audit_page( Arachni::Page.from_url( @url + '/link' ) ).should be_true
|
964
|
+
end
|
965
|
+
end
|
966
|
+
|
967
|
+
context 'not ran against the page' do
|
968
|
+
it 'returns false' do
|
969
|
+
subject.audit_page( Arachni::Page.from_url( @url + '/link' ) ).should be_false
|
970
|
+
end
|
971
|
+
end
|
972
|
+
end
|
973
|
+
|
974
|
+
context 'when the page contains JavaScript code' do
|
975
|
+
it 'analyzes the DOM and pushes new pages to the page queue' do
|
976
|
+
Arachni::Framework.new do |f|
|
977
|
+
f.options.audit.elements :links, :forms, :cookies
|
978
|
+
f.checks.load :taint
|
979
|
+
|
980
|
+
f.page_queue_total_size.should == 0
|
981
|
+
|
982
|
+
f.audit_page( Arachni::Page.from_url( @url + '/with_javascript' ) )
|
983
|
+
|
984
|
+
sleep 0.1 while f.wait_for_browser?
|
985
|
+
|
986
|
+
f.page_queue_total_size.should > 0
|
987
|
+
end
|
988
|
+
end
|
784
989
|
|
785
|
-
|
990
|
+
it 'analyzes the DOM and pushes new paths to the url queue' do
|
991
|
+
Arachni::Framework.new do |f|
|
992
|
+
f.options.url = @url
|
993
|
+
f.options.audit.elements :links, :forms, :cookies
|
994
|
+
f.checks.load :taint
|
786
995
|
|
787
|
-
|
788
|
-
|
996
|
+
f.url_queue_total_size.should == 0
|
997
|
+
|
998
|
+
f.audit_page( Arachni::Page.from_url( @url + '/with_javascript' ) )
|
999
|
+
|
1000
|
+
sleep 0.1 while f.wait_for_browser?
|
1001
|
+
|
1002
|
+
f.url_queue_total_size.should == 2
|
1003
|
+
end
|
1004
|
+
end
|
1005
|
+
|
1006
|
+
context 'when the DOM depth limit has been reached' do
|
1007
|
+
it 'does not analyze the DOM' do
|
1008
|
+
Arachni::Framework.new do |f|
|
1009
|
+
f.options.url = @url
|
1010
|
+
|
1011
|
+
f.options.audit.elements :links, :forms, :cookies
|
1012
|
+
f.checks.load :taint
|
1013
|
+
f.options.scope.dom_depth_limit = 1
|
1014
|
+
f.url_queue_total_size.should == 0
|
1015
|
+
f.audit_page( Arachni::Page.from_url( @url + '/with_javascript' ) ).should be_true
|
1016
|
+
sleep 0.1 while f.wait_for_browser?
|
1017
|
+
f.url_queue_total_size.should == 2
|
1018
|
+
|
1019
|
+
f.reset
|
1020
|
+
|
1021
|
+
f.options.audit.elements :links, :forms, :cookies
|
1022
|
+
f.checks.load :taint
|
1023
|
+
f.options.scope.dom_depth_limit = 1
|
1024
|
+
f.url_queue_total_size.should == 0
|
1025
|
+
|
1026
|
+
page = Arachni::Page.from_url( @url + '/with_javascript' )
|
1027
|
+
page.dom.push_transition Arachni::Page::DOM::Transition.new( :page, :load )
|
1028
|
+
|
1029
|
+
f.audit_page( page ).should be_true
|
1030
|
+
sleep 0.1 while f.wait_for_browser?
|
1031
|
+
f.url_queue_total_size.should == 0
|
1032
|
+
end
|
1033
|
+
end
|
1034
|
+
|
1035
|
+
it 'returns false' do
|
1036
|
+
page = Arachni::Page.from_data(
|
1037
|
+
url: @url,
|
1038
|
+
dom: {
|
1039
|
+
transitions: [
|
1040
|
+
{ page: :load },
|
1041
|
+
{ "<a href='javascript:click();'>" => :click },
|
1042
|
+
{ "<button dblclick='javascript:doubleClick();'>" => :ondblclick }
|
1043
|
+
].map { |t| Arachni::Page::DOM::Transition.new *t.first }
|
1044
|
+
}
|
1045
|
+
)
|
1046
|
+
|
1047
|
+
Arachni::Framework.new do |f|
|
1048
|
+
f.checks.load :taint
|
1049
|
+
|
1050
|
+
f.options.scope.dom_depth_limit = 10
|
1051
|
+
f.audit_page( page ).should be_true
|
1052
|
+
|
1053
|
+
f.options.scope.dom_depth_limit = 2
|
1054
|
+
f.audit_page( page ).should be_false
|
1055
|
+
end
|
1056
|
+
end
|
789
1057
|
end
|
790
1058
|
end
|
1059
|
+
|
791
1060
|
context 'when the page matches exclusion criteria' do
|
792
|
-
it 'does not audit it
|
793
|
-
|
794
|
-
|
1061
|
+
it 'does not audit it' do
|
1062
|
+
subject.options.scope.exclude_path_patterns << /link/
|
1063
|
+
subject.options.audit.elements :links, :forms, :cookies
|
1064
|
+
|
1065
|
+
subject.checks.load :taint
|
1066
|
+
|
1067
|
+
subject.audit_page( Arachni::Page.from_url( @url + '/link' ) )
|
1068
|
+
subject.report.issues.size.should == 0
|
1069
|
+
end
|
1070
|
+
|
1071
|
+
it 'returns false' do
|
1072
|
+
subject.options.scope.exclude_path_patterns << /link/
|
1073
|
+
subject.audit_page( Arachni::Page.from_url( @url + '/link' ) ).should be_false
|
1074
|
+
end
|
1075
|
+
end
|
1076
|
+
|
1077
|
+
context "when #{Arachni::Check::Auditor}.has_timeout_candidates?" do
|
1078
|
+
it "calls #{Arachni::Check::Auditor}.timeout_audit_run" do
|
1079
|
+
Arachni::Check::Auditor.stub(:has_timeout_candidates?){ true }
|
1080
|
+
|
1081
|
+
Arachni::Check::Auditor.should receive(:timeout_audit_run)
|
1082
|
+
subject.audit_page( Arachni::Page.from_url( @url + '/link' ) )
|
1083
|
+
end
|
1084
|
+
end
|
1085
|
+
|
1086
|
+
context 'when a check fails with an exception' do
|
1087
|
+
it 'moves to the next one' do
|
1088
|
+
@options.paths.checks = fixtures_path + '/checks/'
|
1089
|
+
|
1090
|
+
described_class.new do |f|
|
1091
|
+
f.checks.load_all
|
1092
|
+
|
1093
|
+
f.checks[:test].any_instance.stub(:run) { raise }
|
1094
|
+
|
1095
|
+
page = Arachni::Page.from_url( @url + '/link' )
|
1096
|
+
|
1097
|
+
responses = []
|
1098
|
+
f.http.on_complete do |response|
|
1099
|
+
responses << response.url
|
1100
|
+
end
|
795
1101
|
|
796
|
-
|
1102
|
+
f.audit_page page
|
797
1103
|
|
798
|
-
|
799
|
-
|
1104
|
+
responses.should == %w(http://localhost/test3 http://localhost/test2)
|
1105
|
+
end
|
800
1106
|
end
|
801
1107
|
end
|
802
1108
|
end
|
803
1109
|
|
804
|
-
describe '
|
805
|
-
context
|
1110
|
+
describe '#page_limit_reached?' do
|
1111
|
+
context "when the #{Arachni::OptionGroups::Scope}#page_limit has" do
|
806
1112
|
context 'been reached' do
|
807
1113
|
it 'returns true' do
|
808
1114
|
Arachni::Framework.new do |f|
|
809
|
-
f.
|
810
|
-
f.
|
811
|
-
f.
|
1115
|
+
f.options.url = web_server_url_for :framework_multi
|
1116
|
+
f.options.audit.elements :links
|
1117
|
+
f.options.scope.page_limit = 10
|
812
1118
|
|
813
|
-
f.
|
1119
|
+
f.page_limit_reached?.should be_false
|
814
1120
|
f.run
|
815
|
-
f.
|
1121
|
+
f.page_limit_reached?.should be_true
|
1122
|
+
|
1123
|
+
f.sitemap.size.should == 10
|
816
1124
|
end
|
817
1125
|
end
|
818
1126
|
end
|
@@ -820,15 +1128,15 @@ describe Arachni::Framework do
|
|
820
1128
|
context 'not been reached' do
|
821
1129
|
it 'returns false' do
|
822
1130
|
Arachni::Framework.new do |f|
|
823
|
-
f.
|
824
|
-
f.
|
825
|
-
f.
|
1131
|
+
f.options.url = web_server_url_for :framework
|
1132
|
+
f.options.audit.elements :links
|
1133
|
+
f.options.scope.page_limit = 100
|
826
1134
|
|
827
|
-
f.
|
1135
|
+
f.checks.load :taint
|
828
1136
|
|
829
|
-
f.
|
1137
|
+
f.page_limit_reached?.should be_false
|
830
1138
|
f.run
|
831
|
-
f.
|
1139
|
+
f.page_limit_reached?.should be_false
|
832
1140
|
end
|
833
1141
|
end
|
834
1142
|
end
|
@@ -836,83 +1144,250 @@ describe Arachni::Framework do
|
|
836
1144
|
context 'not been set' do
|
837
1145
|
it 'returns false' do
|
838
1146
|
Arachni::Framework.new do |f|
|
839
|
-
f.
|
840
|
-
f.
|
1147
|
+
f.options.url = web_server_url_for :framework
|
1148
|
+
f.options.audit.elements :links
|
841
1149
|
|
842
|
-
f.
|
1150
|
+
f.checks.load :taint
|
843
1151
|
|
844
|
-
f.
|
1152
|
+
f.page_limit_reached?.should be_false
|
845
1153
|
f.run
|
846
|
-
f.
|
1154
|
+
f.page_limit_reached?.should be_false
|
847
1155
|
end
|
848
1156
|
end
|
849
1157
|
end
|
850
1158
|
end
|
851
1159
|
end
|
852
1160
|
|
1161
|
+
describe '#accepts_more_pages?' do
|
1162
|
+
context 'when #page_limit_reached? and #crawl?' do
|
1163
|
+
it 'return true' do
|
1164
|
+
subject.stub(:page_limit_reached?) { false }
|
1165
|
+
subject.stub(:crawl?) { true }
|
1166
|
+
|
1167
|
+
subject.accepts_more_pages?.should be_true
|
1168
|
+
end
|
1169
|
+
end
|
1170
|
+
|
1171
|
+
context 'when #page_limit_reached?' do
|
1172
|
+
context true do
|
1173
|
+
it 'returns false' do
|
1174
|
+
subject.stub(:page_limit_reached?) { true }
|
1175
|
+
subject.accepts_more_pages?.should be_false
|
1176
|
+
end
|
1177
|
+
end
|
1178
|
+
end
|
1179
|
+
|
1180
|
+
context 'when #crawl?' do
|
1181
|
+
context false do
|
1182
|
+
it 'returns false' do
|
1183
|
+
subject.stub(:crawl?) { false }
|
1184
|
+
subject.accepts_more_pages?.should be_false
|
1185
|
+
end
|
1186
|
+
end
|
1187
|
+
end
|
1188
|
+
end
|
1189
|
+
|
853
1190
|
describe '#push_to_page_queue' do
|
854
|
-
|
855
|
-
|
856
|
-
|
1191
|
+
let(:page) { Arachni::Page.from_url( @url + '/train/true' ) }
|
1192
|
+
|
1193
|
+
it 'pushes it to the page audit queue and returns true' do
|
1194
|
+
page = Arachni::Page.from_url( @url + '/train/true' )
|
1195
|
+
|
1196
|
+
subject.options.audit.elements :links, :forms, :cookies
|
1197
|
+
subject.checks.load :taint
|
857
1198
|
|
858
|
-
|
859
|
-
|
1199
|
+
subject.page_queue_total_size.should == 0
|
1200
|
+
subject.push_to_page_queue( page ).should be_true
|
1201
|
+
subject.run
|
860
1202
|
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
|
1203
|
+
subject.report.issues.size.should == 1
|
1204
|
+
subject.page_queue_total_size.should > 0
|
1205
|
+
end
|
1206
|
+
|
1207
|
+
it 'updates the #sitemap with the DOM URL' do
|
1208
|
+
subject.options.audit.elements :links, :forms, :cookies
|
1209
|
+
subject.checks.load :taint
|
1210
|
+
|
1211
|
+
subject.sitemap.should be_empty
|
1212
|
+
|
1213
|
+
page = Arachni::Page.from_url( @url + '/link' )
|
1214
|
+
page.dom.url = @url + '/link/#/stuff'
|
1215
|
+
|
1216
|
+
subject.push_to_page_queue page
|
1217
|
+
subject.sitemap.should include @url + '/link/#/stuff'
|
1218
|
+
end
|
1219
|
+
|
1220
|
+
it "passes it to #{Arachni::ElementFilter}#update_from_page_cache" do
|
1221
|
+
page = Arachni::Page.from_url( @url + '/link' )
|
1222
|
+
|
1223
|
+
Arachni::ElementFilter.should receive(:update_from_page_cache).with(page)
|
1224
|
+
|
1225
|
+
subject.push_to_page_queue page
|
1226
|
+
end
|
1227
|
+
|
1228
|
+
context 'when the page has already been seen' do
|
1229
|
+
it 'ignores it' do
|
1230
|
+
page = Arachni::Page.from_url( @url + '/stuff' )
|
1231
|
+
|
1232
|
+
subject.page_queue_total_size.should == 0
|
1233
|
+
subject.push_to_page_queue( page )
|
1234
|
+
subject.push_to_page_queue( page )
|
1235
|
+
subject.push_to_page_queue( page )
|
1236
|
+
subject.page_queue_total_size.should == 1
|
1237
|
+
end
|
1238
|
+
|
1239
|
+
it 'returns false' do
|
1240
|
+
page = Arachni::Page.from_url( @url + '/stuff' )
|
1241
|
+
|
1242
|
+
subject.page_queue_total_size.should == 0
|
1243
|
+
subject.push_to_page_queue( page ).should be_true
|
1244
|
+
subject.push_to_page_queue( page ).should be_false
|
1245
|
+
subject.push_to_page_queue( page ).should be_false
|
1246
|
+
subject.page_queue_total_size.should == 1
|
867
1247
|
end
|
868
1248
|
end
|
869
|
-
context 'when the page matches exclusion criteria' do
|
870
|
-
it 'does not push it to the page audit queue and returns false' do
|
871
|
-
page = Arachni::Page.from_url( @url + '/train/true' )
|
872
1249
|
|
873
|
-
|
874
|
-
|
1250
|
+
context 'when #accepts_more_pages?' do
|
1251
|
+
context false do
|
1252
|
+
it 'returns false' do
|
1253
|
+
subject.stub(:accepts_more_pages?) { false }
|
1254
|
+
subject.push_to_page_queue( page ).should be_false
|
1255
|
+
end
|
1256
|
+
end
|
875
1257
|
|
876
|
-
|
1258
|
+
context true do
|
1259
|
+
it 'returns true' do
|
1260
|
+
subject.stub(:accepts_more_pages?) { true }
|
1261
|
+
subject.push_to_page_queue( page ).should be_true
|
1262
|
+
end
|
1263
|
+
end
|
1264
|
+
end
|
1265
|
+
|
1266
|
+
context "when #{Arachni::Page::Scope}#out? is true" do
|
1267
|
+
it 'returns false' do
|
1268
|
+
Arachni::Page::Scope.any_instance.stub(:out?) { true }
|
1269
|
+
subject.push_to_page_queue( page ).should be_false
|
1270
|
+
end
|
1271
|
+
end
|
1272
|
+
|
1273
|
+
context "when #{Arachni::URI::Scope}#redundant? is true" do
|
1274
|
+
it 'returns false' do
|
1275
|
+
Arachni::Page::Scope.any_instance.stub(:redundant?) { true }
|
1276
|
+
subject.push_to_page_queue( page ).should be_false
|
1277
|
+
end
|
1278
|
+
end
|
877
1279
|
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
@f.page_queue_total_size.should == 0
|
883
|
-
@f.modules.clear
|
1280
|
+
context "when #{Arachni::Page::Scope}#auto_redundant? is true" do
|
1281
|
+
it 'returns false' do
|
1282
|
+
Arachni::Page::Scope.any_instance.stub(:auto_redundant?) { true }
|
1283
|
+
subject.push_to_page_queue( page ).should be_false
|
884
1284
|
end
|
885
1285
|
end
|
886
1286
|
end
|
887
1287
|
|
888
1288
|
describe '#push_to_url_queue' do
|
889
1289
|
it 'pushes a URL to the URL audit queue' do
|
890
|
-
|
891
|
-
|
1290
|
+
subject.options.audit.elements :links, :forms, :cookies
|
1291
|
+
subject.checks.load :taint
|
1292
|
+
|
1293
|
+
subject.url_queue_total_size.should == 0
|
1294
|
+
subject.push_to_url_queue( @url + '/link' ).should be_true
|
1295
|
+
subject.run
|
1296
|
+
|
1297
|
+
subject.report.issues.size.should == 1
|
1298
|
+
subject.url_queue_total_size.should == 3
|
1299
|
+
end
|
1300
|
+
|
1301
|
+
context 'when the URL has already been seen' do
|
1302
|
+
it 'returns false' do
|
1303
|
+
subject.push_to_url_queue( @url + '/link' ).should be_true
|
1304
|
+
subject.push_to_url_queue( @url + '/link' ).should be_false
|
1305
|
+
end
|
1306
|
+
|
1307
|
+
it 'ignores it' do
|
1308
|
+
subject.url_queue_total_size.should == 0
|
1309
|
+
subject.push_to_url_queue( @url + '/link' )
|
1310
|
+
subject.push_to_url_queue( @url + '/link' )
|
1311
|
+
subject.push_to_url_queue( @url + '/link' )
|
1312
|
+
subject.url_queue_total_size.should == 1
|
1313
|
+
end
|
1314
|
+
end
|
1315
|
+
|
1316
|
+
context 'when #accepts_more_pages?' do
|
1317
|
+
context false do
|
1318
|
+
it 'returns false' do
|
1319
|
+
subject.stub(:accepts_more_pages?) { false }
|
1320
|
+
subject.push_to_url_queue( @url ).should be_false
|
1321
|
+
end
|
1322
|
+
end
|
1323
|
+
|
1324
|
+
context true do
|
1325
|
+
it 'returns true' do
|
1326
|
+
subject.stub(:accepts_more_pages?) { true }
|
1327
|
+
subject.push_to_url_queue( @url ).should be_true
|
1328
|
+
end
|
1329
|
+
end
|
1330
|
+
end
|
892
1331
|
|
893
|
-
|
894
|
-
|
895
|
-
|
896
|
-
|
897
|
-
|
1332
|
+
context "when #{Arachni::URI::Scope}#out? is true" do
|
1333
|
+
it 'returns false' do
|
1334
|
+
Arachni::URI::Scope.any_instance.stub(:out?) { true }
|
1335
|
+
subject.push_to_url_queue( @url ).should be_false
|
1336
|
+
end
|
1337
|
+
end
|
1338
|
+
|
1339
|
+
context "when #{Arachni::URI::Scope}#redundant? is true" do
|
1340
|
+
it 'returns false' do
|
1341
|
+
Arachni::URI::Scope.any_instance.stub(:redundant?) { true }
|
1342
|
+
subject.push_to_url_queue( @url ).should be_false
|
1343
|
+
end
|
1344
|
+
end
|
1345
|
+
|
1346
|
+
context "when #{Arachni::URI::Scope}#auto_redundant? is true" do
|
1347
|
+
it 'returns false' do
|
1348
|
+
Arachni::URI::Scope.any_instance.stub(:auto_redundant?) { true }
|
1349
|
+
subject.push_to_url_queue( @url ).should be_false
|
1350
|
+
end
|
898
1351
|
end
|
899
1352
|
end
|
900
1353
|
|
901
|
-
describe '#
|
902
|
-
|
903
|
-
|
904
|
-
|
905
|
-
|
1354
|
+
describe '#statistics' do
|
1355
|
+
let(:statistics) { subject.statistics }
|
1356
|
+
|
1357
|
+
it 'includes http statistics' do
|
1358
|
+
statistics[:http].should == subject.http.statistics
|
1359
|
+
end
|
1360
|
+
|
1361
|
+
[:found_pages, :audited_pages, :current_page].each do |k|
|
1362
|
+
it "includes #{k}" do
|
1363
|
+
statistics.should include k
|
1364
|
+
end
|
1365
|
+
end
|
1366
|
+
|
1367
|
+
describe :runtime do
|
1368
|
+
context 'when the scan has been running' do
|
1369
|
+
it 'returns the runtime in seconds' do
|
1370
|
+
subject.run
|
1371
|
+
statistics[:runtime].should > 0
|
1372
|
+
end
|
1373
|
+
end
|
1374
|
+
|
1375
|
+
context 'when no scan has been running' do
|
1376
|
+
it 'returns 0' do
|
1377
|
+
statistics[:runtime].should == 0
|
1378
|
+
end
|
1379
|
+
end
|
906
1380
|
end
|
907
1381
|
end
|
908
1382
|
|
909
1383
|
describe '#list_platforms' do
|
910
1384
|
it 'returns information about all valid platforms' do
|
911
|
-
|
1385
|
+
subject.list_platforms.should == {
|
912
1386
|
'Operating systems' => {
|
913
1387
|
unix: 'Generic Unix family',
|
914
1388
|
linux: 'Linux',
|
915
1389
|
bsd: 'Generic BSD family',
|
1390
|
+
aix: 'IBM AIX',
|
916
1391
|
solaris: 'Solaris',
|
917
1392
|
windows: 'MS Windows'
|
918
1393
|
},
|
@@ -933,7 +1408,8 @@ describe Arachni::Framework do
|
|
933
1408
|
oracle: 'Oracle',
|
934
1409
|
pgsql: 'Postgresql',
|
935
1410
|
sqlite: 'SQLite',
|
936
|
-
sybase: 'Sybase'
|
1411
|
+
sybase: 'Sybase',
|
1412
|
+
mongodb: 'MongoDB'
|
937
1413
|
},
|
938
1414
|
'Web servers' => {
|
939
1415
|
apache: 'Apache',
|
@@ -959,203 +1435,67 @@ describe Arachni::Framework do
|
|
959
1435
|
end
|
960
1436
|
end
|
961
1437
|
|
962
|
-
describe '#
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
loaded = @f.modules.loaded
|
1438
|
+
describe '#list_checks' do
|
1439
|
+
context 'when a pattern is given' do
|
1440
|
+
it 'uses it to filter out checks that do not match it' do
|
1441
|
+
subject.list_checks( 'boo' ).size == 0
|
967
1442
|
|
968
|
-
|
969
|
-
|
1443
|
+
subject.list_checks( 'taint' ).should == subject.list_checks
|
1444
|
+
subject.list_checks.size == 1
|
1445
|
+
end
|
1446
|
+
end
|
1447
|
+
end
|
970
1448
|
|
971
|
-
|
1449
|
+
describe '#list_plugins' do
|
1450
|
+
it 'returns info on all plugins' do
|
1451
|
+
subject.list_plugins.size.should == subject.plugins.available.size
|
972
1452
|
|
973
|
-
|
974
|
-
|
975
|
-
mod[:name].should == info[:name]
|
976
|
-
mod[:mod_name].should == 'taint'
|
977
|
-
mod[:shortname].should == mod[:mod_name]
|
978
|
-
mod[:description].should == info[:description]
|
979
|
-
mod[:author].should == [info[:author]].flatten
|
980
|
-
mod[:version].should == info[:version]
|
981
|
-
mod[:references].should == info[:references]
|
982
|
-
mod[:targets].should == info[:targets]
|
983
|
-
mod[:issue].should == info[:issue]
|
984
|
-
end
|
1453
|
+
info = subject.list_plugins.find { |p| p[:options].any? }
|
1454
|
+
plugin = subject.plugins[info[:shortname]]
|
985
1455
|
|
986
|
-
|
987
|
-
|
988
|
-
|
989
|
-
|
990
|
-
|
1456
|
+
plugin.info.each do |k, v|
|
1457
|
+
if k == :author
|
1458
|
+
info[k].should == [v].flatten
|
1459
|
+
next
|
1460
|
+
end
|
991
1461
|
|
992
|
-
|
993
|
-
@f.list_modules.should == @f.lsmod
|
994
|
-
@f.lsmod.size == 1
|
1462
|
+
info[k].should == v
|
995
1463
|
end
|
1464
|
+
|
1465
|
+
info[:shortname].should == plugin.shortname
|
996
1466
|
end
|
997
|
-
end
|
998
1467
|
|
999
|
-
|
1000
|
-
it 'aliased to #lsplug return info on all plugins' do
|
1001
|
-
loaded = @f.plugins.loaded
|
1002
|
-
|
1003
|
-
@f.list_plugins.should == @f.lsplug
|
1004
|
-
|
1005
|
-
@f.list_plugins.map { |r| r.delete( :path ); r }
|
1006
|
-
.sort_by { |e| e[:plug_name] }.should == YAML.load( '
|
1007
|
-
---
|
1008
|
-
- :name: \'\'
|
1009
|
-
:description: \'\'
|
1010
|
-
:author:
|
1011
|
-
- Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>
|
1012
|
-
:version: \'0.1\'
|
1013
|
-
:plug_name: !binary |-
|
1014
|
-
YmFk
|
1015
|
-
:shortname: !binary |-
|
1016
|
-
YmFk
|
1017
|
-
- :name: Default
|
1018
|
-
:description: Some description
|
1019
|
-
:author:
|
1020
|
-
- Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>
|
1021
|
-
:version: \'0.1\'
|
1022
|
-
:options:
|
1023
|
-
- !ruby/object:Arachni::Component::Options::Int
|
1024
|
-
name: int_opt
|
1025
|
-
required: false
|
1026
|
-
desc: An integer.
|
1027
|
-
default: 4
|
1028
|
-
enums: []
|
1029
|
-
:plug_name: !binary |-
|
1030
|
-
ZGVmYXVsdA==
|
1031
|
-
:shortname: !binary |-
|
1032
|
-
ZGVmYXVsdA==
|
1033
|
-
- :name: Distributable
|
1034
|
-
:description: \'\'
|
1035
|
-
:author:
|
1036
|
-
- Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>
|
1037
|
-
:version: \'0.1\'
|
1038
|
-
:issue:
|
1039
|
-
:tags:
|
1040
|
-
- distributable_string
|
1041
|
-
- :distributable_sym
|
1042
|
-
:plug_name: !binary |-
|
1043
|
-
ZGlzdHJpYnV0YWJsZQ==
|
1044
|
-
:shortname: !binary |-
|
1045
|
-
ZGlzdHJpYnV0YWJsZQ==
|
1046
|
-
- :name: \'\'
|
1047
|
-
:description: \'\'
|
1048
|
-
:author:
|
1049
|
-
- Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>
|
1050
|
-
:version: \'0.1\'
|
1051
|
-
:plug_name: !binary |-
|
1052
|
-
bG9vcA==
|
1053
|
-
:shortname: !binary |-
|
1054
|
-
bG9vcA==
|
1055
|
-
- :name: SpiderHook
|
1056
|
-
:description: \'\'
|
1057
|
-
:author:
|
1058
|
-
- Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>
|
1059
|
-
:version: \'0.1\'
|
1060
|
-
:plug_name: !binary |-
|
1061
|
-
c3BpZGVyX2hvb2s=
|
1062
|
-
:shortname: !binary |-
|
1063
|
-
c3BpZGVyX2hvb2s=
|
1064
|
-
- :name: Wait
|
1065
|
-
:description: \'\'
|
1066
|
-
:tags:
|
1067
|
-
- wait_string
|
1068
|
-
- :wait_sym
|
1069
|
-
:author:
|
1070
|
-
- Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>
|
1071
|
-
:version: \'0.1\'
|
1072
|
-
:plug_name: !binary |-
|
1073
|
-
d2FpdA==
|
1074
|
-
:shortname: !binary |-
|
1075
|
-
d2FpdA==
|
1076
|
-
- :name: Component
|
1077
|
-
:description: Component with options
|
1078
|
-
:author:
|
1079
|
-
- Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>
|
1080
|
-
:version: \'0.1\'
|
1081
|
-
:options:
|
1082
|
-
- !ruby/object:Arachni::Component::Options::String
|
1083
|
-
name: req_opt
|
1084
|
-
required: true
|
1085
|
-
desc: Required option
|
1086
|
-
default:
|
1087
|
-
enums: []
|
1088
|
-
- !ruby/object:Arachni::Component::Options::String
|
1089
|
-
name: opt_opt
|
1090
|
-
required: false
|
1091
|
-
desc: Optional option
|
1092
|
-
default:
|
1093
|
-
enums: []
|
1094
|
-
- !ruby/object:Arachni::Component::Options::String
|
1095
|
-
name: default_opt
|
1096
|
-
required: false
|
1097
|
-
desc: Option with default value
|
1098
|
-
default: value
|
1099
|
-
enums: []
|
1100
|
-
:plug_name: !binary |-
|
1101
|
-
d2l0aF9vcHRpb25z
|
1102
|
-
:shortname: !binary |-
|
1103
|
-
d2l0aF9vcHRpb25z
|
1104
|
-
' ).sort_by { |e| e[:plug_name] }
|
1105
|
-
@f.plugins.loaded.should == loaded
|
1106
|
-
end
|
1107
|
-
|
1108
|
-
context 'when the #lsplug option is set' do
|
1468
|
+
context 'when a pattern is given' do
|
1109
1469
|
it 'uses it to filter out plugins that do not match it' do
|
1110
|
-
|
1111
|
-
|
1112
|
-
@f.lsplug.size == 2
|
1113
|
-
|
1114
|
-
@f.opts.lsplug = 'boo'
|
1115
|
-
@f.list_plugins.should == @f.lsplug
|
1116
|
-
@f.lsplug.size == 0
|
1470
|
+
subject.list_plugins( 'bad|foo' ).size == 2
|
1471
|
+
subject.list_plugins( 'boo' ).size == 0
|
1117
1472
|
end
|
1118
1473
|
end
|
1119
1474
|
end
|
1120
1475
|
|
1121
|
-
describe '#
|
1122
|
-
it 'returns info on all
|
1123
|
-
|
1124
|
-
|
1125
|
-
|
1126
|
-
|
1127
|
-
|
1128
|
-
|
1129
|
-
|
1130
|
-
|
1131
|
-
|
1132
|
-
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1143
|
-
|
1144
|
-
:rep_name: foo
|
1145
|
-
:shortname: foo
|
1146
|
-
').sort_by { |e| e[:rep_name] }
|
1147
|
-
@f.reports.loaded.should == loaded
|
1148
|
-
end
|
1149
|
-
|
1150
|
-
context 'when the #lsrep option is set' do
|
1151
|
-
it 'uses it to filter out reports that do not match it' do
|
1152
|
-
@f.opts.lsrep = 'foo'
|
1153
|
-
@f.list_reports.should == @f.lsrep
|
1154
|
-
@f.lsrep.size == 1
|
1155
|
-
|
1156
|
-
@f.opts.lsrep = 'boo'
|
1157
|
-
@f.list_reports.should == @f.lsrep
|
1158
|
-
@f.lsrep.size == 0
|
1476
|
+
describe '#list_reporters' do
|
1477
|
+
it 'returns info on all reporters' do
|
1478
|
+
subject.list_reporters.size.should == subject.reporters.available.size
|
1479
|
+
|
1480
|
+
info = subject.list_reporters.find { |p| p[:options].any? }
|
1481
|
+
report = subject.reporters[info[:shortname]]
|
1482
|
+
|
1483
|
+
report.info.each do |k, v|
|
1484
|
+
if k == :author
|
1485
|
+
info[k].should == [v].flatten
|
1486
|
+
next
|
1487
|
+
end
|
1488
|
+
|
1489
|
+
info[k].should == v
|
1490
|
+
end
|
1491
|
+
|
1492
|
+
info[:shortname].should == report.shortname
|
1493
|
+
end
|
1494
|
+
|
1495
|
+
context 'when a pattern is given' do
|
1496
|
+
it 'uses it to filter out reporters that do not match it' do
|
1497
|
+
subject.list_reporters( 'foo' ).size == 1
|
1498
|
+
subject.list_reporters( 'boo' ).size == 0
|
1159
1499
|
end
|
1160
1500
|
end
|
1161
1501
|
end
|