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,6 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
require '
|
4
|
-
require Arachni::Options.dir['lib'] + 'rpc/client/instance'
|
5
|
-
require Arachni::Options.dir['lib'] + 'rpc/server/instance'
|
6
|
-
|
7
|
-
require Arachni::Options.dir['lib'] + 'rpc/server/distributor'
|
1
|
+
require 'spec_helper'
|
2
|
+
require Arachni::Options.dir['lib'] + 'rpc/server/base'
|
3
|
+
require Arachni::Options.dir['lib'] + 'rpc/server/framework'
|
8
4
|
|
9
5
|
class Distributor
|
10
6
|
include Arachni::RPC::Server::Framework::Distributor
|
@@ -20,16 +16,12 @@ class Distributor
|
|
20
16
|
end
|
21
17
|
|
22
18
|
def initialize( token )
|
23
|
-
@opts
|
24
|
-
@local_token
|
25
|
-
@instances
|
19
|
+
@opts = Arachni::Options.instance
|
20
|
+
@local_token = token
|
21
|
+
@instances = []
|
26
22
|
@running_slaves = Set.new
|
27
23
|
end
|
28
24
|
|
29
|
-
def self_url
|
30
|
-
@master_url
|
31
|
-
end
|
32
|
-
|
33
25
|
def dispatcher_url=( url )
|
34
26
|
@opts.datastore[:dispatcher_url] = url
|
35
27
|
end
|
@@ -42,7 +34,6 @@ end
|
|
42
34
|
class FakeMaster
|
43
35
|
|
44
36
|
attr_reader :issues
|
45
|
-
attr_reader :issue_summaries
|
46
37
|
|
47
38
|
def initialize( opts, token )
|
48
39
|
@opts = opts
|
@@ -51,10 +42,9 @@ class FakeMaster
|
|
51
42
|
|
52
43
|
@pages = []
|
53
44
|
@issues = []
|
54
|
-
@issue_summaries = []
|
55
45
|
@element_ids = []
|
56
46
|
|
57
|
-
@server.add_handler(
|
47
|
+
@server.add_handler( 'framework', self )
|
58
48
|
@server.start
|
59
49
|
end
|
60
50
|
|
@@ -63,29 +53,18 @@ class FakeMaster
|
|
63
53
|
instance_hash['url'],
|
64
54
|
instance_hash['token'])
|
65
55
|
|
66
|
-
instance.framework.
|
67
|
-
|
68
|
-
end
|
69
|
-
|
70
|
-
def update_element_ids_per_page( *args )
|
71
|
-
end
|
72
|
-
|
73
|
-
def register_issue_summaries( issues, token = nil )
|
74
|
-
return false if !valid_token?( token )
|
75
|
-
@issue_summaries |= issues
|
76
|
-
true
|
77
|
-
end
|
78
|
-
|
79
|
-
def slave_done( *args )
|
56
|
+
instance.framework.
|
57
|
+
set_master( "#{@server.opts[:host]}:#{@server.opts[:port]}", @token )
|
80
58
|
end
|
81
59
|
|
82
|
-
def
|
60
|
+
def slave_sitrep( data, url, token = nil )
|
83
61
|
return false if !valid_token?( token )
|
84
|
-
@issues |= issues
|
62
|
+
@issues |= data[:issues] || []
|
85
63
|
true
|
86
64
|
end
|
87
65
|
|
88
66
|
private
|
67
|
+
|
89
68
|
def valid_token?( token )
|
90
69
|
@token == token
|
91
70
|
end
|
@@ -94,53 +73,47 @@ end
|
|
94
73
|
|
95
74
|
describe Arachni::RPC::Server::Framework::Distributor do
|
96
75
|
before( :all ) do
|
97
|
-
@opts
|
76
|
+
@opts = Arachni::Options.instance
|
98
77
|
@opts.audit_links = true
|
99
|
-
@token
|
100
|
-
|
101
|
-
@get_instance = proc do |opts|
|
102
|
-
opts ||= @opts
|
103
|
-
opts.rpc_port = random_port
|
104
|
-
fork_em { Arachni::RPC::Server::Instance.new( opts, @token ) }
|
105
|
-
sleep 1
|
106
|
-
Arachni::RPC::Client::Instance.new( opts,
|
107
|
-
"#{opts.rpc_address}:#{opts.rpc_port}", @token
|
108
|
-
)
|
109
|
-
end
|
78
|
+
@token = 'secret'
|
110
79
|
|
111
80
|
@distributor = Distributor.new( @token )
|
112
81
|
2.times {
|
113
|
-
|
82
|
+
instance = instance_spawn
|
83
|
+
@distributor << {
|
84
|
+
'url' => instance.url,
|
85
|
+
'token' => instance_token_for( instance.url )
|
86
|
+
}
|
114
87
|
}
|
115
88
|
|
116
|
-
@url
|
117
|
-
@url2 =
|
89
|
+
@url = 'http://test.com/'
|
90
|
+
@url2 = 'http://test.com/test/'
|
118
91
|
@urls = []
|
119
92
|
|
120
93
|
url_gen = proc { |u, i| "#{u}?input_#{i}=val_#{i}" }
|
121
94
|
|
122
95
|
10.times do |i|
|
123
|
-
@urls << url_gen.call( url, i )
|
96
|
+
@urls << url_gen.call( @url, i )
|
124
97
|
end
|
125
98
|
|
126
99
|
4.times do |i|
|
127
|
-
@urls << url_gen.call( url2, i )
|
100
|
+
@urls << url_gen.call( @url2, i )
|
128
101
|
end
|
129
102
|
|
130
103
|
5.times do |i|
|
131
|
-
@urls << url_gen.call( url, i )
|
104
|
+
@urls << url_gen.call( @url, i )
|
132
105
|
end
|
133
106
|
|
134
107
|
14.times do |i|
|
135
|
-
@urls << url_gen.call( url2, i )
|
108
|
+
@urls << url_gen.call( @url2, i )
|
136
109
|
end
|
137
110
|
|
138
111
|
20.times do |i|
|
139
|
-
@urls << url_gen.call( url, i )
|
112
|
+
@urls << url_gen.call( @url, i )
|
140
113
|
end
|
141
114
|
|
142
115
|
5.times do |i|
|
143
|
-
@urls << url_gen.call( url2, i )
|
116
|
+
@urls << url_gen.call( @url2, i )
|
144
117
|
end
|
145
118
|
end
|
146
119
|
|
@@ -280,9 +253,9 @@ describe Arachni::RPC::Server::Framework::Distributor do
|
|
280
253
|
|
281
254
|
describe '#build_elem_list' do
|
282
255
|
it 'evenly distributes elements across instances' do
|
283
|
-
@opts.url =
|
284
|
-
@opts.audit_links
|
285
|
-
@opts.audit_forms
|
256
|
+
@opts.url = web_server_url_for( :parser )
|
257
|
+
@opts.audit_links = true
|
258
|
+
@opts.audit_forms = true
|
286
259
|
@opts.audit_cookies = true
|
287
260
|
@opts.audit_headers = true
|
288
261
|
|
@@ -292,8 +265,9 @@ describe Arachni::RPC::Server::Framework::Distributor do
|
|
292
265
|
async: false,
|
293
266
|
remove_id: true
|
294
267
|
).response
|
295
|
-
|
296
|
-
@distributor.build_elem_list( page ).
|
268
|
+
|
269
|
+
@distributor.build_elem_list( Arachni::Parser.new( @response, @opts ).page ).
|
270
|
+
size.should == 7
|
297
271
|
end
|
298
272
|
end
|
299
273
|
|
@@ -426,57 +400,64 @@ describe Arachni::RPC::Server::Framework::Distributor do
|
|
426
400
|
r = @distributor.distribute_elements( chunks, elem_ids_per_page )
|
427
401
|
r.should == [ %w(elem elem_4), %w(elem_2), %w(elem_1 elem_3 elem_5)]
|
428
402
|
end
|
403
|
+
|
404
|
+
it 'handles large data sets' do
|
405
|
+
elements = {}
|
406
|
+
|
407
|
+
30.times do
|
408
|
+
list = (elements[rand( 9999 )] ||= [])
|
409
|
+
|
410
|
+
1_000_000.times do
|
411
|
+
list << rand( 9999 )
|
412
|
+
end
|
413
|
+
end
|
414
|
+
|
415
|
+
@distributor.distribute_elements( elements.keys.map { |i| [i] }, elements )
|
416
|
+
end
|
429
417
|
end
|
430
418
|
|
431
419
|
describe '#preferred_dispatchers' do
|
432
420
|
it 'returns a sorted list of dispatchers for HPG use taking into account their pipe IDs and load balancing metrics' do
|
433
|
-
@opts.pool_size = 1
|
434
|
-
opts = @opts
|
435
|
-
port = random_port
|
436
|
-
|
437
421
|
dispatchers = []
|
438
422
|
|
439
|
-
opts.rpc_port = port
|
440
|
-
exec_dispatcher( opts )
|
441
423
|
|
442
|
-
|
443
|
-
dispatchers[0] = "#{opts.rpc_address}:#{opts.rpc_port}"
|
444
|
-
exec_dispatcher( opts ) do |conf|
|
445
|
-
conf.neighbour = "#{opts.rpc_address}:#{port}"
|
446
|
-
conf.pipe_id = '1'
|
447
|
-
end
|
424
|
+
d1 = dispatcher_light_spawn
|
448
425
|
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
conf.pipe_id = '2'
|
454
|
-
conf.weight = 3
|
455
|
-
end
|
426
|
+
dispatchers << dispatcher_light_spawn(
|
427
|
+
pipe_id: '1',
|
428
|
+
neighbour: d1.url
|
429
|
+
).url
|
456
430
|
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
conf.weight = 2
|
462
|
-
end
|
431
|
+
dispatchers << dispatcher_light_spawn(
|
432
|
+
pipe_id: '3',
|
433
|
+
neighbour: d1.url
|
434
|
+
).url
|
463
435
|
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
conf.weight = 4
|
470
|
-
end
|
436
|
+
dispatcher_light_spawn(
|
437
|
+
weight: 3,
|
438
|
+
pipe_id: '1',
|
439
|
+
neighbour: d1.url
|
440
|
+
)
|
471
441
|
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
442
|
+
dispatchers << dispatcher_light_spawn(
|
443
|
+
weight: 3,
|
444
|
+
pipe_id: '2',
|
445
|
+
neighbour: d1.url
|
446
|
+
).url
|
447
|
+
|
448
|
+
dispatcher_light_spawn(
|
449
|
+
weight: 2,
|
450
|
+
pipe_id: '3',
|
451
|
+
neighbour: d1.url
|
452
|
+
)
|
478
453
|
|
479
|
-
|
454
|
+
dispatchers << dispatcher_light_spawn(
|
455
|
+
weight: 4,
|
456
|
+
pipe_id: '4',
|
457
|
+
neighbour: d1.url
|
458
|
+
).url
|
459
|
+
|
460
|
+
@distributor.dispatcher_url = d1.url
|
480
461
|
|
481
462
|
q = Queue.new
|
482
463
|
@distributor.preferred_dispatchers { |d| q << d }
|
@@ -517,27 +498,26 @@ describe Arachni::RPC::Server::Framework::Distributor do
|
|
517
498
|
|
518
499
|
describe '#distribute_and_run' do
|
519
500
|
before( :all ) do
|
520
|
-
@opts.
|
521
|
-
@opts.dir['modules'] = spec_path + 'fixtures/taint_module/'
|
522
|
-
@master = FakeMaster.new( @opts, @token )
|
523
|
-
@distributor.master_url = "#{@opts.rpc_address}:#{@opts.rpc_port}"
|
501
|
+
@opts.dir['modules'] = fixtures_path + 'taint_module/'
|
524
502
|
|
525
|
-
|
526
|
-
|
527
|
-
@opts.rpc_port
|
528
|
-
|
503
|
+
@dispatcher_url = dispatcher_light_spawn.url
|
504
|
+
|
505
|
+
@opts.rpc_port = available_port
|
506
|
+
@master = FakeMaster.new( @opts, @token )
|
507
|
+
@distributor.master_url = "#{@opts.rpc_address}:#{@opts.rpc_port}"
|
529
508
|
|
530
509
|
# master's token
|
531
510
|
@opts.datastore[:token] = @token
|
532
|
-
@opts.url
|
533
|
-
@url
|
534
|
-
@opts.
|
535
|
-
|
536
|
-
@dispatcher_url = "#{@opts.rpc_address}:#{port}"
|
511
|
+
@opts.url = web_server_url_for( :framework_hpg )
|
512
|
+
@url = @opts.url
|
513
|
+
@opts.modules = %w(taint)
|
537
514
|
|
538
515
|
@get_instance_info = proc do
|
539
|
-
instance = @
|
540
|
-
info = {
|
516
|
+
instance = instance_spawn( token: @token, port: nil )
|
517
|
+
info = {
|
518
|
+
'url' => instance.url,
|
519
|
+
'token' => instance_token_for( instance )
|
520
|
+
}
|
541
521
|
@master.enslave( info )
|
542
522
|
info
|
543
523
|
end
|
@@ -545,7 +525,6 @@ describe Arachni::RPC::Server::Framework::Distributor do
|
|
545
525
|
|
546
526
|
after do
|
547
527
|
@master.issues.clear
|
548
|
-
@master.issue_summaries.clear
|
549
528
|
end
|
550
529
|
|
551
530
|
context 'when called without auditable restrictions' do
|
@@ -558,10 +537,8 @@ describe Arachni::RPC::Server::Framework::Distributor do
|
|
558
537
|
|
559
538
|
slave = @distributor.connect_to_instance( slave_info )
|
560
539
|
sleep 0.1 while slave.framework.busy?
|
561
|
-
sleep 1
|
562
540
|
|
563
541
|
@master.issues.size.should == 500
|
564
|
-
@master.issue_summaries.size.should == 500
|
565
542
|
end
|
566
543
|
end
|
567
544
|
context 'when called with auditable URL restrictions' do
|
@@ -578,10 +555,8 @@ describe Arachni::RPC::Server::Framework::Distributor do
|
|
578
555
|
|
579
556
|
slave.opts.restrict_paths.should == absolute_urls
|
580
557
|
sleep 0.1 while slave.framework.busy?
|
581
|
-
sleep 1
|
582
558
|
|
583
559
|
@master.issues.size.should == 2
|
584
|
-
@master.issue_summaries.size.should == 2
|
585
560
|
|
586
561
|
vuln_urls = @master.issues.map { |i| i.url }.sort.uniq
|
587
562
|
vuln_urls.should == absolute_urls.sort.uniq
|
@@ -605,10 +580,8 @@ describe Arachni::RPC::Server::Framework::Distributor do
|
|
605
580
|
|
606
581
|
slave = @distributor.connect_to_instance( slave_info )
|
607
582
|
sleep 0.1 while slave.framework.busy?
|
608
|
-
sleep 1
|
609
583
|
|
610
584
|
@master.issues.size.should == 2
|
611
|
-
@master.issue_summaries.size.should == 2
|
612
585
|
|
613
586
|
vuln_urls = @master.issues.map { |i| i.url }.sort.uniq
|
614
587
|
exp_urls = %w(/vulnerable?0_vulnerable_20=stuff20 /vulnerable?9_vulnerable_30=stuff30)
|
@@ -616,9 +589,9 @@ describe Arachni::RPC::Server::Framework::Distributor do
|
|
616
589
|
sort.uniq
|
617
590
|
end
|
618
591
|
context 'and new elements appear via the trainer' do
|
619
|
-
it '
|
592
|
+
it 'overrides the restrictions' do
|
620
593
|
@opts.audit_forms = true
|
621
|
-
@opts.url =
|
594
|
+
@opts.url = web_server_url_for( :auditor ) + '/train/default'
|
622
595
|
url = @opts.url.to_s
|
623
596
|
|
624
597
|
id = Arachni::Element::Form.new( url + '?',
|
@@ -632,14 +605,8 @@ describe Arachni::RPC::Server::Framework::Distributor do
|
|
632
605
|
|
633
606
|
slave = @distributor.connect_to_instance( slave_info )
|
634
607
|
sleep 0.1 while slave.framework.busy?
|
635
|
-
sleep 1
|
636
608
|
|
637
609
|
@master.issues.size.should == 8
|
638
|
-
@master.issue_summaries.size.should == 8
|
639
|
-
|
640
|
-
#@master.issues.size.should == 1
|
641
|
-
#@master.issues.first.url.should ==
|
642
|
-
# url + "?you_made_it=to+the+end+of+the+training"
|
643
610
|
end
|
644
611
|
end
|
645
612
|
end
|
@@ -687,10 +654,8 @@ describe Arachni::RPC::Server::Framework::Distributor do
|
|
687
654
|
|
688
655
|
slave = @distributor.connect_to_instance( slave_info )
|
689
656
|
sleep 0.1 while slave.framework.busy?
|
690
|
-
sleep 1
|
691
657
|
|
692
658
|
@master.issues.size.should == 4
|
693
|
-
@master.issue_summaries.size.should == 4
|
694
659
|
|
695
660
|
vuln_urls = @master.issues.map { |i| i.url }.sort.uniq
|
696
661
|
vuln_urls.should == exp_urls.sort
|
@@ -1,67 +1,24 @@
|
|
1
|
-
|
1
|
+
require 'spec_helper'
|
2
2
|
|
3
|
-
|
4
|
-
require Arachni::Options.instance.dir['lib'] + 'rpc/server/dispatcher'
|
5
|
-
|
6
|
-
describe Arachni::RPC::Server::Framework do
|
3
|
+
describe 'Arachni::RPC::Server::Framework' do
|
7
4
|
before( :all ) do
|
8
5
|
@opts = Arachni::Options.instance
|
9
6
|
@opts.dir['modules'] = fixtures_path + '/taint_module/'
|
10
7
|
@opts.audit_links = true
|
11
8
|
|
12
|
-
@
|
13
|
-
|
14
|
-
@opts.pool_size = 1
|
15
|
-
@get_instance = proc do |opts|
|
16
|
-
opts ||= @opts
|
17
|
-
port = random_port
|
18
|
-
opts.rpc_port = port
|
19
|
-
exec_dispatcher( opts )
|
20
|
-
|
21
|
-
port2 = random_port
|
22
|
-
opts.rpc_port = port2
|
23
|
-
opts.neighbour = "#{opts.rpc_address}:#{port}"
|
24
|
-
opts.pipe_id = 'blah'
|
25
|
-
exec_dispatcher( opts )
|
26
|
-
|
27
|
-
dispatcher = Arachni::RPC::Client::Dispatcher.new( opts,
|
28
|
-
"#{opts.rpc_address}:#{port}" )
|
29
|
-
|
30
|
-
inst_info = dispatcher.dispatch
|
31
|
-
inst = Arachni::RPC::Client::Instance.new( opts,
|
32
|
-
inst_info['url'], inst_info['token']
|
33
|
-
)
|
34
|
-
inst.opts.grid_mode = 'high_performance'
|
35
|
-
inst
|
36
|
-
end
|
37
|
-
|
38
|
-
@token = 'secret'
|
39
|
-
@get_simple_instance = proc do |opts|
|
40
|
-
opts ||= @opts
|
41
|
-
port = random_port
|
42
|
-
opts.rpc_port = port
|
43
|
-
fork_em { Arachni::RPC::Server::Instance.new( opts, @token ) }
|
44
|
-
sleep 1
|
45
|
-
Arachni::RPC::Client::Instance.new( opts,
|
46
|
-
"#{opts.rpc_address}:#{port}", @token
|
47
|
-
)
|
48
|
-
end
|
49
|
-
|
50
|
-
@instance = @get_instance.call
|
9
|
+
@instance = instance_grid_spawn
|
51
10
|
@framework = @instance.framework
|
52
|
-
@modules
|
53
|
-
@plugins
|
11
|
+
@modules = @instance.modules
|
12
|
+
@plugins = @instance.plugins
|
54
13
|
|
55
|
-
@instance_clean
|
14
|
+
@instance_clean = instance_grid_spawn
|
56
15
|
@framework_clean = @instance_clean.framework
|
57
16
|
|
58
17
|
@stat_keys = [
|
59
|
-
:requests, :responses, :time_out_count,
|
60
|
-
:
|
61
|
-
:
|
62
|
-
:current_page, :eta,
|
18
|
+
:requests, :responses, :time_out_count, :time, :avg, :sitemap_size,
|
19
|
+
:auditmap_size, :progress, :curr_res_time, :curr_res_cnt, :curr_avg,
|
20
|
+
:average_res_time, :max_concurrency, :current_page, :eta
|
63
21
|
]
|
64
|
-
|
65
22
|
end
|
66
23
|
|
67
24
|
describe '#errors' do
|
@@ -90,7 +47,7 @@ describe Arachni::RPC::Server::Framework do
|
|
90
47
|
end
|
91
48
|
context 'when the scan is running' do
|
92
49
|
it 'returns true' do
|
93
|
-
@instance.opts.url =
|
50
|
+
@instance.opts.url = web_server_url_for( :auditor )
|
94
51
|
@modules.load( 'taint' )
|
95
52
|
@framework.run.should be_true
|
96
53
|
@framework.busy?.should be_true
|
@@ -107,14 +64,9 @@ describe Arachni::RPC::Server::Framework do
|
|
107
64
|
@framework_clean.revision.should == Arachni::Framework::REVISION
|
108
65
|
end
|
109
66
|
end
|
110
|
-
describe '#high_performance?' do
|
111
|
-
it 'returns true' do
|
112
|
-
@framework_clean.high_performance?.should be_true
|
113
|
-
end
|
114
|
-
end
|
115
67
|
describe '#master?' do
|
116
68
|
it 'returns false' do
|
117
|
-
@framework_clean.
|
69
|
+
@framework_clean.master?.should be_true
|
118
70
|
end
|
119
71
|
end
|
120
72
|
describe '#slave?' do
|
@@ -129,7 +81,7 @@ describe Arachni::RPC::Server::Framework do
|
|
129
81
|
end
|
130
82
|
describe '#set_as_master' do
|
131
83
|
it 'sets the instance as the master' do
|
132
|
-
instance =
|
84
|
+
instance = instance_spawn
|
133
85
|
instance.framework.master?.should be_false
|
134
86
|
instance.framework.set_as_master
|
135
87
|
instance.framework.master?.should be_true
|
@@ -137,26 +89,22 @@ describe Arachni::RPC::Server::Framework do
|
|
137
89
|
end
|
138
90
|
describe '#enslave' do
|
139
91
|
it 'enslaves another instance and set itself as its master' do
|
140
|
-
master =
|
141
|
-
slave =
|
92
|
+
master = instance_spawn
|
93
|
+
slave = instance_spawn
|
142
94
|
|
143
95
|
master.framework.master?.should be_false
|
144
|
-
master.framework.enslave(
|
96
|
+
master.framework.enslave(
|
97
|
+
'url' => slave.url,
|
98
|
+
'token' => instance_token_for( slave )
|
99
|
+
)
|
145
100
|
master.framework.master?.should be_true
|
146
101
|
end
|
147
102
|
end
|
148
|
-
describe '#output' do
|
149
|
-
it 'returns the instance\'s output messages' do
|
150
|
-
output = @framework_clean.output.first
|
151
|
-
output.keys.first.is_a?( Symbol ).should be_true
|
152
|
-
output.values.first.is_a?( String ).should be_true
|
153
|
-
end
|
154
|
-
end
|
155
103
|
describe '#run' do
|
156
104
|
context 'when Options#restrict_to_paths is set' do
|
157
105
|
it 'fails with exception' do
|
158
|
-
instance =
|
159
|
-
instance.opts.url =
|
106
|
+
instance = instance_grid_spawn
|
107
|
+
instance.opts.url = web_server_url_for( :framework_hpg )
|
160
108
|
instance.opts.restrict_paths = [instance.opts.url]
|
161
109
|
instance.modules.load( 'taint' )
|
162
110
|
|
@@ -172,7 +120,7 @@ describe Arachni::RPC::Server::Framework do
|
|
172
120
|
|
173
121
|
it 'performs a scan' do
|
174
122
|
instance = @instance_clean
|
175
|
-
instance.opts.url =
|
123
|
+
instance.opts.url = web_server_url_for( :framework_hpg )
|
176
124
|
instance.modules.load( 'taint' )
|
177
125
|
instance.framework.run.should be_true
|
178
126
|
sleep( 1 ) while instance.framework.busy?
|
@@ -222,24 +170,19 @@ describe Arachni::RPC::Server::Framework do
|
|
222
170
|
end
|
223
171
|
end
|
224
172
|
describe '#clean_up' do
|
225
|
-
it 'sets the framework state to finished,
|
226
|
-
instance =
|
227
|
-
instance.opts.url =
|
173
|
+
it 'sets the framework state to finished, waits for plugins to finish and merges their results' do
|
174
|
+
instance = instance_grid_spawn
|
175
|
+
instance.opts.url = web_server_url_for( :framework_hpg )
|
228
176
|
instance.modules.load( 'taint' )
|
229
177
|
instance.plugins.load( { 'wait' => {}, 'distributable' => {} } )
|
230
178
|
instance.framework.run.should be_true
|
231
179
|
instance.framework.auditstore.plugins.should be_empty
|
232
180
|
instance.framework.busy?.should be_true
|
233
|
-
|
234
|
-
sleep 1 while instance.framework.busy?
|
181
|
+
instance.framework.clean_up.should be_true
|
235
182
|
|
236
183
|
instance_count = instance.framework.progress['instances'].size
|
237
|
-
|
238
|
-
instance.
|
239
|
-
|
240
|
-
auditstore = instance.framework.auditstore
|
241
|
-
|
242
|
-
auditstore.issues.size.should == 500
|
184
|
+
auditstore = instance.framework.auditstore
|
185
|
+
instance.service.shutdown
|
243
186
|
|
244
187
|
results = auditstore.plugins
|
245
188
|
results.should be_any
|
@@ -273,7 +216,7 @@ describe Arachni::RPC::Server::Framework do
|
|
273
216
|
data['busy'].nil?.should be_false
|
274
217
|
data['messages'].is_a?( Array ).should be_true
|
275
218
|
data['issues'].should be_any
|
276
|
-
data['instances'].size.should ==
|
219
|
+
data['instances'].size.should == 3
|
277
220
|
data.should_not include 'errors'
|
278
221
|
|
279
222
|
keys = (keys | %w(current_page)).flatten.sort
|
@@ -286,27 +229,23 @@ describe Arachni::RPC::Server::Framework do
|
|
286
229
|
describe :errors do
|
287
230
|
context 'when set to true' do
|
288
231
|
it 'includes all error messages' do
|
289
|
-
|
290
|
-
|
232
|
+
instance = instance_grid_spawn
|
233
|
+
instance.framework.progress( errors: true )['errors'].should be_empty
|
291
234
|
|
292
235
|
test = 'Test'
|
293
|
-
|
236
|
+
instance.framework.error_test test
|
294
237
|
|
295
|
-
|
296
|
-
progress( errors: true )['errors'].last.
|
297
|
-
should end_with test
|
238
|
+
instance.framework.progress( errors: true )['errors'].last.should end_with test
|
298
239
|
end
|
299
240
|
end
|
300
241
|
context 'when set to an Integer' do
|
301
242
|
it 'returns all logged errors after that line per Instance' do
|
302
|
-
|
303
|
-
progress( errors: true )['errors']
|
243
|
+
instance = instance_grid_spawn
|
304
244
|
|
305
|
-
|
306
|
-
progress( errors: 10 )['errors']
|
245
|
+
100.times { instance.framework.error_test 'test' }
|
307
246
|
|
308
|
-
|
309
|
-
|
247
|
+
(instance.framework.progress( errors: true )['errors'].size -
|
248
|
+
instance.framework.progress( errors: 10 )['errors'].size).should == 10
|
310
249
|
end
|
311
250
|
end
|
312
251
|
end
|
@@ -429,9 +368,9 @@ describe Arachni::RPC::Server::Framework do
|
|
429
368
|
@instance_clean.framework.update_page_queue( [] ).should be_false
|
430
369
|
end
|
431
370
|
end
|
432
|
-
describe '#
|
371
|
+
describe '#update_issues' do
|
433
372
|
it 'returns false' do
|
434
|
-
@instance_clean.framework.
|
373
|
+
@instance_clean.framework.update_issues( [] ).should be_false
|
435
374
|
end
|
436
375
|
end
|
437
376
|
end
|