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
@@ -1,157 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe Arachni::Element::Capabilities::Auditable::Timeout do
|
4
|
-
|
5
|
-
before :all do
|
6
|
-
Arachni::Options.url = @url = web_server_url_for( :timeout )
|
7
|
-
@auditor = Auditor.new( nil, Arachni::Framework.new )
|
8
|
-
|
9
|
-
@inputs = { 'sleep' => '' }
|
10
|
-
|
11
|
-
@positive = Arachni::Element::Link.new( @url + '/true', @inputs )
|
12
|
-
@positive.auditor = @auditor
|
13
|
-
@positive.disable_deduplication
|
14
|
-
|
15
|
-
@positive_high_res = Arachni::Element::Link.new(
|
16
|
-
@url + '/high_response_time',
|
17
|
-
@inputs
|
18
|
-
)
|
19
|
-
@positive_high_res.auditor = @auditor
|
20
|
-
|
21
|
-
@negative = Arachni::Element::Link.new( @url + '/false', @inputs )
|
22
|
-
@negative.auditor = @auditor
|
23
|
-
@negative.disable_deduplication
|
24
|
-
|
25
|
-
@run = proc do
|
26
|
-
Arachni::HTTP.run
|
27
|
-
Arachni::Element::Capabilities::Auditable.timeout_audit_run
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
before { Arachni::Framework.reset }
|
32
|
-
|
33
|
-
describe '#responsive?' do
|
34
|
-
context 'when the server is responsive' do
|
35
|
-
it 'returns true' do
|
36
|
-
Arachni::Element::Link.new( @url + '/true' ).responsive?.should be_true
|
37
|
-
end
|
38
|
-
end
|
39
|
-
context 'when the server is not responsive' do
|
40
|
-
it 'returns false' do
|
41
|
-
Arachni::Element::Link.new( @url + '/sleep' ).responsive?( 1 ).should be_false
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
describe '#timeout_analysis' do
|
47
|
-
before do
|
48
|
-
@timeout_opts = {
|
49
|
-
format: [ Arachni::Module::Auditor::Format::STRAIGHT ],
|
50
|
-
elements: [ Arachni::Element::LINK ]
|
51
|
-
}
|
52
|
-
issues.clear
|
53
|
-
end
|
54
|
-
|
55
|
-
context 'when the element action matches a skip rule' do
|
56
|
-
it 'returns false' do
|
57
|
-
auditable = Arachni::Element::Link.new( 'http://stuff.com/',
|
58
|
-
{ 'input' => '' } )
|
59
|
-
auditable.timeout_analysis( '__TIME__', @timeout_opts.merge( timeout: 2000 ) ).should be_false
|
60
|
-
end
|
61
|
-
end
|
62
|
-
|
63
|
-
context 'when the payloads are per platform' do
|
64
|
-
it 'assigns the platform of the payload to the issue' do
|
65
|
-
payloads = {
|
66
|
-
windows: '__TIME__',
|
67
|
-
php: 'seed',
|
68
|
-
}
|
69
|
-
|
70
|
-
@positive.timeout_analysis( payloads,
|
71
|
-
@timeout_opts.merge(
|
72
|
-
timeout_divider: 1000,
|
73
|
-
timeout: 2000
|
74
|
-
)
|
75
|
-
)
|
76
|
-
@run.call
|
77
|
-
|
78
|
-
issue = issues.first
|
79
|
-
issue.platform.should == :windows
|
80
|
-
issue.platform_type.should == :os
|
81
|
-
end
|
82
|
-
end
|
83
|
-
|
84
|
-
describe :timeout do
|
85
|
-
it 'sets the delay' do
|
86
|
-
c = Arachni::Element::Link.new( @url + '/true', @inputs.merge( mili: true ) )
|
87
|
-
c.auditor = @auditor
|
88
|
-
c.disable_deduplication
|
89
|
-
c.opts[:skip_like] = proc { |m| m.altered == 'multi' }
|
90
|
-
|
91
|
-
c.timeout_analysis( '__TIME__', @timeout_opts.merge( timeout: 2000 ) )
|
92
|
-
@run.call
|
93
|
-
|
94
|
-
issues.should be_any
|
95
|
-
issues.first.injected.should == '8000'
|
96
|
-
end
|
97
|
-
end
|
98
|
-
|
99
|
-
describe :timeout_divider do
|
100
|
-
it 'modifies the final timeout value' do
|
101
|
-
@positive.timeout_analysis( '__TIME__',
|
102
|
-
@timeout_opts.merge(
|
103
|
-
timeout_divider: 1000,
|
104
|
-
timeout: 2000
|
105
|
-
)
|
106
|
-
)
|
107
|
-
@run.call
|
108
|
-
|
109
|
-
issues.should be_any
|
110
|
-
issues.first.injected.should == '8'
|
111
|
-
end
|
112
|
-
end
|
113
|
-
|
114
|
-
describe :add do
|
115
|
-
it 'adds the given integer to the expected webapp delay' do
|
116
|
-
c = Arachni::Element::Link.new( @url + '/add', @inputs )
|
117
|
-
c.auditor = @auditor
|
118
|
-
c.disable_deduplication
|
119
|
-
|
120
|
-
c.timeout_analysis(
|
121
|
-
'__TIME__',
|
122
|
-
@timeout_opts.merge( timeout: 3000, timeout_divider: 1000, add: -1000 )
|
123
|
-
)
|
124
|
-
@run.call
|
125
|
-
|
126
|
-
issues.should be_any
|
127
|
-
issues.first.response.should == '11'
|
128
|
-
end
|
129
|
-
end
|
130
|
-
|
131
|
-
context 'when a page has a high response time' do
|
132
|
-
before do
|
133
|
-
@delay_opts = {
|
134
|
-
timeout_divider: 1000,
|
135
|
-
timeout: 4000
|
136
|
-
}.merge( @timeout_opts )
|
137
|
-
end
|
138
|
-
|
139
|
-
context 'but isn\'t vulnerable' do
|
140
|
-
it 'does not log an issue' do
|
141
|
-
@negative.timeout_analysis( '__TIME__', @delay_opts )
|
142
|
-
@run.call
|
143
|
-
issues.should be_empty
|
144
|
-
end
|
145
|
-
end
|
146
|
-
|
147
|
-
context 'and is vulnerable' do
|
148
|
-
it 'logs an issue' do
|
149
|
-
@positive_high_res.timeout_analysis( '__TIME__', @delay_opts )
|
150
|
-
@run.call
|
151
|
-
issues.should be_any
|
152
|
-
end
|
153
|
-
end
|
154
|
-
end
|
155
|
-
end
|
156
|
-
|
157
|
-
end
|
@@ -1,284 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe Arachni::Element::Capabilities::Mutable do
|
4
|
-
before( :all ) do
|
5
|
-
@inputs = { 'another_param_name' => 'another_param_value' }
|
6
|
-
@seed = 'my_seed'
|
7
|
-
@mutable = Arachni::Element::Link.new( 'http://test.com', inputs: @inputs )
|
8
|
-
end
|
9
|
-
|
10
|
-
describe '#original?' do
|
11
|
-
context 'when the element has not been mutated' do
|
12
|
-
it 'returns true' do
|
13
|
-
e = Arachni::Element::Link.new( 'http://test.com', inputs: @inputs )
|
14
|
-
e.original?.should be_true
|
15
|
-
end
|
16
|
-
end
|
17
|
-
context 'when the element has been mutated' do
|
18
|
-
it 'returns false' do
|
19
|
-
e = Arachni::Element::Link.new( 'http://test.com', inputs: @inputs )
|
20
|
-
e.mutations( @seed ).first.original?.should be_false
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
describe '#mutated?' do
|
26
|
-
context 'when the element has not been mutated' do
|
27
|
-
it 'returns true' do
|
28
|
-
e = Arachni::Element::Link.new( 'http://test.com', inputs: @inputs )
|
29
|
-
e.mutated?.should be_false
|
30
|
-
end
|
31
|
-
end
|
32
|
-
context 'when the element has been mutated' do
|
33
|
-
it 'returns false' do
|
34
|
-
e = Arachni::Element::Link.new( 'http://test.com', inputs: @inputs )
|
35
|
-
e.mutations( @seed ).first.mutated?.should be_true
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
describe '#altered_value' do
|
41
|
-
it 'returns the value of the altered input' do
|
42
|
-
e = Arachni::Element::Link.new( 'http://test.com', inputs: @inputs )
|
43
|
-
elem = e.mutations_for( @seed ).first
|
44
|
-
elem.altered_value.should == @seed
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
describe '#altered_value=' do
|
49
|
-
it 'sets the value of the altered input' do
|
50
|
-
e = Arachni::Element::Link.new( 'http://test.com', inputs: @inputs )
|
51
|
-
elem = e.mutations_for( @seed ).first
|
52
|
-
elem.altered_value = 'stuff'
|
53
|
-
elem.altered_value.should == 'stuff'
|
54
|
-
elem.auditable.values.first.should == 'stuff'
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
describe '#mutations' do
|
59
|
-
it 'aliased to #mutations_for' do
|
60
|
-
e = Arachni::Element::Link.new( 'http://test.com', inputs: @inputs )
|
61
|
-
e.mutations_for( @seed ).should == e.mutations( @seed )
|
62
|
-
end
|
63
|
-
it 'aliased to #permutations' do
|
64
|
-
e = Arachni::Element::Link.new( 'http://test.com', inputs: @inputs )
|
65
|
-
e.permutations( @seed ).should == e.mutations( @seed )
|
66
|
-
end
|
67
|
-
it 'aliased to #permutations_for' do
|
68
|
-
e = Arachni::Element::Link.new( 'http://test.com', inputs: @inputs )
|
69
|
-
e.permutations_for( @seed ).should == e.mutations( @seed )
|
70
|
-
end
|
71
|
-
|
72
|
-
it 'mutates #auditable' do
|
73
|
-
e = Arachni::Element::Link.new( 'http://test.com', inputs: @inputs )
|
74
|
-
e.mutations( @seed ).each do |m|
|
75
|
-
e.url.should == m.url
|
76
|
-
e.action.should == m.action
|
77
|
-
e.auditable.should_not == m.auditable
|
78
|
-
end
|
79
|
-
end
|
80
|
-
|
81
|
-
it 'sets #altered to the name of the fuzzed input' do
|
82
|
-
e = Arachni::Element::Link.new( 'http://test.com', inputs: @inputs )
|
83
|
-
|
84
|
-
checked = false
|
85
|
-
e.mutations( @seed ).each do |m|
|
86
|
-
e.url.should == m.url
|
87
|
-
e.action.should == m.action
|
88
|
-
e.altered.should_not == m.altered
|
89
|
-
m.auditable[m.altered].should include @seed
|
90
|
-
|
91
|
-
checked = true
|
92
|
-
end
|
93
|
-
|
94
|
-
checked.should be_true
|
95
|
-
end
|
96
|
-
|
97
|
-
context 'with no options' do
|
98
|
-
it 'returns all combinatios' do
|
99
|
-
inputs = { inputs: {
|
100
|
-
'param_name' => 'param_value',
|
101
|
-
'email' => nil
|
102
|
-
}
|
103
|
-
}
|
104
|
-
Arachni::Element::Link.new( 'http://test.com', inputs )
|
105
|
-
.mutations( @seed ).size.should == 8
|
106
|
-
end
|
107
|
-
end
|
108
|
-
|
109
|
-
describe '#immutables' do
|
110
|
-
it 'skips parameters contained parameters' do
|
111
|
-
l = Arachni::Element::Link.new( 'http://test.com',
|
112
|
-
inputs: {
|
113
|
-
'input_one' => 'value 1',
|
114
|
-
'input_two' => 'value 2'
|
115
|
-
}
|
116
|
-
)
|
117
|
-
l.immutables << 'input_one'
|
118
|
-
l.mutations( @seed ).reject { |e| e.altered != 'input_one' }
|
119
|
-
.should be_empty
|
120
|
-
|
121
|
-
l.immutables.clear
|
122
|
-
l.mutations( @seed ).reject { |e| e.altered != 'input_one' }
|
123
|
-
.should be_any
|
124
|
-
end
|
125
|
-
end
|
126
|
-
|
127
|
-
context 'with option' do
|
128
|
-
describe :respect_method do
|
129
|
-
describe true do
|
130
|
-
it 'does not fuzz methods' do
|
131
|
-
e = Arachni::Element::Form.new( 'http://test.com',
|
132
|
-
inputs: {
|
133
|
-
'input_one' => 'value 1',
|
134
|
-
'input_two' => 'value 2'
|
135
|
-
}
|
136
|
-
)
|
137
|
-
|
138
|
-
respect_method = e.mutations( @seed, respect_method: true )
|
139
|
-
respect_method.size.should == 9
|
140
|
-
|
141
|
-
respect_method.map{ |m| m.method }.uniq.should == [e.method]
|
142
|
-
end
|
143
|
-
end
|
144
|
-
describe false do
|
145
|
-
it 'fuzzes methods' do
|
146
|
-
e = Arachni::Element::Form.new( 'http://test.com',
|
147
|
-
inputs: {
|
148
|
-
'input_one' => 'value 1',
|
149
|
-
'input_two' => 'value 2'
|
150
|
-
}
|
151
|
-
)
|
152
|
-
|
153
|
-
no_respect_method = e.mutations( @seed, respect_method: false )
|
154
|
-
no_respect_method.size.should == 17
|
155
|
-
|
156
|
-
no_respect_method.map{ |m| m.method }.uniq.size.should == 2
|
157
|
-
end
|
158
|
-
it 'generates mutations with POST' do
|
159
|
-
inputs = { inputs: { 'param_name' => 'param_value' } }
|
160
|
-
e = Arachni::Element::Form.new( 'http://test.com', inputs )
|
161
|
-
m = e.mutations( 'stuff', respect_method: false )
|
162
|
-
m.size.should == 9
|
163
|
-
|
164
|
-
m.select { |f| f.method.to_s.downcase == 'post' }.size.should == 4
|
165
|
-
end
|
166
|
-
|
167
|
-
it 'generates mutations with GET' do
|
168
|
-
inputs = { inputs: { 'param_name' => 'param_value' } }
|
169
|
-
e = Arachni::Element::Form.new( 'http://test.com', inputs )
|
170
|
-
m = e.mutations( 'stuff', respect_method: false )
|
171
|
-
m.size.should == 9
|
172
|
-
|
173
|
-
m.select { |f| f.method.to_s.downcase == 'get' }.size.should ==
|
174
|
-
m.select { |f| f.method.to_s.downcase == 'post' }.size + 1
|
175
|
-
end
|
176
|
-
end
|
177
|
-
describe 'nil' do
|
178
|
-
it 'does not fuzz methods' do
|
179
|
-
e = Arachni::Element::Form.new( 'http://test.com',
|
180
|
-
inputs: {
|
181
|
-
'input_one' => 'value 1',
|
182
|
-
'input_two' => 'value 2'
|
183
|
-
}
|
184
|
-
)
|
185
|
-
|
186
|
-
respect_method = e.mutations( @seed )
|
187
|
-
respect_method.size.should == 9
|
188
|
-
|
189
|
-
respect_method.map{ |m| m.method }.uniq.should == [e.method]
|
190
|
-
end
|
191
|
-
end
|
192
|
-
end
|
193
|
-
describe 'Options.fuzz_methods' do
|
194
|
-
it 'serves as the default value of :respect_method' do
|
195
|
-
e = Arachni::Element::Form.new( 'http://test.com',
|
196
|
-
inputs: {
|
197
|
-
'input_one' => 'value 1',
|
198
|
-
'input_two' => 'value 2'
|
199
|
-
}
|
200
|
-
)
|
201
|
-
|
202
|
-
Arachni::Options.fuzz_methods = true
|
203
|
-
no_respect_method = e.mutations( @seed )
|
204
|
-
no_respect_method.size.should == 17
|
205
|
-
|
206
|
-
no_respect_method.map{ |m| m.method }.uniq.size.should == 2
|
207
|
-
|
208
|
-
Arachni::Options.fuzz_methods = false
|
209
|
-
respect_method = e.mutations( @seed )
|
210
|
-
respect_method.size.should == 9
|
211
|
-
|
212
|
-
respect_method.map{ |m| m.method }.uniq.should == [e.method]
|
213
|
-
|
214
|
-
end
|
215
|
-
end
|
216
|
-
|
217
|
-
describe :skip do
|
218
|
-
it 'skips mutation of parameters with these names' do
|
219
|
-
Arachni::Element::Form.new( 'http://test.com',
|
220
|
-
inputs: {
|
221
|
-
'input_one' => 'value 1',
|
222
|
-
'input_two' => 'value 2'
|
223
|
-
}
|
224
|
-
).mutations( @seed, skip: [ 'input_one' ] )
|
225
|
-
end
|
226
|
-
end
|
227
|
-
describe :param_flip do
|
228
|
-
it 'uses the seed as a param name' do
|
229
|
-
m = @mutable.mutations( @seed,
|
230
|
-
format: [Arachni::Element::Capabilities::Mutable::Format::STRAIGHT],
|
231
|
-
param_flip: true ).last
|
232
|
-
m.auditable[@seed].should be_true
|
233
|
-
end
|
234
|
-
end
|
235
|
-
describe :format do
|
236
|
-
describe 'Format::STRAIGHT' do
|
237
|
-
it 'injects the seed as is' do
|
238
|
-
m = @mutable.mutations( @seed,
|
239
|
-
format: [Arachni::Element::Capabilities::Mutable::Format::STRAIGHT] ).first
|
240
|
-
m.auditable[m.altered].should == @seed
|
241
|
-
end
|
242
|
-
end
|
243
|
-
describe 'Format::APPEND' do
|
244
|
-
it 'appends the seed to the current value' do
|
245
|
-
m = @mutable.mutations( @seed,
|
246
|
-
format: [Arachni::Element::Capabilities::Mutable::Format::APPEND] ).first
|
247
|
-
m.auditable[m.altered].should == @inputs[m.altered] + @seed
|
248
|
-
end
|
249
|
-
end
|
250
|
-
describe 'Format::NULL' do
|
251
|
-
it 'terminates the string with a null character' do
|
252
|
-
m = @mutable.mutations( @seed,
|
253
|
-
format: [Arachni::Element::Capabilities::Mutable::Format::NULL] ).first
|
254
|
-
m.auditable[m.altered].should == @seed + "\0"
|
255
|
-
end
|
256
|
-
end
|
257
|
-
describe 'Format::SEMICOLON' do
|
258
|
-
it 'prepends the seed with a semicolon' do
|
259
|
-
m = @mutable.mutations( @seed,
|
260
|
-
format: [Arachni::Element::Capabilities::Mutable::Format::SEMICOLON] ).first
|
261
|
-
m.auditable[m.altered].should == ';' + @seed
|
262
|
-
end
|
263
|
-
end
|
264
|
-
describe 'Format::APPEND | Format::NULL' do
|
265
|
-
it 'appends the seed and terminate the string with a null character' do
|
266
|
-
format = [Arachni::Element::Capabilities::Mutable::Format::APPEND |
|
267
|
-
Arachni::Element::Capabilities::Mutable::Format::NULL]
|
268
|
-
m = @mutable.mutations( @seed, format: format ).first
|
269
|
-
m.auditable[m.altered].should == @inputs[m.altered] + @seed + "\0"
|
270
|
-
end
|
271
|
-
end
|
272
|
-
end
|
273
|
-
end
|
274
|
-
end
|
275
|
-
|
276
|
-
describe '#altered' do
|
277
|
-
it 'returns the name of the mutated input' do
|
278
|
-
m = @mutable.mutations( @seed,
|
279
|
-
format: [Arachni::Element::Capabilities::Mutable::Format::STRAIGHT] ).first
|
280
|
-
m.auditable[m.altered].should_not == @inputs[m.altered]
|
281
|
-
end
|
282
|
-
end
|
283
|
-
|
284
|
-
end
|
data/spec/arachni/http_spec.rb
DELETED
@@ -1,962 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe Arachni::HTTP do
|
4
|
-
|
5
|
-
before( :all ) do
|
6
|
-
@opts = Arachni::Options.instance
|
7
|
-
@http = Arachni::HTTP
|
8
|
-
@url = web_server_url_for( :http )
|
9
|
-
end
|
10
|
-
before( :each ){
|
11
|
-
@opts.reset
|
12
|
-
@opts.audit_links = true
|
13
|
-
@opts.url = @url
|
14
|
-
@http.reset
|
15
|
-
}
|
16
|
-
|
17
|
-
it 'supports gzip content-encoding' do
|
18
|
-
body = nil
|
19
|
-
@http.get( @opts.url + 'gzip' ) { |res| body = res.body }
|
20
|
-
@http.run
|
21
|
-
body.should == 'success'
|
22
|
-
end
|
23
|
-
|
24
|
-
it 'preserves set-cookies' do
|
25
|
-
body = nil
|
26
|
-
@http.get( @opts.url + 'set_and_preserve_cookies', update_cookies: true )
|
27
|
-
@http.run
|
28
|
-
@http.cookies.first.value.should == "=stuf \00 here=="
|
29
|
-
@http.get( @opts.url + 'cookies' ) { |res| body = res.body }
|
30
|
-
@http.run
|
31
|
-
body.should == "stuff==stuf \00 here=="
|
32
|
-
end
|
33
|
-
|
34
|
-
describe 'Arachni::Options#http_req_limit' do
|
35
|
-
context Integer do
|
36
|
-
it 'uses it as a max_concurrency' do
|
37
|
-
@opts.http_req_limit = 34
|
38
|
-
@http.reset
|
39
|
-
@http.max_concurrency.should == 34
|
40
|
-
end
|
41
|
-
end
|
42
|
-
context 'nil' do
|
43
|
-
it 'uses a default max concurrency setting' do
|
44
|
-
@opts.http_req_limit = nil
|
45
|
-
@http.reset
|
46
|
-
@http.max_concurrency.should == Arachni::HTTP::MAX_CONCURRENCY
|
47
|
-
end
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
|
-
describe 'Arachni::Options#http_timeout' do
|
52
|
-
context Integer do
|
53
|
-
it 'uses it as an HTTP timeout' do
|
54
|
-
@opts.http_timeout = 10000000000
|
55
|
-
timed_out = false
|
56
|
-
@http.request( @url + '/sleep' ) { |res| timed_out = res.timed_out? }
|
57
|
-
@http.run
|
58
|
-
timed_out.should be_false
|
59
|
-
|
60
|
-
@opts.http_timeout = 1
|
61
|
-
@http.reset
|
62
|
-
timed_out = false
|
63
|
-
@http.request( @url + '/sleep' ) { |res| timed_out = res.timed_out? }
|
64
|
-
@http.run
|
65
|
-
timed_out.should be_true
|
66
|
-
end
|
67
|
-
end
|
68
|
-
context 'nil' do
|
69
|
-
it 'uses a default timeout setting' do
|
70
|
-
timed_out = false
|
71
|
-
@http.request( @url + '/sleep' ) { |res| timed_out = res.timed_out? }
|
72
|
-
@http.run
|
73
|
-
timed_out.should be_false
|
74
|
-
end
|
75
|
-
end
|
76
|
-
end
|
77
|
-
|
78
|
-
describe 'Arachni::Options#url' do
|
79
|
-
context 'when the target URL includes auth credentials' do
|
80
|
-
it 'uses them globally' do
|
81
|
-
url = Arachni::Module::Utilities.uri_parse( web_server_url_for( :http_auth ) )
|
82
|
-
@opts.url = url.to_s
|
83
|
-
|
84
|
-
# first fail to make sure that our test server is actually working properly
|
85
|
-
code = 0
|
86
|
-
@http.get( @opts.url + 'auth' ) { |res| code = res.code }
|
87
|
-
@http.run
|
88
|
-
code.should == 401
|
89
|
-
|
90
|
-
# now test the client
|
91
|
-
url.user = 'username'
|
92
|
-
url.password = 'password'
|
93
|
-
@opts.url = url.to_s
|
94
|
-
|
95
|
-
body = nil
|
96
|
-
@http.get( @opts.url + 'auth' ) { |res| body = res.body }
|
97
|
-
@http.run
|
98
|
-
body.should == 'authenticated!'
|
99
|
-
end
|
100
|
-
end
|
101
|
-
end
|
102
|
-
|
103
|
-
describe 'Arachni::Options#http_username and Arachni::Options#http_password' do
|
104
|
-
it 'uses them globally' do
|
105
|
-
url = web_server_url_for( :http_auth )
|
106
|
-
@opts.url = url.to_s
|
107
|
-
|
108
|
-
Arachni::Options.http_username = 'username1'
|
109
|
-
Arachni::Options.http_password = 'password1'
|
110
|
-
@http.reset
|
111
|
-
|
112
|
-
# first fail to make sure that our test server is actually working properly
|
113
|
-
code = 0
|
114
|
-
@http.get( @opts.url + 'auth' ) { |res| code = res.code }
|
115
|
-
@http.run
|
116
|
-
code.should == 401
|
117
|
-
|
118
|
-
Arachni::Options.http_username = 'username'
|
119
|
-
Arachni::Options.http_password = 'password'
|
120
|
-
@http.reset
|
121
|
-
|
122
|
-
response = nil
|
123
|
-
@http.get( @opts.url + 'auth' ) { |res| response = res }
|
124
|
-
@http.run
|
125
|
-
response.code.should == 200
|
126
|
-
response.body.should == 'authenticated!'
|
127
|
-
end
|
128
|
-
end
|
129
|
-
|
130
|
-
describe 'Arachni::Options#user_agent' do
|
131
|
-
it 'uses the default user-agent setting' do
|
132
|
-
body = nil
|
133
|
-
@http.get( @opts.url + 'user-agent' ) { |res| body = res.body }
|
134
|
-
@http.run
|
135
|
-
|
136
|
-
body.should == @opts.user_agent
|
137
|
-
@opts.user_agent.should == Arachni::Options::USER_AGENT
|
138
|
-
end
|
139
|
-
context String do
|
140
|
-
it 'uses it as a user-agent' do
|
141
|
-
ua = 'my user agent'
|
142
|
-
@opts.user_agent = ua.dup
|
143
|
-
@http.reset
|
144
|
-
|
145
|
-
body = nil
|
146
|
-
@http.get( @opts.url + 'user-agent' ) { |res| body = res.body }
|
147
|
-
@http.run
|
148
|
-
body.should == ua
|
149
|
-
end
|
150
|
-
end
|
151
|
-
context 'nil' do
|
152
|
-
it 'uses an empty user-agent string' do
|
153
|
-
@opts.user_agent = nil
|
154
|
-
@http.reset
|
155
|
-
|
156
|
-
body = nil
|
157
|
-
@http.get( @opts.url + 'user-agent' ) { |res| body = res.body }
|
158
|
-
@http.run
|
159
|
-
body.should be_empty
|
160
|
-
@opts.user_agent.should be_nil
|
161
|
-
end
|
162
|
-
end
|
163
|
-
end
|
164
|
-
|
165
|
-
describe 'Arachni::Options#redirect_limit' do
|
166
|
-
context Integer do
|
167
|
-
it 'should not exceed that amount of redirects' do
|
168
|
-
@opts.redirect_limit = 2
|
169
|
-
@http.reset
|
170
|
-
|
171
|
-
code = nil
|
172
|
-
@http.get( @opts.url + 'redirect', follow_location: true ) { |res| code = res.code }
|
173
|
-
@http.run
|
174
|
-
code.should == 302
|
175
|
-
|
176
|
-
@opts.redirect_limit = 10
|
177
|
-
@http.reset
|
178
|
-
|
179
|
-
body = nil
|
180
|
-
@http.get( @opts.url + 'redirect', follow_location: true ) { |res| body = res.body }
|
181
|
-
@http.run
|
182
|
-
body.should == 'This is the end.'
|
183
|
-
end
|
184
|
-
end
|
185
|
-
context 'nil' do
|
186
|
-
it 'uses a default setting and update the global setting' do
|
187
|
-
@opts.redirect_limit = nil
|
188
|
-
@http.reset
|
189
|
-
|
190
|
-
body = nil
|
191
|
-
@http.get( @opts.url + 'redirect', follow_location: true ) { |res| body = res.body }
|
192
|
-
@http.run
|
193
|
-
body.should == 'This is the end.'
|
194
|
-
|
195
|
-
@opts.redirect_limit.should == Arachni::HTTP::REDIRECT_LIMIT
|
196
|
-
end
|
197
|
-
end
|
198
|
-
end
|
199
|
-
|
200
|
-
describe '#sandbox' do
|
201
|
-
it 'preserves state, runs the block and then restores state' do
|
202
|
-
@http.cookies.should be_empty
|
203
|
-
@http.get( @opts.url + 'set_and_preserve_cookies', update_cookies: true )
|
204
|
-
@http.run
|
205
|
-
@http.cookies.should be_any
|
206
|
-
|
207
|
-
headers = @http.headers.dup
|
208
|
-
|
209
|
-
signals = []
|
210
|
-
@http.add_on_complete do |r|
|
211
|
-
signals << :out
|
212
|
-
end
|
213
|
-
|
214
|
-
@http.get( @opts.url + 'out', async: false )
|
215
|
-
@http.sandbox do
|
216
|
-
@http.cookies.should be_any
|
217
|
-
@http.cookie_jar.clear
|
218
|
-
@http.cookies.should be_empty
|
219
|
-
|
220
|
-
@http.headers.should == headers
|
221
|
-
@http.headers['X-Custom'] = 'stuff'
|
222
|
-
@http.headers.include?( 'X-Custom' ).should be_true
|
223
|
-
|
224
|
-
@http.add_on_complete do |r|
|
225
|
-
signals << :in
|
226
|
-
end
|
227
|
-
|
228
|
-
@http.get( @opts.url + 'in', async: false )
|
229
|
-
@http.run
|
230
|
-
end
|
231
|
-
@http.get( @opts.url + 'out', async: false )
|
232
|
-
|
233
|
-
signals.delete( :out )
|
234
|
-
signals.size.should == 1
|
235
|
-
|
236
|
-
@http.headers.include?( 'X-Custom' ).should be_false
|
237
|
-
@http.cookies.should be_any
|
238
|
-
end
|
239
|
-
end
|
240
|
-
|
241
|
-
describe '#url' do
|
242
|
-
it 'returns the URL in opts' do
|
243
|
-
@http.url.should == @opts.url.to_s
|
244
|
-
end
|
245
|
-
end
|
246
|
-
|
247
|
-
describe '#headers' do
|
248
|
-
it 'provides access to default headers' do
|
249
|
-
headers = @http.headers
|
250
|
-
headers['Accept'].should == 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
|
251
|
-
headers['User-Agent'].should == 'Arachni/v' + Arachni::VERSION
|
252
|
-
end
|
253
|
-
|
254
|
-
context 'when provided with custom headers' do
|
255
|
-
it 'includes them' do
|
256
|
-
@opts.custom_headers = {
|
257
|
-
'User-Agent' => 'My UA',
|
258
|
-
'From' => 'Some dude',
|
259
|
-
}
|
260
|
-
@http.reset
|
261
|
-
headers = @http.headers
|
262
|
-
headers['From'].should == @opts.custom_headers['From']
|
263
|
-
headers['Accept'].should == 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
|
264
|
-
headers['User-Agent'].should == @opts.custom_headers['User-Agent']
|
265
|
-
end
|
266
|
-
end
|
267
|
-
|
268
|
-
context 'when the authed_by option is set' do
|
269
|
-
it 'includes it in the From field' do
|
270
|
-
@opts.authed_by = 'The Dude'
|
271
|
-
@http.reset
|
272
|
-
@http.headers['From'].should == @opts.authed_by
|
273
|
-
end
|
274
|
-
end
|
275
|
-
|
276
|
-
end
|
277
|
-
|
278
|
-
describe '#cookie_jar' do
|
279
|
-
it 'provides access to the Cookie-jar' do
|
280
|
-
@http.cookie_jar.is_a?( Arachni::HTTP::CookieJar ).should be_true
|
281
|
-
end
|
282
|
-
|
283
|
-
context 'when the cookie_jar option is set' do
|
284
|
-
it 'adds the contained cookies to the CookieJar' do
|
285
|
-
@opts.cookie_jar = fixtures_path + 'cookies.txt'
|
286
|
-
@http.cookie_jar.cookies.should be_empty
|
287
|
-
@http.reset
|
288
|
-
cookies = @http.cookie_jar.cookies
|
289
|
-
cookies.size.should == 4
|
290
|
-
cookies.should == Arachni::Module::Utilities.cookies_from_file( '', @opts.cookie_jar )
|
291
|
-
end
|
292
|
-
context 'but the path is invalid' do
|
293
|
-
it 'raises Arachni::HTTP::CookieJar::Error::CookieJarFileNotFound' do
|
294
|
-
@opts.cookie_jar = fixtures_path + 'cookies.does_not_exist.txt'
|
295
|
-
expect{ @http.reset }.to raise_error Arachni::HTTP::CookieJar::Error::CookieJarFileNotFound
|
296
|
-
end
|
297
|
-
end
|
298
|
-
end
|
299
|
-
|
300
|
-
context 'when the cookies option is set' do
|
301
|
-
it 'adds those cookies to the CookieJar' do
|
302
|
-
cookie_jar_file = fixtures_path + 'cookies.txt'
|
303
|
-
@opts.cookies = Arachni::Module::Utilities.cookies_from_file( '', cookie_jar_file )
|
304
|
-
@http.cookie_jar.cookies.should be_empty
|
305
|
-
@http.reset
|
306
|
-
cookies = @http.cookie_jar.cookies
|
307
|
-
cookies.size.should == 4
|
308
|
-
cookies.should == @opts.cookies
|
309
|
-
end
|
310
|
-
end
|
311
|
-
|
312
|
-
context 'when the cookie_string option is set' do
|
313
|
-
it 'parses the string and add those cookies to the CookieJar' do
|
314
|
-
@opts.cookie_string = 'my_cookie_name=val1;blah_name=val2; stuff=%25blah; another_name=another_val'
|
315
|
-
@http.cookie_jar.cookies.should be_empty
|
316
|
-
@http.reset
|
317
|
-
cookies = @http.cookie_jar.cookies
|
318
|
-
cookies.size.should == 4
|
319
|
-
cookies.first.name.should == 'my_cookie_name'
|
320
|
-
cookies.first.value.should == 'val1'
|
321
|
-
cookies[1].name.should == 'blah_name'
|
322
|
-
cookies[1].value.should == 'val2'
|
323
|
-
cookies[2].name.should == 'stuff'
|
324
|
-
cookies[2].value.should == '%blah'
|
325
|
-
cookies.last.name.should == 'another_name'
|
326
|
-
cookies.last.value.should == 'another_val'
|
327
|
-
end
|
328
|
-
end
|
329
|
-
end
|
330
|
-
|
331
|
-
describe '#cookies' do
|
332
|
-
it 'returns the current cookies' do
|
333
|
-
@opts.cookie_string = 'my_cookie_name=val1;blah_name=val2; another_name=another_val'
|
334
|
-
@http.cookie_jar.cookies.should be_empty
|
335
|
-
@http.reset
|
336
|
-
@http.cookies.size.should == 3
|
337
|
-
@http.cookies.should == @http.cookie_jar.cookies
|
338
|
-
end
|
339
|
-
end
|
340
|
-
|
341
|
-
describe '#after_run' do
|
342
|
-
it 'sets blocks to be called after #run' do
|
343
|
-
called = false
|
344
|
-
@http.after_run { called = true }
|
345
|
-
@http.run
|
346
|
-
called.should be_true
|
347
|
-
|
348
|
-
called = false
|
349
|
-
@http.run
|
350
|
-
called.should be_false
|
351
|
-
end
|
352
|
-
|
353
|
-
context 'when the callback creates new requests and nested callbacks' do
|
354
|
-
it 'run these too' do
|
355
|
-
called = false
|
356
|
-
@http.after_run do
|
357
|
-
@http.after_run { called = true }
|
358
|
-
end
|
359
|
-
@http.run
|
360
|
-
called.should be_false
|
361
|
-
|
362
|
-
called = false
|
363
|
-
@http.after_run do
|
364
|
-
@http.get
|
365
|
-
@http.after_run { called = true }
|
366
|
-
end
|
367
|
-
@http.run
|
368
|
-
called.should be_true
|
369
|
-
|
370
|
-
called = false
|
371
|
-
@http.run
|
372
|
-
called.should be_false
|
373
|
-
end
|
374
|
-
end
|
375
|
-
end
|
376
|
-
|
377
|
-
describe '#run' do
|
378
|
-
it 'performs the queues requests' do
|
379
|
-
@http.run
|
380
|
-
end
|
381
|
-
|
382
|
-
|
383
|
-
it 'calls the after_run_persistent callbacks EVERY TIME' do
|
384
|
-
called = false
|
385
|
-
@http.after_run_persistent { called = true }
|
386
|
-
@http.run
|
387
|
-
called.should be_true
|
388
|
-
called = false
|
389
|
-
@http.run
|
390
|
-
called.should be_true
|
391
|
-
end
|
392
|
-
|
393
|
-
it 'calculates the burst average response time' do
|
394
|
-
@http.run
|
395
|
-
@http.burst_runtime.should > 0
|
396
|
-
end
|
397
|
-
|
398
|
-
it 'updates curr_res_time, curr_res_cnt, average_res_time and curr_res_per_second' +
|
399
|
-
' during runtime and resets them afterwards' do
|
400
|
-
@http.curr_res_time.should == 0
|
401
|
-
@http.curr_res_cnt.should == 0
|
402
|
-
@http.average_res_time.should == 0
|
403
|
-
@http.curr_res_per_second.should == 0
|
404
|
-
|
405
|
-
curr_res_cnt = 0
|
406
|
-
curr_res_time = 0
|
407
|
-
average_res_time = 0
|
408
|
-
curr_res_per_second = 0
|
409
|
-
20.times{
|
410
|
-
@http.get {
|
411
|
-
curr_res_time = @http.curr_res_time
|
412
|
-
curr_res_cnt = @http.curr_res_cnt
|
413
|
-
average_res_time = @http.average_res_time
|
414
|
-
curr_res_per_second = @http.curr_res_per_second
|
415
|
-
}
|
416
|
-
}
|
417
|
-
@http.run
|
418
|
-
curr_res_time.should > 0
|
419
|
-
curr_res_cnt.should > 0
|
420
|
-
average_res_time.should > 0
|
421
|
-
curr_res_per_second.should > 0
|
422
|
-
@http.curr_res_time.should == 0
|
423
|
-
@http.curr_res_cnt.should == 0
|
424
|
-
end
|
425
|
-
end
|
426
|
-
|
427
|
-
describe '#abort' do
|
428
|
-
it 'aborts the running requests on a best effort basis' do
|
429
|
-
cnt = 0
|
430
|
-
n = 50
|
431
|
-
n.times do |i|
|
432
|
-
@http.get {
|
433
|
-
cnt += 1
|
434
|
-
@http.abort
|
435
|
-
}
|
436
|
-
end
|
437
|
-
@http.run
|
438
|
-
cnt.should < n
|
439
|
-
end
|
440
|
-
end
|
441
|
-
|
442
|
-
describe '#max_concurrency' do
|
443
|
-
it 'defaults to 20' do
|
444
|
-
@http.max_concurrency.should == 20
|
445
|
-
end
|
446
|
-
it 'respects the http_req_limit option' do
|
447
|
-
@opts.http_req_limit = 50
|
448
|
-
@http.reset
|
449
|
-
@http.max_concurrency.should == 50
|
450
|
-
end
|
451
|
-
end
|
452
|
-
|
453
|
-
describe '#max_concurrency=' do
|
454
|
-
it 'sets the max_concurrency setting' do
|
455
|
-
@http.max_concurrency.should_not == 30
|
456
|
-
@http.max_concurrency = 30
|
457
|
-
@http.max_concurrency.should == 30
|
458
|
-
end
|
459
|
-
end
|
460
|
-
|
461
|
-
describe '#request' do
|
462
|
-
it 'uses the URL in Arachni::Options.instance.url as a default' do
|
463
|
-
url = nil
|
464
|
-
@http.request{ |res| url = res.effective_url }
|
465
|
-
@http.run
|
466
|
-
url.start_with?( @opts.url.to_s ).should be_true
|
467
|
-
end
|
468
|
-
it 'raises exception when no URL is available' do
|
469
|
-
@opts.reset
|
470
|
-
@http.reset
|
471
|
-
expect { @http.request }.to raise_error
|
472
|
-
end
|
473
|
-
|
474
|
-
describe :no_cookiejar do
|
475
|
-
context true do
|
476
|
-
it 'skips the cookie-jar' do
|
477
|
-
body = nil
|
478
|
-
@http.request( @url + '/cookies', no_cookiejar: true ) { |res| body = res.body }
|
479
|
-
@http.run
|
480
|
-
body.should == ''
|
481
|
-
end
|
482
|
-
end
|
483
|
-
context false do
|
484
|
-
it 'uses the cookiejar' do
|
485
|
-
@opts.cookie_string = 'my_cookie_name=val1;blah_name=val2;another_name=another_val'
|
486
|
-
@http.cookie_jar.cookies.should be_empty
|
487
|
-
@http.reset
|
488
|
-
|
489
|
-
body = nil
|
490
|
-
|
491
|
-
@http.request( @url + '/cookies', no_cookiejar: false ) { |res| body = res.body }
|
492
|
-
@http.run
|
493
|
-
body.should == @opts.cookie_string
|
494
|
-
end
|
495
|
-
context 'when custom cookies are provided' do
|
496
|
-
it 'merges them with the cookiejar and override it' do
|
497
|
-
@opts.cookie_string = 'my_cookie_name=val1;blah_name=val2;another_name=another_val'
|
498
|
-
@http.cookie_jar.cookies.should be_empty
|
499
|
-
@http.reset
|
500
|
-
|
501
|
-
body = nil
|
502
|
-
|
503
|
-
custom_cookies = { 'newcookie' => 'newval', 'blah_name' => 'val3' }
|
504
|
-
@http.request( @url + '/cookies', cookies: custom_cookies,
|
505
|
-
no_cookiejar: false ) { |res| body = res.body }
|
506
|
-
@http.run
|
507
|
-
body.should == 'my_cookie_name=val1;blah_name=val3;another_name=another_val;newcookie=newval'
|
508
|
-
end
|
509
|
-
end
|
510
|
-
end
|
511
|
-
context 'nil' do
|
512
|
-
it 'defaults to false' do
|
513
|
-
@opts.cookie_string = 'my_cookie_name=val1;blah_name=val2;another_name=another_val'
|
514
|
-
@http.cookie_jar.cookies.should be_empty
|
515
|
-
@http.reset
|
516
|
-
|
517
|
-
body = nil
|
518
|
-
|
519
|
-
@http.request( @url + '/cookies' ) { |res| body = res.body }
|
520
|
-
@http.run
|
521
|
-
body.should == @opts.cookie_string
|
522
|
-
end
|
523
|
-
end
|
524
|
-
end
|
525
|
-
|
526
|
-
describe :body do
|
527
|
-
it 'uses its value as a request body' do
|
528
|
-
req_body = 'heyaya'
|
529
|
-
body = nil
|
530
|
-
@http.request( @url + '/body', method: :post, body: req_body ) { |res| body = res.body }
|
531
|
-
@http.run
|
532
|
-
body.should == req_body
|
533
|
-
end
|
534
|
-
end
|
535
|
-
|
536
|
-
describe :method do
|
537
|
-
describe 'nil' do
|
538
|
-
it 'performs a GET HTTP request' do
|
539
|
-
body = nil
|
540
|
-
@http.request( @url ) { |res| body = res.body }
|
541
|
-
@http.run
|
542
|
-
body.should == 'GET'
|
543
|
-
end
|
544
|
-
end
|
545
|
-
describe :get do
|
546
|
-
it 'performs a GET HTTP request' do
|
547
|
-
body = nil
|
548
|
-
@http.request( @url, method: :get ) { |res| body = res.body }
|
549
|
-
@http.run
|
550
|
-
body.should == 'GET'
|
551
|
-
end
|
552
|
-
|
553
|
-
context 'when there are both query string and hash params' do
|
554
|
-
it 'merges them while giving priority to the hash params' do
|
555
|
-
body = nil
|
556
|
-
params = {
|
557
|
-
'param1' => 'value1_updated',
|
558
|
-
'param2' => 'value 2'
|
559
|
-
}
|
560
|
-
url = @url + '/echo?param1=value1¶m3=value3'
|
561
|
-
@http.request( url,
|
562
|
-
remove_id: true, params: params, method: :get
|
563
|
-
){ |res| body = res.body }
|
564
|
-
@http.run
|
565
|
-
body.should == params.merge( 'param3' => 'value3' ).to_s
|
566
|
-
end
|
567
|
-
end
|
568
|
-
end
|
569
|
-
describe :post do
|
570
|
-
it 'performs a POST HTTP request' do
|
571
|
-
body = nil
|
572
|
-
@http.request( @url, method: :post ) { |res| body = res.body }
|
573
|
-
@http.run
|
574
|
-
body.should == 'POST'
|
575
|
-
end
|
576
|
-
end
|
577
|
-
describe :put do
|
578
|
-
it 'performs a PUT HTTP request' do
|
579
|
-
body = nil
|
580
|
-
@http.request( @url, method: :put ) { |res| body = res.body }
|
581
|
-
@http.run
|
582
|
-
body.should == 'PUT'
|
583
|
-
end
|
584
|
-
end
|
585
|
-
describe :options do
|
586
|
-
it 'performs a OPTIONS HTTP request' do
|
587
|
-
body = nil
|
588
|
-
@http.request( @url, method: :options ) { |res| body = res.body }
|
589
|
-
@http.run
|
590
|
-
body.should == 'OPTIONS'
|
591
|
-
end
|
592
|
-
end
|
593
|
-
describe :delete do
|
594
|
-
it 'performs a POST HTTP request' do
|
595
|
-
body = nil
|
596
|
-
@http.request( @url, method: :delete ) { |res| body = res.body }
|
597
|
-
@http.run
|
598
|
-
body.should == 'DELETE'
|
599
|
-
end
|
600
|
-
end
|
601
|
-
end
|
602
|
-
describe :params do
|
603
|
-
it 'specifies the query params as a hash' do
|
604
|
-
body = nil
|
605
|
-
params = { 'param' => 'value' }
|
606
|
-
@http.request( @url + '/echo',
|
607
|
-
params: params,
|
608
|
-
remove_id: true
|
609
|
-
) { |res| body = res.body }
|
610
|
-
@http.run
|
611
|
-
params.to_s.should == body
|
612
|
-
end
|
613
|
-
context 'POST' do
|
614
|
-
it 'encodes special characters' do
|
615
|
-
body = nil
|
616
|
-
params = { '% param\ +=&;' => '% value\ +=&;', 'nil' => nil }
|
617
|
-
@http.request( @url + '/echo',
|
618
|
-
method: :post,
|
619
|
-
params: params,
|
620
|
-
remove_id: true
|
621
|
-
) { |res| body = res.body }
|
622
|
-
@http.run
|
623
|
-
body.should == { '% param\ +=&;' => '% value\ +=&;' }.to_s
|
624
|
-
end
|
625
|
-
end
|
626
|
-
|
627
|
-
end
|
628
|
-
|
629
|
-
describe :timeout do
|
630
|
-
describe 'nil' do
|
631
|
-
it 'runs without a timeout' do
|
632
|
-
timed_out = false
|
633
|
-
@http.request( @url + '/sleep' ) { |res| timed_out = res.timed_out? }
|
634
|
-
@http.run
|
635
|
-
timed_out.should be_false
|
636
|
-
end
|
637
|
-
end
|
638
|
-
describe Numeric do
|
639
|
-
it 'sets a timeout value' do
|
640
|
-
timed_out = false
|
641
|
-
@http.request( @url + '/sleep', timeout: 1.3 ) { |res| timed_out = res.timed_out? }
|
642
|
-
@http.run
|
643
|
-
timed_out.should be_true
|
644
|
-
end
|
645
|
-
end
|
646
|
-
end
|
647
|
-
|
648
|
-
describe :cookies do
|
649
|
-
describe 'nil' do
|
650
|
-
it 'uses te cookies in the CookieJar' do
|
651
|
-
@opts.cookie_string = 'my_cookie_name=val1;blah_name=val2;another_name=another_val'
|
652
|
-
@http.cookie_jar.cookies.should be_empty
|
653
|
-
@http.reset
|
654
|
-
|
655
|
-
body = nil
|
656
|
-
@http.request( @url + '/cookies' ) { |res| body = res.body }
|
657
|
-
@http.run
|
658
|
-
body.should == @opts.cookie_string
|
659
|
-
end
|
660
|
-
|
661
|
-
it 'only sends the appropriate cookies for the domain' do
|
662
|
-
cookies = []
|
663
|
-
cookies << Arachni::Element::Cookie.new( 'http://test.com',
|
664
|
-
'key1' => 'val1' )
|
665
|
-
cookies << Arachni::Element::Cookie.new( @url,
|
666
|
-
'key2' => 'val2' )
|
667
|
-
|
668
|
-
@http.cookie_jar.update( cookies )
|
669
|
-
body = nil
|
670
|
-
@http.request( @url + '/cookies' ) { |res| body = res.body }
|
671
|
-
@http.run
|
672
|
-
body.should == 'key2=val2'
|
673
|
-
end
|
674
|
-
end
|
675
|
-
describe Hash do
|
676
|
-
it 'uses the key-value pairs as cookies' do
|
677
|
-
cookies = { 'name' => 'val' }
|
678
|
-
body = nil
|
679
|
-
@http.request( @url + '/cookies', cookies: cookies ) { |res| body = res.body }
|
680
|
-
@http.run
|
681
|
-
body.should == cookies.keys.first.to_s + '=' + cookies.values.first.to_s
|
682
|
-
end
|
683
|
-
end
|
684
|
-
end
|
685
|
-
|
686
|
-
describe :async do
|
687
|
-
describe 'nil' do
|
688
|
-
it 'performs the request asynchronously' do
|
689
|
-
performed = false
|
690
|
-
@http.request( @url ) { performed = true }
|
691
|
-
@http.run
|
692
|
-
performed.should be_true
|
693
|
-
end
|
694
|
-
end
|
695
|
-
describe true do
|
696
|
-
it 'performs the request asynchronously' do
|
697
|
-
performed = false
|
698
|
-
@http.request( @url, async: true ) { performed = true }
|
699
|
-
@http.run
|
700
|
-
performed.should be_true
|
701
|
-
end
|
702
|
-
end
|
703
|
-
describe false do
|
704
|
-
it 'performs the request in blocking mode' do
|
705
|
-
performed = false
|
706
|
-
@http.request( @url, async: false ) { performed = true }
|
707
|
-
performed.should be_true
|
708
|
-
end
|
709
|
-
end
|
710
|
-
end
|
711
|
-
|
712
|
-
describe :headers do
|
713
|
-
describe 'nil' do
|
714
|
-
it 'uses the default headers' do
|
715
|
-
body = nil
|
716
|
-
@http.request( @url + '/headers' ) { |res| body = res.body }
|
717
|
-
@http.run
|
718
|
-
sent_headers = YAML.load( body )
|
719
|
-
@http.headers.each { |k, v| sent_headers[k].should == v }
|
720
|
-
end
|
721
|
-
end
|
722
|
-
|
723
|
-
describe Hash do
|
724
|
-
it 'merges them with the default headers' do
|
725
|
-
headers = { 'My-Header' => 'my value'}
|
726
|
-
body = nil
|
727
|
-
@http.request( @url + '/headers', headers: headers ) { |res| body = res.body }
|
728
|
-
@http.run
|
729
|
-
sent_headers = YAML.load( body )
|
730
|
-
@http.headers.merge( headers ).each { |k, v| sent_headers[k].should == v }
|
731
|
-
end
|
732
|
-
end
|
733
|
-
end
|
734
|
-
|
735
|
-
describe :update_cookies do
|
736
|
-
describe 'nil' do
|
737
|
-
it 'skips the cookiejar' do
|
738
|
-
cookies = []
|
739
|
-
cookies << Arachni::Element::Cookie.new( @url,
|
740
|
-
'key2' => 'val2' )
|
741
|
-
@http.update_cookies( cookies )
|
742
|
-
@http.request( @url + '/update_cookies' )
|
743
|
-
@http.run
|
744
|
-
@http.cookies.should == cookies
|
745
|
-
end
|
746
|
-
end
|
747
|
-
|
748
|
-
describe false do
|
749
|
-
it 'skips the cookiejar' do
|
750
|
-
cookies = []
|
751
|
-
cookies << Arachni::Element::Cookie.new( @url,
|
752
|
-
'key2' => 'val2' )
|
753
|
-
@http.update_cookies( cookies )
|
754
|
-
@http.request( @url + '/update_cookies', update_cookies: false )
|
755
|
-
@http.run
|
756
|
-
@http.cookies.should == cookies
|
757
|
-
end
|
758
|
-
end
|
759
|
-
|
760
|
-
describe true do
|
761
|
-
it 'updates the cookiejar' do
|
762
|
-
cookies = []
|
763
|
-
cookies << Arachni::Element::Cookie.new( @url,
|
764
|
-
'key2' => 'val2' )
|
765
|
-
@http.update_cookies( cookies )
|
766
|
-
@http.request( @url + '/update_cookies', update_cookies: true )
|
767
|
-
@http.run
|
768
|
-
@http.cookies.first.value.should == cookies.first.value + ' [UPDATED!]'
|
769
|
-
end
|
770
|
-
end
|
771
|
-
end
|
772
|
-
|
773
|
-
describe :follow_location do
|
774
|
-
describe 'nil' do
|
775
|
-
it 'ignores redirects' do
|
776
|
-
res = nil
|
777
|
-
@http.request( @url + '/follow_location' ) { |c_res| res = c_res }
|
778
|
-
@http.run
|
779
|
-
res.effective_url.start_with?( @url + '/follow_location' ).should be_true
|
780
|
-
res.body.should == ''
|
781
|
-
end
|
782
|
-
end
|
783
|
-
describe false do
|
784
|
-
it 'ignores redirects' do
|
785
|
-
res = nil
|
786
|
-
@http.request( @url + '/follow_location', follow_location: false ) { |c_res| res = c_res }
|
787
|
-
@http.run
|
788
|
-
res.effective_url.start_with?( @url + '/follow_location' ).should be_true
|
789
|
-
res.body.should == ''
|
790
|
-
end
|
791
|
-
end
|
792
|
-
describe true do
|
793
|
-
it 'follows redirects' do
|
794
|
-
res = nil
|
795
|
-
@http.request( @url + '/follow_location', follow_location: true ) { |c_res| res = c_res }
|
796
|
-
@http.run
|
797
|
-
res.effective_url.should == @url + '/redir_2'
|
798
|
-
res.body.should == "Welcome to redir_2!"
|
799
|
-
end
|
800
|
-
end
|
801
|
-
end
|
802
|
-
end
|
803
|
-
|
804
|
-
describe '#get' do
|
805
|
-
it 'performs a GET request' do
|
806
|
-
body = nil
|
807
|
-
@http.get { |res| body = res.body }
|
808
|
-
@http.run
|
809
|
-
body.should == 'GET'
|
810
|
-
end
|
811
|
-
end
|
812
|
-
|
813
|
-
describe '#post' do
|
814
|
-
it 'performs a GET request' do
|
815
|
-
body = nil
|
816
|
-
@http.post { |res| body = res.body }
|
817
|
-
@http.run
|
818
|
-
body.should == 'POST'
|
819
|
-
end
|
820
|
-
end
|
821
|
-
|
822
|
-
describe '#cookie' do
|
823
|
-
it 'performs a GET request' do
|
824
|
-
body = nil
|
825
|
-
cookies = { 'name' => "v%+;al\00=" }
|
826
|
-
@http.cookie( @url + '/cookies', params: cookies ) { |res| body = res.body }
|
827
|
-
@http.run
|
828
|
-
body.should == cookies.keys.first + '=' + cookies.values.first
|
829
|
-
end
|
830
|
-
end
|
831
|
-
|
832
|
-
describe '#headers' do
|
833
|
-
it 'performs a GET request' do
|
834
|
-
body = nil
|
835
|
-
headers = { 'name' => 'val' }
|
836
|
-
@http.header( @url + '/headers', params: headers ) { |res| body = res.body }
|
837
|
-
@http.run
|
838
|
-
YAML.load( body )['Name'].should == headers.values.first
|
839
|
-
end
|
840
|
-
end
|
841
|
-
|
842
|
-
describe '#update_cookies' do
|
843
|
-
it 'updates the cookies' do
|
844
|
-
cookies = []
|
845
|
-
cookies << Arachni::Element::Cookie.new( @url, 'key2' => 'val2' )
|
846
|
-
|
847
|
-
@http.cookies.should be_empty
|
848
|
-
@http.update_cookies( cookies )
|
849
|
-
@http.cookies.should == cookies
|
850
|
-
end
|
851
|
-
|
852
|
-
it 'updates the Arachni::Options.cookies' do
|
853
|
-
Arachni::Options.cookies.should be_nil
|
854
|
-
|
855
|
-
cookies = []
|
856
|
-
cookies << Arachni::Element::Cookie.new( @url, 'key2' => 'val2' )
|
857
|
-
@http.update_cookies( cookies )
|
858
|
-
|
859
|
-
Arachni::Options.cookies.should == cookies
|
860
|
-
end
|
861
|
-
end
|
862
|
-
|
863
|
-
describe '#on_new_cookies' do
|
864
|
-
it 'adds blocks to be called when new cookies arrive' do
|
865
|
-
cookies = []
|
866
|
-
cookies << Arachni::Element::Cookie.new( @url,
|
867
|
-
'name' => 'value' )
|
868
|
-
res = Typhoeus::Response.new( effective_url: @url, headers_hash: { 'Set-Cookie' => 'name=value' } )
|
869
|
-
|
870
|
-
callback_cookies = nil
|
871
|
-
callback_response = nil
|
872
|
-
@http.on_new_cookies do |cookies, res|
|
873
|
-
callback_cookies = cookies
|
874
|
-
callback_response = res
|
875
|
-
end
|
876
|
-
@http.parse_and_set_cookies( res )
|
877
|
-
|
878
|
-
callback_cookies.should == cookies
|
879
|
-
callback_response.should == res
|
880
|
-
end
|
881
|
-
end
|
882
|
-
|
883
|
-
describe '#parse_and_set_cookies' do
|
884
|
-
it 'updates the cookies from a response and call on_new_cookies blocks' do
|
885
|
-
cookies = []
|
886
|
-
cookies << Arachni::Element::Cookie.new( @url,
|
887
|
-
'name' => 'value' )
|
888
|
-
res = Typhoeus::Response.new( effective_url: @url, headers_hash: { 'Set-Cookie' => 'name=value' } )
|
889
|
-
|
890
|
-
@opts.cookies.should be_nil
|
891
|
-
@http.cookies.should be_empty
|
892
|
-
@http.parse_and_set_cookies( res )
|
893
|
-
@http.cookies.should == cookies
|
894
|
-
@opts.cookies.should == cookies
|
895
|
-
end
|
896
|
-
end
|
897
|
-
|
898
|
-
describe '#custom_404?' do
|
899
|
-
before { @custom_404 = @url + '/custom_404/' }
|
900
|
-
|
901
|
-
context 'when not dealing with a custom 404 handler' do
|
902
|
-
it 'returns false' do
|
903
|
-
res = nil
|
904
|
-
@http.get( @custom_404 + 'not' ) { |c_res| res = c_res }
|
905
|
-
@http.run
|
906
|
-
bool = false
|
907
|
-
@http.custom_404?( res ) { |c_bool| bool = c_bool }
|
908
|
-
@http.run
|
909
|
-
bool.should be_false
|
910
|
-
end
|
911
|
-
end
|
912
|
-
|
913
|
-
context 'when dealing with a static handler' do
|
914
|
-
it 'returns true' do
|
915
|
-
res = nil
|
916
|
-
@http.get( @custom_404 + 'static/crap' ) { |c_res| res = c_res }
|
917
|
-
@http.run
|
918
|
-
bool = false
|
919
|
-
@http.custom_404?( res ) { |c_bool| bool = c_bool }
|
920
|
-
@http.run
|
921
|
-
bool.should be_true
|
922
|
-
end
|
923
|
-
end
|
924
|
-
|
925
|
-
context 'when dealing with a dynamic handler' do
|
926
|
-
context 'which includes the requested resource in the response' do
|
927
|
-
it 'returns true' do
|
928
|
-
res = nil
|
929
|
-
@http.get( @custom_404 + 'dynamic/crap' ) { |c_res| res = c_res }
|
930
|
-
@http.run
|
931
|
-
bool = false
|
932
|
-
@http.custom_404?( res ) { |c_bool| bool = c_bool }
|
933
|
-
@http.run
|
934
|
-
bool.should be_true
|
935
|
-
end
|
936
|
-
end
|
937
|
-
context 'which includes constantly changing text in the response' do
|
938
|
-
it 'returns true' do
|
939
|
-
res = nil
|
940
|
-
@http.get( @custom_404 + 'random/crap' ) { |c_res| res = c_res }
|
941
|
-
@http.run
|
942
|
-
bool = false
|
943
|
-
@http.custom_404?( res ) { |c_bool| bool = c_bool }
|
944
|
-
@http.run
|
945
|
-
bool.should be_true
|
946
|
-
end
|
947
|
-
end
|
948
|
-
context 'which returns a combination of the above' do
|
949
|
-
it 'returns true' do
|
950
|
-
res = nil
|
951
|
-
@http.get( @custom_404 + 'combo/crap' ) { |c_res| res = c_res }
|
952
|
-
@http.run
|
953
|
-
bool = false
|
954
|
-
@http.custom_404?( res ) { |c_bool| bool = c_bool }
|
955
|
-
@http.run
|
956
|
-
bool.should be_true
|
957
|
-
end
|
958
|
-
end
|
959
|
-
end
|
960
|
-
end
|
961
|
-
|
962
|
-
end
|