arachni 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/ACKNOWLEDGMENTS.md +3 -0
- data/CHANGELOG.md +181 -1
- data/README.md +68 -14
- data/Rakefile +1 -5
- data/arachni.gemspec +9 -6
- data/bin/arachni_multi +23 -0
- data/bin/arachni_rpc +2 -2
- data/bin/arachni_rpcd_monitor +1 -1
- data/fingerprinters/frameworks/rack.rb +41 -0
- data/fingerprinters/languages/asp.rb +42 -0
- data/fingerprinters/languages/aspx.rb +63 -0
- data/fingerprinters/languages/jsp.rb +44 -0
- data/fingerprinters/languages/php.rb +43 -0
- data/fingerprinters/languages/python.rb +40 -0
- data/fingerprinters/languages/ruby.rb +41 -0
- data/fingerprinters/os/bsd.rb +36 -0
- data/fingerprinters/os/linux.rb +42 -0
- data/fingerprinters/os/solaris.rb +41 -0
- data/fingerprinters/os/unix.rb +36 -0
- data/fingerprinters/os/windows.rb +41 -0
- data/fingerprinters/servers/apache.rb +36 -0
- data/fingerprinters/servers/iis.rb +36 -0
- data/fingerprinters/servers/jetty.rb +36 -0
- data/fingerprinters/servers/nginx.rb +36 -0
- data/fingerprinters/servers/tomcat.rb +36 -0
- data/lib/arachni/audit_store.rb +3 -4
- data/lib/arachni/banner.rb +0 -2
- data/lib/arachni/element/base.rb +25 -35
- data/lib/arachni/element/capabilities/auditable.rb +265 -133
- data/lib/arachni/element/capabilities/auditable/rdiff.rb +14 -4
- data/lib/arachni/element/capabilities/auditable/taint.rb +32 -10
- data/lib/arachni/element/capabilities/auditable/timeout.rb +59 -29
- data/lib/arachni/element/cookie.rb +4 -3
- data/lib/arachni/element/form.rb +1 -5
- data/lib/arachni/element/header.rb +10 -0
- data/lib/arachni/element/link.rb +0 -1
- data/lib/arachni/element_filter.rb +2 -2
- data/lib/arachni/framework.rb +37 -13
- data/lib/arachni/http.rb +3 -2
- data/lib/arachni/issue.rb +27 -0
- data/lib/arachni/module.rb +16 -0
- data/lib/arachni/module/auditor.rb +107 -70
- data/lib/arachni/module/base.rb +1 -1
- data/lib/arachni/module/key_filler.rb +26 -39
- data/lib/arachni/module/manager.rb +53 -56
- data/lib/arachni/options.rb +126 -19
- data/lib/arachni/page.rb +41 -42
- data/lib/arachni/parser.rb +91 -139
- data/lib/arachni/platform.rb +19 -0
- data/lib/arachni/platform/fingerprinter.rb +100 -0
- data/lib/arachni/platform/list.rb +293 -0
- data/lib/arachni/platform/manager.rb +435 -0
- data/lib/arachni/platforms.rb +498 -0
- data/lib/arachni/plugin.rb +17 -1
- data/lib/arachni/plugin/manager.rb +35 -36
- data/lib/arachni/processes.rb +27 -0
- data/lib/arachni/processes/dispatchers.rb +149 -0
- data/lib/arachni/processes/helpers.rb +19 -0
- data/lib/arachni/processes/helpers/dispatchers.rb +45 -0
- data/lib/arachni/processes/helpers/instances.rb +51 -0
- data/lib/arachni/processes/helpers/processes.rb +51 -0
- data/lib/arachni/processes/instances.rb +196 -0
- data/lib/arachni/processes/manager.rb +129 -0
- data/lib/arachni/report.rb +16 -0
- data/lib/arachni/rpc/client/base.rb +9 -1
- data/lib/arachni/rpc/server/base.rb +1 -0
- data/lib/arachni/rpc/server/dispatcher.rb +60 -24
- data/lib/arachni/rpc/server/dispatcher/handler.rb +4 -2
- data/lib/arachni/rpc/server/dispatcher/node.rb +8 -3
- data/lib/arachni/rpc/server/framework.rb +70 -772
- data/lib/arachni/rpc/server/{distributor.rb → framework/distributor.rb} +150 -117
- data/lib/arachni/rpc/server/framework/master.rb +470 -0
- data/lib/arachni/rpc/server/framework/multi_instance.rb +267 -0
- data/lib/arachni/rpc/server/framework/slave.rb +159 -0
- data/lib/arachni/rpc/server/instance.rb +187 -109
- data/lib/arachni/rpc/server/spider.rb +136 -38
- data/lib/arachni/ruby.rb +19 -0
- data/lib/arachni/ruby/hash.rb +62 -0
- data/lib/arachni/ruby/io.rb +49 -0
- data/lib/arachni/ruby/set.rb +27 -0
- data/lib/arachni/ruby/string.rb +17 -2
- data/lib/arachni/spider.rb +60 -38
- data/lib/arachni/support.rb +26 -0
- data/lib/arachni/support/buffer.rb +19 -0
- data/lib/arachni/support/buffer/autoflush.rb +79 -0
- data/lib/arachni/{buffer → support/buffer}/base.rb +1 -1
- data/lib/arachni/{cache.rb → support/cache.rb} +1 -1
- data/lib/arachni/{cache → support/cache}/base.rb +7 -9
- data/lib/arachni/{cache → support/cache}/least_cost_replacement.rb +7 -1
- data/lib/arachni/{cache → support/cache}/least_recently_used.rb +10 -34
- data/lib/arachni/{cache → support/cache}/preference.rb +8 -3
- data/lib/arachni/{cache → support/cache}/random_replacement.rb +8 -3
- data/lib/arachni/support/crypto.rb +18 -0
- data/lib/arachni/{crypto → support/crypto}/rsa_aes_cbc.rb +7 -4
- data/lib/arachni/support/database.rb +20 -0
- data/lib/arachni/support/database/base.rb +124 -0
- data/lib/arachni/{database → support/database}/hash.rb +1 -1
- data/lib/arachni/{database → support/database}/queue.rb +1 -1
- data/lib/arachni/support/lookup.rb +20 -0
- data/lib/arachni/support/lookup/base.rb +91 -0
- data/lib/arachni/support/lookup/hash_set.rb +42 -0
- data/lib/arachni/support/lookup/moolb.rb +66 -0
- data/lib/arachni/support/queue.rb +18 -0
- data/lib/arachni/support/queue/disk.rb +171 -0
- data/lib/arachni/trainer.rb +2 -2
- data/lib/arachni/ui/cli/cli.rb +22 -0
- data/lib/arachni/ui/cli/rpc/dispatcher_monitor.rb +7 -3
- data/lib/arachni/ui/cli/rpc/{rpc.rb → instance.rb} +69 -97
- data/lib/arachni/ui/cli/rpc/local.rb +80 -0
- data/lib/arachni/ui/cli/rpc/remote.rb +134 -0
- data/lib/arachni/ui/cli/utilities.rb +40 -5
- data/lib/arachni/ui/foo/output.rb +19 -16
- data/lib/arachni/uri.rb +35 -5
- data/lib/arachni/utilities.rb +5 -39
- data/lib/version +1 -1
- data/logs/Dispatcher - 21448-7331.log +17 -0
- data/logs/Dispatcher - 21645-1111.log +13 -0
- data/logs/Dispatcher - 21673-1111.log +21 -0
- data/modules/audit/code_injection.rb +21 -20
- data/modules/audit/code_injection_timing.rb +15 -13
- data/modules/audit/os_cmd_injection.rb +14 -10
- data/modules/audit/os_cmd_injection_timing.rb +12 -12
- data/modules/audit/path_traversal.rb +52 -47
- data/modules/audit/rfi.rb +25 -18
- data/modules/audit/sqli.rb +10 -10
- data/modules/audit/sqli_blind_rdiff.rb +3 -3
- data/modules/audit/sqli_blind_timing.rb +10 -10
- data/modules/audit/sqli_blind_timing/mssql.txt +9 -0
- data/modules/audit/sqli_blind_timing/mysql.txt +32 -0
- data/modules/audit/sqli_blind_timing/pgsql.txt +28 -0
- data/modules/audit/trainer.rb +7 -4
- data/modules/audit/unvalidated_redirect.rb +13 -11
- data/modules/audit/xpath.rb +10 -6
- data/modules/audit/xss_tag.rb +10 -3
- data/modules/recon/grep/html_objects.rb +9 -4
- data/plugins/defaults/content_types.rb +3 -3
- data/plugins/defaults/meta/remedies/timing_attacks.rb +4 -2
- data/plugins/defaults/meta/uniformity.rb +4 -3
- data/plugins/proxy.rb +42 -132
- data/plugins/proxy/panel/panel.html.erb +6 -0
- data/plugins/proxy/panel/vectors.yml.erb +9 -0
- data/plugins/proxy/server.rb +41 -10
- data/plugins/proxy/template_scope.rb +138 -0
- data/plugins/vector_feed.rb +12 -12
- data/reports/html.rb +1 -0
- data/spec/arachni/audit_store_spec.rb +1 -1
- data/spec/arachni/component/manager_spec.rb +10 -57
- data/spec/arachni/component/options/address_spec.rb +1 -1
- data/spec/arachni/component/options/base_spec.rb +1 -1
- data/spec/arachni/component/options/bool_spec.rb +1 -1
- data/spec/arachni/component/options/enum_spec.rb +1 -1
- data/spec/arachni/component/options/float_spec.rb +1 -1
- data/spec/arachni/component/options/int_spec.rb +1 -1
- data/spec/arachni/component/options/path_spec.rb +1 -1
- data/spec/arachni/component/options/port_spec.rb +1 -1
- data/spec/arachni/component/options/string_spec.rb +1 -1
- data/spec/arachni/component/options/url_spec.rb +1 -1
- data/spec/arachni/element/base_spec.rb +16 -5
- data/spec/arachni/element/body_spec.rb +1 -1
- data/spec/arachni/element/capabilities/auditable/rdiff_spec.rb +11 -3
- data/spec/arachni/element/capabilities/auditable/taint_spec.rb +27 -3
- data/spec/arachni/element/capabilities/auditable/timeout_spec.rb +32 -3
- data/spec/arachni/element/capabilities/mutable_spec.rb +1 -1
- data/spec/arachni/element/cookie_spec.rb +21 -7
- data/spec/arachni/element/form_spec.rb +7 -58
- data/spec/arachni/element/header_spec.rb +15 -3
- data/spec/arachni/element/link_spec.rb +3 -26
- data/spec/arachni/element/path_spec.rb +1 -1
- data/spec/arachni/element/server_spec.rb +1 -1
- data/spec/arachni/element_filter_spec.rb +1 -1
- data/spec/arachni/{error.rb → error_spec.rb} +1 -1
- data/spec/arachni/framework_spec.rb +127 -50
- data/spec/arachni/http/cookie_jar_spec.rb +9 -42
- data/spec/arachni/http_spec.rb +9 -21
- data/spec/arachni/issue_spec.rb +29 -1
- data/spec/arachni/mixins/observable_spec.rb +4 -6
- data/spec/arachni/mixins/progress_bar_spec.rb +1 -1
- data/spec/arachni/module/auditor_spec.rb +17 -5
- data/spec/arachni/module/key_filler.rb +33 -8
- data/spec/arachni/module/manager_spec.rb +1 -3
- data/spec/arachni/module/utilities_spec.rb +1 -1
- data/spec/arachni/options_spec.rb +185 -1
- data/spec/arachni/page_spec.rb +16 -3
- data/spec/arachni/parser_spec.rb +27 -123
- data/spec/arachni/platform/fingerprinter_spec.rb +159 -0
- data/spec/arachni/platform/list_spec.rb +399 -0
- data/spec/arachni/platform/manager_spec.rb +373 -0
- data/spec/arachni/plugin/manager_spec.rb +6 -29
- data/spec/arachni/report/base_spec.rb +2 -2
- data/spec/arachni/report/manager_spec.rb +2 -2
- data/spec/arachni/rpc/client/base_spec.rb +22 -27
- data/spec/arachni/rpc/client/dispatcher_spec.rb +4 -15
- data/spec/arachni/rpc/client/instance_spec.rb +3 -11
- data/spec/arachni/rpc/server/active_options_spec.rb +2 -17
- data/spec/arachni/rpc/server/base_spec.rb +23 -7
- data/spec/arachni/rpc/server/dispatcher/handler_spec.rb +4 -21
- data/spec/arachni/rpc/server/dispatcher/node_spec.rb +30 -8
- data/spec/arachni/rpc/server/dispatcher_spec.rb +130 -70
- data/spec/arachni/rpc/server/{distributor_spec.rb → framework/distributor_spec.rb} +95 -130
- data/spec/arachni/rpc/server/framework_hpg_spec.rb +38 -99
- data/spec/arachni/rpc/server/framework_simple_spec.rb +38 -71
- data/spec/arachni/rpc/server/instance_spec.rb +183 -135
- data/spec/arachni/rpc/server/modules/manager_spec.rb +18 -50
- data/spec/arachni/rpc/server/output_spec.rb +1 -1
- data/spec/arachni/rpc/server/plugin/manager_spec.rb +12 -36
- data/spec/arachni/rpc/server/spider_spec.rb +23 -48
- data/spec/arachni/ruby/array_spec.rb +1 -1
- data/spec/arachni/ruby/enumerable_spec.rb +1 -1
- data/spec/arachni/ruby/hash_spec.rb +70 -0
- data/spec/arachni/ruby/io_spec.rb +26 -0
- data/spec/arachni/ruby/object_spec.rb +1 -1
- data/spec/arachni/ruby/set_spec.rb +15 -0
- data/spec/arachni/ruby/string_spec.rb +18 -1
- data/spec/arachni/ruby/webrick_spec.rb +1 -1
- data/spec/arachni/session_spec.rb +3 -3
- data/spec/arachni/spider_spec.rb +30 -6
- data/spec/arachni/{buffer → support/buffer}/autoflush_spec.rb +7 -12
- data/spec/arachni/{buffer → support/buffer}/base_spec.rb +19 -23
- data/spec/arachni/{cache → support/cache}/base_spec.rb +7 -7
- data/spec/arachni/{cache → support/cache}/least_cost_replacement_spec.rb +3 -3
- data/spec/arachni/{cache → support/cache}/least_recently_used_spec.rb +3 -3
- data/spec/arachni/{cache → support/cache}/preference_spec.rb +3 -3
- data/spec/arachni/{cache → support/cache}/random_replacement_spec.rb +3 -3
- data/spec/arachni/{crypto → support/crypto}/rsa_aes_cbc_spec.rb +3 -5
- data/spec/arachni/{database → support/database}/hash_spec.rb +4 -5
- data/spec/arachni/{database → support/database}/queue_spec.rb +3 -4
- data/spec/arachni/support/lookup/hash_set_spec.rb +5 -0
- data/spec/arachni/support/lookup/moolb_spec.rb +41 -0
- data/spec/arachni/support/queue/disk_spec.rb +116 -0
- data/spec/arachni/trainer_spec.rb +6 -2
- data/spec/arachni/typhoeus/hydra_spec.rb +1 -1
- data/spec/arachni/typhoeus/requrest_spec.rb +1 -1
- data/spec/arachni/typhoeus/response_spec.rb +1 -1
- data/spec/arachni/uri_spec.rb +72 -38
- data/spec/arachni/utilities_spec.rb +6 -46
- data/spec/fingerprinters/frameworks/rack_spec.rb +41 -0
- data/spec/fingerprinters/languages/asp_spec.rb +40 -0
- data/spec/fingerprinters/languages/aspx_spec.rb +78 -0
- data/spec/fingerprinters/languages/jsp_spec.rb +58 -0
- data/spec/fingerprinters/languages/php_spec.rb +61 -0
- data/spec/fingerprinters/languages/python_spec.rb +23 -0
- data/spec/fingerprinters/languages/ruby.rb +34 -0
- data/spec/fingerprinters/os/bsd_spec.rb +26 -0
- data/spec/fingerprinters/os/linux_spec.rb +34 -0
- data/spec/fingerprinters/os/solaris_spec.rb +34 -0
- data/spec/fingerprinters/os/unix_spec.rb +26 -0
- data/spec/fingerprinters/os/windows_spec.rb +34 -0
- data/spec/fingerprinters/servers/apache_spec.rb +26 -0
- data/spec/fingerprinters/servers/iis_spec.rb +28 -0
- data/spec/fingerprinters/servers/jetty_spec.rb +28 -0
- data/spec/fingerprinters/servers/nginx_spec.rb +26 -0
- data/spec/fingerprinters/servers/tomcat_spec.rb +28 -0
- data/spec/modules/audit/code_injection_spec.rb +2 -2
- data/spec/modules/audit/code_injection_timing_spec.rb +1 -1
- data/spec/modules/audit/csrf_spec.rb +1 -1
- data/spec/modules/audit/ldapi_spec.rb +1 -1
- data/spec/modules/audit/os_cmd_injection_spec.rb +1 -1
- data/spec/modules/audit/os_cmd_injection_timing_spec.rb +2 -2
- data/spec/modules/audit/path_traversal_spec.rb +1 -1
- data/spec/modules/audit/response_splitting_spec.rb +1 -1
- data/spec/modules/audit/rfi_spec.rb +1 -1
- data/spec/modules/audit/session_fixation_spec.rb +1 -1
- data/spec/modules/audit/sqli_blind_rdiff_spec.rb +1 -1
- data/spec/modules/audit/sqli_blind_timing_spec.rb +4 -4
- data/spec/modules/audit/sqli_spec.rb +2 -2
- data/spec/modules/audit/trainer_spec.rb +11 -1
- data/spec/modules/audit/unvalidated_redirect_spec.rb +1 -1
- data/spec/modules/audit/xpath_spec.rb +1 -1
- data/spec/modules/audit/xss_event_spec.rb +1 -1
- data/spec/modules/audit/xss_path_spec.rb +1 -1
- data/spec/modules/audit/xss_script_tag_spec.rb +1 -1
- data/spec/modules/audit/xss_spec.rb +1 -1
- data/spec/modules/audit/xss_tag_spec.rb +1 -1
- data/spec/modules/recon/allowed_methods_spec.rb +1 -1
- data/spec/modules/recon/backdoors_spec.rb +1 -1
- data/spec/modules/recon/backup_files_spec.rb +1 -1
- data/spec/modules/recon/common_directories_spec.rb +1 -1
- data/spec/modules/recon/common_files_spec.rb +1 -1
- data/spec/modules/recon/directory_listing_spec.rb +1 -1
- data/spec/modules/recon/grep/captcha_spec.rb +1 -1
- data/spec/modules/recon/grep/credit_card_spec.rb +1 -1
- data/spec/modules/recon/grep/cvs_svn_users_spec.rb +1 -1
- data/spec/modules/recon/grep/emails_spec.rb +1 -1
- data/spec/modules/recon/grep/html_objects_spec.rb +1 -1
- data/spec/modules/recon/grep/http_only_cookies_spec.rb +1 -1
- data/spec/modules/recon/grep/insecure_cookies_spec.rb +1 -1
- data/spec/modules/recon/grep/mixed_resource_spec.rb +1 -1
- data/spec/modules/recon/grep/password_autocomplete_spec.rb +1 -1
- data/spec/modules/recon/grep/private_ip_spec.rb +1 -1
- data/spec/modules/recon/grep/ssn_spec.rb +1 -1
- data/spec/modules/recon/grep/unencrypted_password_forms_spec.rb +1 -1
- data/spec/modules/recon/htaccess_limit_spec.rb +1 -1
- data/spec/modules/recon/http_put_spec.rb +1 -1
- data/spec/modules/recon/interesting_responses_spec.rb +1 -1
- data/spec/modules/recon/webdav_spec.rb +1 -1
- data/spec/modules/recon/xst_spec.rb +1 -1
- data/spec/path_extractors/anchors_spec.rb +1 -1
- data/spec/path_extractors/areas_spec.rb +1 -1
- data/spec/path_extractors/forms_spec.rb +1 -1
- data/spec/path_extractors/frames_spec.rb +1 -1
- data/spec/path_extractors/generic_spec.rb +1 -1
- data/spec/path_extractors/links_spec.rb +1 -1
- data/spec/path_extractors/meta_refresh_spec.rb +1 -1
- data/spec/path_extractors/scripts_spec.rb +1 -1
- data/spec/plugins/autologin_spec.rb +1 -1
- data/spec/plugins/autothrottle_spec.rb +2 -2
- data/spec/plugins/content_types_spec.rb +1 -1
- data/spec/plugins/cookie_collector_spec.rb +1 -1
- data/spec/plugins/form_dicattack_spec.rb +7 -7
- data/spec/plugins/healthmap_spec.rb +1 -1
- data/spec/plugins/http_dicattack_spec.rb +6 -6
- data/spec/plugins/meta/remedies/discovery_spec.rb +1 -1
- data/spec/plugins/meta/remedies/timing_attacks_spec.rb +1 -1
- data/spec/plugins/meta/uniformity_spec.rb +1 -1
- data/spec/plugins/profiler_spec.rb +3 -3
- data/spec/plugins/rescan_spec.rb +3 -3
- data/spec/plugins/resolver_spec.rb +1 -1
- data/spec/plugins/script_spec.rb +2 -2
- data/spec/plugins/vector_feed_spec.rb +13 -1
- data/spec/plugins/waf_detector_spec.rb +2 -2
- data/spec/reports/afr_spec.rb +1 -1
- data/spec/reports/ap_spec.rb +1 -1
- data/spec/reports/html_spec.rb +1 -1
- data/spec/reports/json_spec.rb +1 -1
- data/spec/reports/marshal_spec.rb +1 -1
- data/spec/reports/stdout_spec.rb +1 -1
- data/spec/reports/txt_spec.rb +1 -1
- data/spec/reports/xml_spec.rb +1 -1
- data/spec/reports/yaml_spec.rb +1 -1
- data/spec/spec_helper.rb +27 -32
- data/spec/{fixtures → support/fixtures}/auditstore.afr +0 -0
- data/spec/{fixtures → support/fixtures}/cookies.txt +0 -0
- data/spec/support/fixtures/fingerprinters/test.rb +36 -0
- data/spec/{fixtures → support/fixtures}/modules/test.rb +0 -0
- data/spec/{fixtures → support/fixtures}/modules/test2.rb +0 -0
- data/spec/{fixtures → support/fixtures}/modules/test3.rb +0 -0
- data/spec/{fixtures → support/fixtures}/passwords.txt +0 -0
- data/spec/{fixtures → support/fixtures}/plugins/bad.rb +0 -0
- data/spec/{fixtures → support/fixtures}/plugins/defaults/default.rb +0 -0
- data/spec/{fixtures → support/fixtures}/plugins/distributable.rb +0 -0
- data/spec/{fixtures → support/fixtures}/plugins/loop.rb +0 -0
- data/spec/{fixtures → support/fixtures}/plugins/spider_hook.rb +1 -0
- data/spec/{fixtures → support/fixtures}/plugins/wait.rb +0 -0
- data/spec/{fixtures → support/fixtures}/plugins/with_options.rb +0 -0
- data/spec/{fixtures → support/fixtures}/reports/base_spec/plugin_formatters/with_formatters/foobar.rb +0 -0
- data/spec/{fixtures → support/fixtures}/reports/base_spec/with_formatters.rb +0 -0
- data/spec/{fixtures → support/fixtures}/reports/base_spec/with_outfile.rb +0 -0
- data/spec/{fixtures → support/fixtures}/reports/base_spec/without_outfile.rb +0 -0
- data/spec/{fixtures → support/fixtures}/reports/manager_spec/afr.rb +0 -0
- data/spec/{fixtures → support/fixtures}/reports/manager_spec/foo.rb +0 -0
- data/spec/{fixtures → support/fixtures}/rescan.afr.tpl +0 -0
- data/spec/{fixtures → support/fixtures}/rpcd_handlers/echo.rb +0 -0
- data/spec/{fixtures → support/fixtures}/run_mod/body.rb +0 -0
- data/spec/{fixtures → support/fixtures}/run_mod/cookies.rb +0 -0
- data/spec/{fixtures → support/fixtures}/run_mod/empty.rb +0 -0
- data/spec/{fixtures → support/fixtures}/run_mod/flch.rb +0 -0
- data/spec/{fixtures → support/fixtures}/run_mod/forms.rb +0 -0
- data/spec/{fixtures → support/fixtures}/run_mod/headers.rb +0 -0
- data/spec/{fixtures → support/fixtures}/run_mod/links.rb +0 -0
- data/spec/{fixtures → support/fixtures}/run_mod/nil.rb +0 -0
- data/spec/{fixtures → support/fixtures}/run_mod/path.rb +0 -0
- data/spec/{fixtures → support/fixtures}/run_mod/server.rb +0 -0
- data/spec/{fixtures → support/fixtures}/script_plugin.rb +0 -0
- data/spec/{fixtures → support/fixtures}/taint_module/taint.rb +0 -0
- data/spec/{fixtures → support/fixtures}/usernames.txt +0 -0
- data/spec/{fixtures → support/fixtures}/wait_module/wait.rb +0 -0
- data/spec/{helpers → support/helpers}/auditor.rb +0 -0
- data/spec/support/helpers/framework.rb +19 -0
- data/spec/support/helpers/misc.rb +19 -0
- data/spec/support/helpers/paths.rb +31 -0
- data/spec/support/helpers/requires.rb +24 -0
- data/spec/support/helpers/resets.rb +42 -0
- data/spec/support/helpers/web_server.rb +27 -0
- data/spec/support/lib/web_server_manager.rb +120 -0
- data/spec/support/logs/Dispatcher - 11642-42685.log +9 -0
- data/spec/support/logs/Dispatcher - 11669-58445.log +21 -0
- data/spec/support/logs/Dispatcher - 11803-19013.log +9 -0
- data/spec/support/logs/Dispatcher - 11813-58646.log +19 -0
- data/spec/support/logs/Dispatcher - 11822-1913.log +17 -0
- data/spec/support/logs/Dispatcher - 11831-60571.log +13 -0
- data/spec/support/logs/Dispatcher - 11840-20151.log +9 -0
- data/spec/support/logs/Dispatcher - 11850-21796.log +9 -0
- data/spec/support/logs/Dispatcher - 11859-47650.log +11 -0
- data/spec/support/logs/Dispatcher - 11872-13669.log +11 -0
- data/spec/support/logs/Dispatcher - 11885-40034.log +35 -0
- data/spec/support/logs/Dispatcher - 11946-10629.log +21 -0
- data/spec/support/logs/Dispatcher - 11955-55497.log +21 -0
- data/spec/support/logs/Dispatcher - 11964-33080.log +23 -0
- data/spec/support/logs/Dispatcher - 12005-28558.log +19 -0
- data/spec/support/logs/Dispatcher - 12014-59368.log +17 -0
- data/spec/support/logs/Dispatcher - 12023-41547.log +15 -0
- data/spec/support/logs/Dispatcher - 12037-54838.log +11 -0
- data/spec/support/logs/Dispatcher - 12050-38840.log +9 -0
- data/spec/support/logs/Dispatcher - 12059-7283.log +9 -0
- data/spec/support/logs/Dispatcher - 12068-19765.log +9 -0
- data/spec/support/logs/Dispatcher - 12077-24147.log +9 -0
- data/spec/support/logs/Dispatcher - 12086-60404.log +11 -0
- data/spec/support/logs/Dispatcher - 12099-43307.log +9 -0
- data/spec/support/logs/Dispatcher - 12109-9701.log +9 -0
- data/spec/support/logs/Dispatcher - 12162-19782.log +63 -0
- data/spec/support/logs/Dispatcher - 12171-35883.log +43 -0
- data/spec/support/logs/Dispatcher - 12180-6456.log +39 -0
- data/spec/support/logs/Dispatcher - 12189-64516.log +34 -0
- data/spec/support/logs/Dispatcher - 12198-50800.log +28 -0
- data/spec/support/logs/Dispatcher - 12207-6148.log +21 -0
- data/spec/support/logs/Dispatcher - 12216-45994.log +13 -0
- data/spec/support/logs/Dispatcher - 12226-59932.log +9 -0
- data/spec/support/logs/Dispatcher - 12369-42683.log +19 -0
- data/spec/support/logs/Dispatcher - 12379-51205.log +21 -0
- data/spec/support/logs/Dispatcher - 12388-15229.log +15 -0
- data/spec/support/logs/Dispatcher - 12401-35502.log +19 -0
- data/spec/support/logs/Dispatcher - 12410-3386.log +21 -0
- data/spec/support/logs/Dispatcher - 12419-16056.log +15 -0
- data/spec/support/logs/Dispatcher - 12540-25763.log +17 -0
- data/spec/support/logs/Dispatcher - 12549-49234.log +21 -0
- data/spec/support/logs/Dispatcher - 12558-61027.log +13 -0
- data/spec/support/logs/Dispatcher - 12571-34789.log +19 -0
- data/spec/support/logs/Dispatcher - 12580-27968.log +21 -0
- data/spec/support/logs/Dispatcher - 12589-38100.log +15 -0
- data/spec/support/logs/Dispatcher - 12643-8172.log +17 -0
- data/spec/support/logs/Dispatcher - 12652-44715.log +21 -0
- data/spec/support/logs/Dispatcher - 12661-40547.log +13 -0
- data/spec/support/logs/Dispatcher - 12674-20100.log +17 -0
- data/spec/support/logs/Dispatcher - 12683-57063.log +21 -0
- data/spec/support/logs/Dispatcher - 12692-20974.log +13 -0
- data/spec/support/logs/Dispatcher - 12920-24047.log +19 -0
- data/spec/support/logs/Dispatcher - 12929-13265.log +21 -0
- data/spec/support/logs/Dispatcher - 12938-38472.log +15 -0
- data/spec/support/logs/Dispatcher - 12962-47051.log +21 -0
- data/spec/support/logs/Dispatcher - 12971-48844.log +25 -0
- data/spec/support/logs/Dispatcher - 12980-2331.log +15 -0
- data/spec/support/logs/Dispatcher - 13016-57455.log +17 -0
- data/spec/support/logs/Dispatcher - 13025-44069.log +21 -0
- data/spec/support/logs/Dispatcher - 13034-59986.log +13 -0
- data/spec/support/logs/Dispatcher - 13047-17338.log +21 -0
- data/spec/support/logs/Dispatcher - 13056-57124.log +25 -0
- data/spec/support/logs/Dispatcher - 13065-3014.log +15 -0
- data/spec/support/logs/Dispatcher - 13101-42040.log +17 -0
- data/spec/support/logs/Dispatcher - 13110-29137.log +21 -0
- data/spec/support/logs/Dispatcher - 13119-52878.log +13 -0
- data/spec/support/logs/Dispatcher - 13132-20646.log +17 -0
- data/spec/support/logs/Dispatcher - 13141-21629.log +21 -0
- data/spec/support/logs/Dispatcher - 13150-42002.log +13 -0
- data/spec/support/logs/Dispatcher - 8291-38888.log +9 -0
- data/spec/support/logs/Dispatcher - 8325-2241.log +21 -0
- data/spec/support/logs/Dispatcher - 8458-40239.log +9 -0
- data/spec/support/logs/Dispatcher - 8468-26555.log +19 -0
- data/spec/support/logs/Dispatcher - 8477-28819.log +17 -0
- data/spec/support/logs/Dispatcher - 8486-36985.log +13 -0
- data/spec/support/logs/Dispatcher - 8495-59407.log +9 -0
- data/spec/support/logs/Dispatcher - 8504-27479.log +9 -0
- data/spec/support/logs/Dispatcher - 8513-51807.log +11 -0
- data/spec/support/logs/Dispatcher - 8526-53739.log +11 -0
- data/spec/support/logs/Dispatcher - 8539-55908.log +35 -0
- data/spec/support/logs/Dispatcher - 8603-24287.log +21 -0
- data/spec/support/logs/Dispatcher - 8612-37320.log +21 -0
- data/spec/support/logs/Dispatcher - 8621-60797.log +23 -0
- data/spec/support/logs/Dispatcher - 8662-56395.log +19 -0
- data/spec/support/logs/Dispatcher - 8671-54268.log +17 -0
- data/spec/support/logs/Dispatcher - 8680-32387.log +15 -0
- data/spec/support/logs/Dispatcher - 8693-60728.log +11 -0
- data/spec/support/logs/Dispatcher - 8706-53092.log +9 -0
- data/spec/support/logs/Dispatcher - 8715-35576.log +9 -0
- data/spec/support/logs/Dispatcher - 8724-9842.log +9 -0
- data/spec/support/logs/Dispatcher - 8734-37290.log +9 -0
- data/spec/support/logs/Dispatcher - 8743-46516.log +11 -0
- data/spec/support/logs/Dispatcher - 8756-59294.log +9 -0
- data/spec/support/logs/Dispatcher - 8765-16318.log +9 -0
- data/spec/support/logs/Dispatcher - 8818-35968.log +63 -0
- data/spec/support/logs/Dispatcher - 8827-57068.log +43 -0
- data/spec/support/logs/Dispatcher - 8836-31238.log +39 -0
- data/spec/support/logs/Dispatcher - 8845-48148.log +34 -0
- data/spec/support/logs/Dispatcher - 8854-17355.log +28 -0
- data/spec/support/logs/Dispatcher - 8863-6616.log +21 -0
- data/spec/support/logs/Dispatcher - 8872-1373.log +13 -0
- data/spec/support/logs/Dispatcher - 8882-40014.log +9 -0
- data/spec/support/logs/Dispatcher - 8989-17108.log +19 -0
- data/spec/support/logs/Dispatcher - 9000-23195.log +21 -0
- data/spec/support/logs/Dispatcher - 9009-33836.log +15 -0
- data/spec/support/logs/Dispatcher - 9022-55515.log +19 -0
- data/spec/support/logs/Dispatcher - 9031-51301.log +21 -0
- data/spec/support/logs/Dispatcher - 9040-10025.log +15 -0
- data/spec/support/logs/Dispatcher - 9180-20874.log +17 -0
- data/spec/support/logs/Dispatcher - 9189-29826.log +21 -0
- data/spec/support/logs/Dispatcher - 9198-21818.log +13 -0
- data/spec/support/logs/Dispatcher - 9211-64830.log +19 -0
- data/spec/support/logs/Dispatcher - 9220-2570.log +21 -0
- data/spec/support/logs/Dispatcher - 9229-45654.log +15 -0
- data/spec/support/logs/Dispatcher - 9286-1284.log +17 -0
- data/spec/support/logs/Dispatcher - 9295-58545.log +21 -0
- data/spec/support/logs/Dispatcher - 9304-52355.log +13 -0
- data/spec/support/logs/Dispatcher - 9317-58138.log +17 -0
- data/spec/support/logs/Dispatcher - 9326-39184.log +21 -0
- data/spec/support/logs/Dispatcher - 9336-44714.log +13 -0
- data/spec/support/logs/Dispatcher - 9555-26114.log +19 -0
- data/spec/support/logs/Dispatcher - 9564-2270.log +21 -0
- data/spec/support/logs/Dispatcher - 9573-26148.log +15 -0
- data/spec/support/logs/Dispatcher - 9597-62247.log +21 -0
- data/spec/support/logs/Dispatcher - 9606-16162.log +25 -0
- data/spec/support/logs/Dispatcher - 9615-8643.log +15 -0
- data/spec/support/logs/Dispatcher - 9651-49224.log +17 -0
- data/spec/support/logs/Dispatcher - 9660-4390.log +21 -0
- data/spec/support/logs/Dispatcher - 9669-18266.log +13 -0
- data/spec/support/logs/Dispatcher - 9682-44582.log +21 -0
- data/spec/support/logs/Dispatcher - 9691-15941.log +25 -0
- data/spec/support/logs/Dispatcher - 9700-22186.log +15 -0
- data/spec/support/logs/Dispatcher - 9736-29672.log +17 -0
- data/spec/support/logs/Dispatcher - 9745-33231.log +21 -0
- data/spec/support/logs/Dispatcher - 9754-48381.log +13 -0
- data/spec/support/logs/Dispatcher - 9767-29812.log +17 -0
- data/spec/support/logs/Dispatcher - 9776-9894.log +21 -0
- data/spec/support/logs/Dispatcher - 9785-1421.log +13 -0
- data/spec/support/logs/Instance - 12384-38605.error.log +328 -0
- data/spec/support/logs/Instance - 12657-2379.error.log +328 -0
- data/spec/support/logs/Instance - 12688-50940.error.log +427 -0
- data/spec/support/logs/Instance - 12708-13716.error.log +326 -0
- data/spec/support/logs/Instance - 12714-45400.error.log +328 -0
- data/spec/support/logs/Instance - 12848-32645.error.log +326 -0
- data/spec/support/logs/Instance - 9005-21883.error.log +328 -0
- data/spec/support/logs/Instance - 9300-33102.error.log +328 -0
- data/spec/support/logs/Instance - 9331-48336.error.log +427 -0
- data/spec/support/logs/Instance - 9352-62807.error.log +326 -0
- data/spec/support/logs/Instance - 9358-45154.error.log +328 -0
- data/spec/support/logs/Instance - 9487-8746.error.log +326 -0
- data/spec/{logs → support/logs}/placeholder +0 -0
- data/spec/{pems → support/pems}/cacert.pem +0 -0
- data/spec/{pems → support/pems}/client/cert.pem +0 -0
- data/spec/{pems → support/pems}/client/foo-cert.pem +0 -0
- data/spec/{pems → support/pems}/client/foo-key.pem +0 -0
- data/spec/{pems → support/pems}/client/key.pem +0 -0
- data/spec/{pems → support/pems}/server/cert.pem +0 -0
- data/spec/{pems → support/pems}/server/key.pem +0 -0
- data/spec/{servers → support/servers}/arachni/element/capabilities/auditable/rdiff.rb +0 -0
- data/spec/{servers → support/servers}/arachni/element/capabilities/auditable/taint.rb +0 -0
- data/spec/{servers → support/servers}/arachni/element/capabilities/auditable/timeout.rb +0 -0
- data/spec/{servers → support/servers}/arachni/element/cookie.rb +0 -0
- data/spec/{servers → support/servers}/arachni/element/form.rb +0 -0
- data/spec/{servers → support/servers}/arachni/element/header.rb +0 -0
- data/spec/{servers → support/servers}/arachni/element/link.rb +0 -0
- data/spec/{servers → support/servers}/arachni/framework.rb +0 -0
- data/spec/{servers → support/servers}/arachni/http.rb +0 -0
- data/spec/{servers → support/servers}/arachni/http_auth.rb +0 -0
- data/spec/{servers → support/servers}/arachni/module/auditor.rb +0 -0
- data/spec/{servers → support/servers}/arachni/parser.rb +0 -0
- data/spec/{servers → support/servers}/arachni/rpc/server/framework_hpg.rb +0 -1
- data/spec/{servers → support/servers}/arachni/rpc/server/framework_simple.rb +0 -0
- data/spec/{servers → support/servers}/arachni/session.rb +0 -0
- data/spec/{servers → support/servers}/arachni/spider.rb +0 -0
- data/spec/{servers → support/servers}/arachni/spider_https.rb +0 -0
- data/spec/{servers → support/servers}/arachni/trainer.rb +0 -0
- data/spec/{servers → support/servers}/modules/audit/code_injection.rb +3 -4
- data/spec/{servers → support/servers}/modules/audit/code_injection_timing.rb +0 -0
- data/spec/{servers → support/servers}/modules/audit/csrf.rb +0 -0
- data/spec/{servers → support/servers}/modules/audit/ldapi.rb +1 -1
- data/spec/{servers → support/servers}/modules/audit/os_cmd_injection.rb +0 -0
- data/spec/{servers → support/servers}/modules/audit/os_cmd_injection_timing.rb +1 -10
- data/spec/{servers → support/servers}/modules/audit/path_traversal.rb +0 -0
- data/spec/{servers → support/servers}/modules/audit/response_splitting.rb +0 -0
- data/spec/{servers → support/servers}/modules/audit/rfi.rb +0 -0
- data/spec/{servers → support/servers}/modules/audit/session_fixation.rb +0 -0
- data/spec/{servers → support/servers}/modules/audit/sqli.rb +1 -1
- data/spec/{servers → support/servers}/modules/audit/sqli/coldfusion +0 -0
- data/spec/{servers → support/servers}/modules/audit/sqli/db2 +0 -0
- data/spec/{servers → support/servers}/modules/audit/sqli/emc +0 -0
- data/spec/{servers → support/servers}/modules/audit/sqli/informix +0 -0
- data/spec/{servers → support/servers}/modules/audit/sqli/interbase +0 -0
- data/spec/{servers → support/servers}/modules/audit/sqli/jdbc +0 -0
- data/spec/{servers → support/servers}/modules/audit/sqli/mssql +0 -0
- data/spec/{servers → support/servers}/modules/audit/sqli/mysql +0 -0
- data/spec/{servers → support/servers}/modules/audit/sqli/oracle +0 -0
- data/spec/{servers → support/servers}/modules/audit/sqli/postgresql +0 -0
- data/spec/{servers → support/servers}/modules/audit/sqli/sqlite +0 -0
- data/spec/{servers → support/servers}/modules/audit/sqli/sybase +0 -0
- data/spec/{servers → support/servers}/modules/audit/sqli_blind_rdiff.rb +1 -1
- data/spec/{servers → support/servers}/modules/audit/sqli_blind_timing.rb +0 -0
- data/spec/{servers → support/servers}/modules/audit/trainer_module.rb +0 -0
- data/spec/{servers → support/servers}/modules/audit/unvalidated_redirect.rb +0 -0
- data/spec/{servers → support/servers}/modules/audit/xpath.rb +0 -0
- data/spec/{servers → support/servers}/modules/audit/xpath/dotnet +0 -0
- data/spec/{servers → support/servers}/modules/audit/xpath/general +0 -0
- data/spec/{servers → support/servers}/modules/audit/xpath/java +0 -0
- data/spec/{servers → support/servers}/modules/audit/xpath/libxml2 +0 -0
- data/spec/{servers → support/servers}/modules/audit/xpath/php +0 -0
- data/spec/{servers → support/servers}/modules/audit/xss.rb +0 -0
- data/spec/{servers → support/servers}/modules/audit/xss_event.rb +0 -0
- data/spec/{servers → support/servers}/modules/audit/xss_path.rb +0 -0
- data/spec/{servers → support/servers}/modules/audit/xss_script_tag.rb +0 -0
- data/spec/{servers → support/servers}/modules/audit/xss_tag.rb +0 -0
- data/spec/{servers → support/servers}/modules/module_server.rb +1 -1
- data/spec/{servers → support/servers}/modules/recon/allowed_methods.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/backdoors.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/backup_files.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/common_directories.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/common_files.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/directory_listing.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/grep/captcha.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/grep/credit_card.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/grep/cvs_svn_users.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/grep/emails.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/grep/html_objects.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/grep/http_only_cookies.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/grep/insecure_cookies.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/grep/mixed_resource.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/grep/password_autocomplete.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/grep/private_ip.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/grep/ssn.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/grep/unencrypted_password_forms.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/htaccess_limit.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/http_put.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/interesting_responses.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/webdav.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/xst.rb +0 -0
- data/spec/{servers → support/servers}/plugins/autologin.rb +0 -0
- data/spec/{servers → support/servers}/plugins/autothrottle.rb +0 -0
- data/spec/{servers → support/servers}/plugins/content_types.rb +0 -0
- data/spec/{servers → support/servers}/plugins/cookie_collector.rb +0 -0
- data/spec/{servers → support/servers}/plugins/form_dicattack.rb +0 -0
- data/spec/{servers → support/servers}/plugins/healthmap.rb +0 -0
- data/spec/{servers → support/servers}/plugins/http_dicattack.rb +0 -0
- data/spec/{servers → support/servers}/plugins/http_dicattack_secure.rb +0 -0
- data/spec/{servers → support/servers}/plugins/http_dicattack_unprotected.rb +0 -0
- data/spec/{servers → support/servers}/plugins/meta/remedies/discovery.rb +1 -1
- data/spec/{servers → support/servers}/plugins/meta/remedies/timing_attacks.rb +0 -0
- data/spec/{servers → support/servers}/plugins/profiler.rb +0 -0
- data/spec/{servers → support/servers}/plugins/rescan.rb +0 -0
- data/spec/{servers → support/servers}/plugins/waf_detector.rb +0 -0
- data/spec/{shared → support/shared}/component.rb +1 -1
- data/spec/{shared → support/shared}/element/capabilities/auditable.rb +363 -194
- data/spec/{shared → support/shared}/element/capabilities/refreshable.rb +0 -0
- data/spec/support/shared/fingerprinter.rb +14 -0
- data/spec/{shared → support/shared}/module.rb +1 -1
- data/spec/{shared → support/shared}/path_extractor.rb +0 -0
- data/spec/{shared → support/shared}/plugin.rb +0 -0
- data/spec/{shared → support/shared}/reports.rb +1 -1
- data/spec/{arachni/bloom_filter_spec.rb → support/shared/support/lookup.rb} +11 -11
- metadata +936 -199
- data/lib/arachni/bloom_filter.rb +0 -74
- data/lib/arachni/buffer.rb +0 -3
- data/lib/arachni/buffer/autoflush.rb +0 -77
- data/lib/arachni/database.rb +0 -4
- data/lib/arachni/database/base.rb +0 -131
- data/modules/audit/code_injection_timing/payloads.txt +0 -4
- data/modules/audit/os_cmd_injection/payloads.txt +0 -3
- data/modules/audit/os_cmd_injection_timing/payloads.txt +0 -2
- data/modules/audit/sqli_blind_timing/payloads.txt +0 -69
- data/spec/helpers/misc.rb +0 -41
- data/spec/helpers/processes.rb +0 -112
- data/spec/helpers/requires.rb +0 -8
- data/spec/helpers/server.rb +0 -54
@@ -1,10 +1,10 @@
|
|
1
|
-
|
1
|
+
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Arachni::HTTP::CookieJar do
|
4
4
|
|
5
5
|
before do
|
6
6
|
@jar = Arachni::HTTP::CookieJar.new
|
7
|
-
@file =
|
7
|
+
@file = fixtures_path + 'cookies.txt'
|
8
8
|
end
|
9
9
|
|
10
10
|
describe '.from_file' do
|
@@ -16,40 +16,13 @@ describe Arachni::HTTP::CookieJar do
|
|
16
16
|
end
|
17
17
|
|
18
18
|
context 'when the provided file does not exist' do
|
19
|
-
it 'raises
|
19
|
+
it 'raises Arachni::HTTP::CookieJar::Error::CookieJarFileNotFound' do
|
20
20
|
trigger = proc { @jar.class.from_file( 'file' ) }
|
21
21
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
raised = true
|
27
|
-
end
|
28
|
-
raised.should be_true
|
29
|
-
|
30
|
-
raised = false
|
31
|
-
begin
|
32
|
-
trigger.call
|
33
|
-
rescue Arachni::HTTP::Error
|
34
|
-
raised = true
|
35
|
-
end
|
36
|
-
raised.should be_true
|
37
|
-
|
38
|
-
raised = false
|
39
|
-
begin
|
40
|
-
trigger.call
|
41
|
-
rescue Arachni::HTTP::CookieJar::Error
|
42
|
-
raised = true
|
43
|
-
end
|
44
|
-
raised.should be_true
|
45
|
-
|
46
|
-
raised = false
|
47
|
-
begin
|
48
|
-
trigger.call
|
49
|
-
rescue Arachni::HTTP::CookieJar::Error::CookieJarFileNotFound
|
50
|
-
raised = true
|
51
|
-
end
|
52
|
-
raised.should be_true
|
22
|
+
expect { trigger.call }.to raise_error Arachni::Error
|
23
|
+
expect { trigger.call }.to raise_error Arachni::HTTP::Error
|
24
|
+
expect { trigger.call }.to raise_error Arachni::HTTP::CookieJar::Error
|
25
|
+
expect { trigger.call }.to raise_error Arachni::HTTP::CookieJar::Error::CookieJarFileNotFound
|
53
26
|
end
|
54
27
|
end
|
55
28
|
end
|
@@ -69,14 +42,8 @@ describe Arachni::HTTP::CookieJar do
|
|
69
42
|
end
|
70
43
|
|
71
44
|
context 'when the provided file does not exist' do
|
72
|
-
it 'raises
|
73
|
-
|
74
|
-
begin
|
75
|
-
j = @jar.class.from_file( 'file' )
|
76
|
-
rescue Arachni::HTTP::CookieJar::Error::CookieJarFileNotFound
|
77
|
-
raised = true
|
78
|
-
end
|
79
|
-
raised.should be_true
|
45
|
+
it 'raises Arachni::HTTP::CookieJar::Error::CookieJarFileNotFound' do
|
46
|
+
expect { @jar.class.from_file( 'file' ) }.to raise_error Arachni::HTTP::CookieJar::Error::CookieJarFileNotFound
|
80
47
|
end
|
81
48
|
end
|
82
49
|
end
|
data/spec/arachni/http_spec.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
|
1
|
+
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Arachni::HTTP do
|
4
4
|
|
5
5
|
before( :all ) do
|
6
6
|
@opts = Arachni::Options.instance
|
7
7
|
@http = Arachni::HTTP
|
8
|
-
@url
|
8
|
+
@url = web_server_url_for( :http )
|
9
9
|
end
|
10
10
|
before( :each ){
|
11
11
|
@opts.reset
|
@@ -79,7 +79,7 @@ describe Arachni::HTTP do
|
|
79
79
|
describe 'Arachni::Options#url' do
|
80
80
|
context 'when the target URL includes auth credentials' do
|
81
81
|
it 'uses them globally' do
|
82
|
-
url = Arachni::Module::Utilities.uri_parse(
|
82
|
+
url = Arachni::Module::Utilities.uri_parse( web_server_url_for( :http_auth ) )
|
83
83
|
@opts.url = url.to_s
|
84
84
|
|
85
85
|
# first fail to make sure that our test server is actually working properly
|
@@ -256,7 +256,7 @@ describe Arachni::HTTP do
|
|
256
256
|
|
257
257
|
context 'when the cookie_jar option is set' do
|
258
258
|
it 'adds the contained cookies to the CookieJar' do
|
259
|
-
@opts.cookie_jar =
|
259
|
+
@opts.cookie_jar = fixtures_path + 'cookies.txt'
|
260
260
|
@http.cookie_jar.cookies.should be_empty
|
261
261
|
@http.reset
|
262
262
|
cookies = @http.cookie_jar.cookies
|
@@ -264,22 +264,16 @@ describe Arachni::HTTP do
|
|
264
264
|
cookies.should == Arachni::Module::Utilities.cookies_from_file( '', @opts.cookie_jar )
|
265
265
|
end
|
266
266
|
context 'but the path is invalid' do
|
267
|
-
it 'raises
|
268
|
-
@opts.cookie_jar =
|
269
|
-
|
270
|
-
begin
|
271
|
-
@http.reset
|
272
|
-
rescue Arachni::HTTP::CookieJar::Error::CookieJarFileNotFound
|
273
|
-
raised = true
|
274
|
-
end
|
275
|
-
raised.should be_true
|
267
|
+
it 'raises Arachni::HTTP::CookieJar::Error::CookieJarFileNotFound' do
|
268
|
+
@opts.cookie_jar = fixtures_path + 'cookies.does_not_exist.txt'
|
269
|
+
expect{ @http.reset }.to raise_error Arachni::HTTP::CookieJar::Error::CookieJarFileNotFound
|
276
270
|
end
|
277
271
|
end
|
278
272
|
end
|
279
273
|
|
280
274
|
context 'when the cookies option is set' do
|
281
275
|
it 'adds those cookies to the CookieJar' do
|
282
|
-
cookie_jar_file =
|
276
|
+
cookie_jar_file = fixtures_path + 'cookies.txt'
|
283
277
|
@opts.cookies = Arachni::Module::Utilities.cookies_from_file( '', cookie_jar_file )
|
284
278
|
@http.cookie_jar.cookies.should be_empty
|
285
279
|
@http.reset
|
@@ -421,13 +415,7 @@ describe Arachni::HTTP do
|
|
421
415
|
it 'raises exception when no URL is available' do
|
422
416
|
@opts.reset
|
423
417
|
@http.reset
|
424
|
-
|
425
|
-
begin
|
426
|
-
@http.request
|
427
|
-
rescue
|
428
|
-
raised = true
|
429
|
-
end
|
430
|
-
raised.should be_true
|
418
|
+
expect { @http.request }.to raise_error
|
431
419
|
end
|
432
420
|
|
433
421
|
describe :no_cookiejar do
|
data/spec/arachni/issue_spec.rb
CHANGED
@@ -1,10 +1,12 @@
|
|
1
|
-
|
1
|
+
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Arachni::Issue do
|
4
4
|
before( :all ) do
|
5
5
|
@issue_data = {
|
6
6
|
name: 'Module name',
|
7
7
|
elem: Arachni::Element::LINK,
|
8
|
+
platform: :unix,
|
9
|
+
platform_type: :os,
|
8
10
|
method: 'GET',
|
9
11
|
description: 'Issue description',
|
10
12
|
references: {
|
@@ -90,6 +92,32 @@ describe Arachni::Issue do
|
|
90
92
|
end
|
91
93
|
end
|
92
94
|
|
95
|
+
describe '#audit?' do
|
96
|
+
context 'when the issue was discovered by manipulating an input' do
|
97
|
+
it 'returns true' do
|
98
|
+
Arachni::Issue.new( issue: { var: '1' } ).audit?.should be_true
|
99
|
+
end
|
100
|
+
end
|
101
|
+
context 'when the issue was logged passively' do
|
102
|
+
it 'returns false' do
|
103
|
+
Arachni::Issue.new.audit?.should be_false
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
describe '#recon?' do
|
109
|
+
context 'when the issue was discovered by manipulating an input' do
|
110
|
+
it 'returns false' do
|
111
|
+
Arachni::Issue.new( issue: { var: '1' } ).recon?.should be_false
|
112
|
+
end
|
113
|
+
end
|
114
|
+
context 'when the issue was logged passively' do
|
115
|
+
it 'returns true' do
|
116
|
+
Arachni::Issue.new.recon?.should be_true
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
93
121
|
context 'when there\'s an :issue key' do
|
94
122
|
it 'assigns its hash contents to instance vars' do
|
95
123
|
issue = Arachni::Issue.new( issue: @issue_data )
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
require 'spec_helper'
|
2
2
|
|
3
3
|
class ObservableTest
|
4
4
|
include Arachni::Mixins::Observable
|
@@ -54,11 +54,9 @@ describe Arachni::Mixins::Observable do
|
|
54
54
|
res2.should == true
|
55
55
|
end
|
56
56
|
|
57
|
-
|
58
|
-
|
59
|
-
@obs.blah
|
60
|
-
rescue Exception => e
|
61
|
-
e.class.should == NoMethodError
|
57
|
+
context 'on invalid method name' do
|
58
|
+
it 'raises NoMethodError' do
|
59
|
+
expect { @obs.blah }.to raise_error NoMethodError
|
62
60
|
end
|
63
61
|
end
|
64
62
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
require 'spec_helper'
|
2
2
|
|
3
3
|
class AuditorTest
|
4
4
|
include Arachni::Module::Auditor
|
@@ -47,7 +47,7 @@ describe Arachni::Module::Auditor do
|
|
47
47
|
@opts = Arachni::Options.instance
|
48
48
|
@opts.audit :links, :forms, :cookies, :headers
|
49
49
|
|
50
|
-
@opts.url =
|
50
|
+
@opts.url = web_server_url_for( :auditor )
|
51
51
|
@url = @opts.url.dup
|
52
52
|
|
53
53
|
@framework = Arachni::Framework.new( @opts )
|
@@ -372,6 +372,18 @@ describe Arachni::Module::Auditor do
|
|
372
372
|
end
|
373
373
|
end
|
374
374
|
|
375
|
+
context 'when the payloads are per platform' do
|
376
|
+
it 'assigns the platform of the payload to the issue' do
|
377
|
+
@auditor.load_page_from( @url + '/link' )
|
378
|
+
@auditor.audit( { unix: @seed }, substring: @seed )
|
379
|
+
@framework.http.run
|
380
|
+
@framework.modules.results.size.should == 1
|
381
|
+
issue = @framework.modules.results.first
|
382
|
+
issue.platform.should == :unix
|
383
|
+
issue.platform_type.should == :os
|
384
|
+
end
|
385
|
+
end
|
386
|
+
|
375
387
|
context 'when called with opts' do
|
376
388
|
describe :elements do
|
377
389
|
|
@@ -468,7 +480,7 @@ describe Arachni::Module::Auditor do
|
|
468
480
|
|
469
481
|
# audit until no more new elements appear
|
470
482
|
while page = pages.pop
|
471
|
-
auditor = Arachni::Module::Base.new( page )
|
483
|
+
auditor = Arachni::Module::Base.new( page, @framework )
|
472
484
|
auditor.audit( @seed )
|
473
485
|
# run audit requests
|
474
486
|
@framework.http.run
|
@@ -494,7 +506,7 @@ describe Arachni::Module::Auditor do
|
|
494
506
|
|
495
507
|
# audit until no more new elements appear
|
496
508
|
while page = pages.pop
|
497
|
-
auditor = Arachni::Module::Base.new( page )
|
509
|
+
auditor = Arachni::Module::Base.new( page, @framework )
|
498
510
|
auditor.audit( @seed, train: true )
|
499
511
|
# run audit requests
|
500
512
|
@framework.http.run
|
@@ -519,7 +531,7 @@ describe Arachni::Module::Auditor do
|
|
519
531
|
# feed the new pages/elements back to the queue
|
520
532
|
@framework.trainer.on_new_page { |p| updated_pages << p }
|
521
533
|
|
522
|
-
auditor = Arachni::Module::Base.new( page )
|
534
|
+
auditor = Arachni::Module::Base.new( page, @framework )
|
523
535
|
auditor.audit( @seed, train: false )
|
524
536
|
@framework.http.run
|
525
537
|
updated_pages.should be_empty
|
@@ -1,16 +1,41 @@
|
|
1
|
-
|
1
|
+
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Arachni::Module::KeyFiller do
|
4
4
|
|
5
|
-
before( :all ) do
|
6
|
-
@filler = Arachni::Module::KeyFiller
|
7
|
-
@seeds = {}
|
8
|
-
@filler.regexps.keys.each { |k| @seeds[k] = nil }
|
9
|
-
end
|
10
|
-
|
11
5
|
describe '#fill' do
|
12
6
|
it 'fills in all inputs with appropriate seed values' do
|
13
|
-
|
7
|
+
described_class.fill(
|
8
|
+
'nAMe' => nil,
|
9
|
+
'usEr' => nil,
|
10
|
+
'uSR' => nil,
|
11
|
+
'pAsS' => nil,
|
12
|
+
'tXt' => nil,
|
13
|
+
'nUm' => nil,
|
14
|
+
'AmoUnt' => nil,
|
15
|
+
'mAIL' => nil,
|
16
|
+
'aCcouNt' => nil,
|
17
|
+
'iD' => nil
|
18
|
+
).should == {
|
19
|
+
'nAMe' => 'arachni_name',
|
20
|
+
'usEr' => 'arachni_user',
|
21
|
+
'uSR' => 'arachni_user',
|
22
|
+
'pAsS' => '5543!%arachni_secret',
|
23
|
+
'tXt' => 'arachni_text',
|
24
|
+
'nUm' => '132',
|
25
|
+
'AmoUnt' => '100',
|
26
|
+
'mAIL' => 'arachni@email.gr',
|
27
|
+
'aCcouNt' => '12',
|
28
|
+
'iD' => '1'
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
context 'when there is a default value' do
|
33
|
+
it 'skips it' do
|
34
|
+
with_values = {
|
35
|
+
'stuff' => 'blah'
|
36
|
+
}
|
37
|
+
described_class.fill( with_values ) == with_values
|
38
|
+
end
|
14
39
|
end
|
15
40
|
end
|
16
41
|
|
@@ -1,10 +1,8 @@
|
|
1
|
-
|
1
|
+
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Arachni::Module::Manager do
|
4
4
|
|
5
5
|
before( :all ) do
|
6
|
-
opts = Arachni::Options.instance
|
7
|
-
opts.dir['modules'] = spec_path + 'fixtures/modules/'
|
8
6
|
@modules = Arachni::Framework.new.modules
|
9
7
|
|
10
8
|
@page = Arachni::Page.new
|
@@ -1,7 +1,8 @@
|
|
1
|
-
|
1
|
+
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Arachni::Options do
|
4
4
|
before( :each ) do
|
5
|
+
ENV['ARACHNI_FRAMEWORK_LOGDIR'] = nil
|
5
6
|
@opts = Arachni::Options.instance.reset
|
6
7
|
@utils = Arachni::Module::Utilities
|
7
8
|
end
|
@@ -13,6 +14,128 @@ describe Arachni::Options do
|
|
13
14
|
Arachni::Options.url.should == url
|
14
15
|
end
|
15
16
|
|
17
|
+
describe "#dir['logs']" do
|
18
|
+
context 'when the ARACHNI_FRAMEWORK_LOGDIR environment variable' do
|
19
|
+
context 'has been set' do
|
20
|
+
it 'returns its value' do
|
21
|
+
ENV['ARACHNI_FRAMEWORK_LOGDIR'] = 'test'
|
22
|
+
described_class.reset
|
23
|
+
described_class.dir['logs'].should == 'test/'
|
24
|
+
end
|
25
|
+
end
|
26
|
+
context 'has not been set' do
|
27
|
+
it 'returns the default location' do
|
28
|
+
described_class.dir['logs'].should == "#{described_class.dir['root']}logs/"
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
describe '#grid?' do
|
35
|
+
describe 'when the option has been enabled' do
|
36
|
+
context 'via #grid=' do
|
37
|
+
it 'returns true' do
|
38
|
+
Arachni::Options.grid = true
|
39
|
+
Arachni::Options.grid?.should be_true
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
context 'via #grid_mode=' do
|
44
|
+
it 'returns true' do
|
45
|
+
Arachni::Options.grid_mode = :balance
|
46
|
+
Arachni::Options.grid?.should be_true
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
describe 'when the option has been disabled' do
|
51
|
+
context 'via #grid=' do
|
52
|
+
it 'returns false' do
|
53
|
+
Arachni::Options.grid = false
|
54
|
+
Arachni::Options.grid?.should be_false
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
context 'via #grid_mode=' do
|
59
|
+
it 'returns false' do
|
60
|
+
Arachni::Options.grid_mode = false
|
61
|
+
Arachni::Options.grid?.should be_false
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
describe 'by default' do
|
66
|
+
it 'returns false' do
|
67
|
+
Arachni::Options.grid?.should be_false
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
describe '#grid=' do
|
73
|
+
context true do
|
74
|
+
it 'is a shorthand for #grid_mode = :balance' do
|
75
|
+
Arachni::Options.grid = true
|
76
|
+
Arachni::Options.grid_mode.should == :balance
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
describe '#grid_mode=' do
|
82
|
+
context 'when given' do
|
83
|
+
context String do
|
84
|
+
it 'converts it to Symbol and sets the option' do
|
85
|
+
Arachni::Options.grid_mode = 'balance'
|
86
|
+
Arachni::Options.grid_mode.should == :balance
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
context Symbol do
|
91
|
+
it 'sets the option' do
|
92
|
+
Arachni::Options.grid_mode = :aggregate
|
93
|
+
Arachni::Options.grid_mode.should == :aggregate
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
context 'an invalid option' do
|
98
|
+
it 'raises ArgumentError' do
|
99
|
+
expect { Arachni::Options.grid_mode = :stuff }.to raise_error ArgumentError
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
describe '#grid_aggregate?' do
|
106
|
+
context 'when in :aggregate mode' do
|
107
|
+
it 'returns true' do
|
108
|
+
Arachni::Options.grid_aggregate?.should be_false
|
109
|
+
Arachni::Options.grid_mode = :aggregate
|
110
|
+
Arachni::Options.grid_aggregate?.should be_true
|
111
|
+
end
|
112
|
+
end
|
113
|
+
context 'when in :balance mode' do
|
114
|
+
it 'returns false' do
|
115
|
+
Arachni::Options.grid_aggregate?.should be_false
|
116
|
+
Arachni::Options.grid_mode = :balance
|
117
|
+
Arachni::Options.grid_aggregate?.should be_false
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
describe '#grid_balance?' do
|
123
|
+
context 'when in :balance mode' do
|
124
|
+
it 'returns true' do
|
125
|
+
Arachni::Options.grid_balance?.should be_false
|
126
|
+
Arachni::Options.grid_mode = :balance
|
127
|
+
Arachni::Options.grid_balance?.should be_true
|
128
|
+
end
|
129
|
+
end
|
130
|
+
context 'when in :balance mode' do
|
131
|
+
it 'returns false' do
|
132
|
+
Arachni::Options.grid_balance?.should be_false
|
133
|
+
Arachni::Options.grid_mode = :aggregate
|
134
|
+
Arachni::Options.grid_balance?.should be_false
|
135
|
+
end
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
16
139
|
describe '#no_protocol_for_url' do
|
17
140
|
it 'allows URLs without a protocol' do
|
18
141
|
trigger = proc { Arachni::Options.url = 'stuff:80' }
|
@@ -47,6 +170,20 @@ describe Arachni::Options do
|
|
47
170
|
end
|
48
171
|
end
|
49
172
|
|
173
|
+
describe '#min_pages_per_instance=' do
|
174
|
+
it 'forces its argument to an Integer' do
|
175
|
+
Arachni::Options.min_pages_per_instance = '55'
|
176
|
+
Arachni::Options.min_pages_per_instance.should == 55
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
describe '#max_slaves=' do
|
181
|
+
it 'forces its argument to an Integer' do
|
182
|
+
Arachni::Options.max_slaves = '56'
|
183
|
+
Arachni::Options.max_slaves.should == 56
|
184
|
+
end
|
185
|
+
end
|
186
|
+
|
50
187
|
describe '#user_agent' do
|
51
188
|
it "defaults to Arachni/v#{Arachni::VERSION}" do
|
52
189
|
Arachni::Options.user_agent.should == 'Arachni/v' + Arachni::VERSION.to_s
|
@@ -119,6 +256,53 @@ describe Arachni::Options do
|
|
119
256
|
end
|
120
257
|
end
|
121
258
|
|
259
|
+
describe '#do_not_fingerprint' do
|
260
|
+
it 'sets #no_fingerprinting to true' do
|
261
|
+
Arachni::Options.fingerprint?.should be_true
|
262
|
+
Arachni::Options.no_fingerprinting.should be_false
|
263
|
+
|
264
|
+
Arachni::Options.do_not_fingerprint
|
265
|
+
Arachni::Options.fingerprint?.should be_false
|
266
|
+
Arachni::Options.no_fingerprinting.should be_true
|
267
|
+
end
|
268
|
+
end
|
269
|
+
|
270
|
+
describe '#fingerprint' do
|
271
|
+
it 'sets #no_fingerprinting to false' do
|
272
|
+
Arachni::Options.do_not_fingerprint
|
273
|
+
Arachni::Options.fingerprint?.should be_false
|
274
|
+
Arachni::Options.no_fingerprinting.should be_true
|
275
|
+
|
276
|
+
Arachni::Options.fingerprint
|
277
|
+
|
278
|
+
Arachni::Options.fingerprint?.should be_true
|
279
|
+
Arachni::Options.no_fingerprinting.should be_false
|
280
|
+
end
|
281
|
+
end
|
282
|
+
|
283
|
+
describe '#fingerprint?' do
|
284
|
+
context 'by default' do
|
285
|
+
it 'returns true' do
|
286
|
+
Arachni::Options.fingerprint?.should be_true
|
287
|
+
end
|
288
|
+
end
|
289
|
+
context 'when crawling is enabled' do
|
290
|
+
it 'returns true' do
|
291
|
+
Arachni::Options.do_not_fingerprint
|
292
|
+
Arachni::Options.fingerprint?.should be_false
|
293
|
+
Arachni::Options.fingerprint
|
294
|
+
Arachni::Options.fingerprint?.should be_true
|
295
|
+
end
|
296
|
+
end
|
297
|
+
context 'when crawling is disabled' do
|
298
|
+
it 'returns false' do
|
299
|
+
Arachni::Options.fingerprint?.should be_true
|
300
|
+
Arachni::Options.do_not_fingerprint
|
301
|
+
Arachni::Options.fingerprint?.should be_false
|
302
|
+
end
|
303
|
+
end
|
304
|
+
end
|
305
|
+
|
122
306
|
describe '#do_not_crawl' do
|
123
307
|
it 'sets the link_count_limit to 0' do
|
124
308
|
Arachni::Options.do_not_crawl
|