arachni 0.4.2 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (650) hide show
  1. checksums.yaml +8 -8
  2. data/ACKNOWLEDGMENTS.md +3 -0
  3. data/CHANGELOG.md +181 -1
  4. data/README.md +68 -14
  5. data/Rakefile +1 -5
  6. data/arachni.gemspec +9 -6
  7. data/bin/arachni_multi +23 -0
  8. data/bin/arachni_rpc +2 -2
  9. data/bin/arachni_rpcd_monitor +1 -1
  10. data/fingerprinters/frameworks/rack.rb +41 -0
  11. data/fingerprinters/languages/asp.rb +42 -0
  12. data/fingerprinters/languages/aspx.rb +63 -0
  13. data/fingerprinters/languages/jsp.rb +44 -0
  14. data/fingerprinters/languages/php.rb +43 -0
  15. data/fingerprinters/languages/python.rb +40 -0
  16. data/fingerprinters/languages/ruby.rb +41 -0
  17. data/fingerprinters/os/bsd.rb +36 -0
  18. data/fingerprinters/os/linux.rb +42 -0
  19. data/fingerprinters/os/solaris.rb +41 -0
  20. data/fingerprinters/os/unix.rb +36 -0
  21. data/fingerprinters/os/windows.rb +41 -0
  22. data/fingerprinters/servers/apache.rb +36 -0
  23. data/fingerprinters/servers/iis.rb +36 -0
  24. data/fingerprinters/servers/jetty.rb +36 -0
  25. data/fingerprinters/servers/nginx.rb +36 -0
  26. data/fingerprinters/servers/tomcat.rb +36 -0
  27. data/lib/arachni/audit_store.rb +3 -4
  28. data/lib/arachni/banner.rb +0 -2
  29. data/lib/arachni/element/base.rb +25 -35
  30. data/lib/arachni/element/capabilities/auditable.rb +265 -133
  31. data/lib/arachni/element/capabilities/auditable/rdiff.rb +14 -4
  32. data/lib/arachni/element/capabilities/auditable/taint.rb +32 -10
  33. data/lib/arachni/element/capabilities/auditable/timeout.rb +59 -29
  34. data/lib/arachni/element/cookie.rb +4 -3
  35. data/lib/arachni/element/form.rb +1 -5
  36. data/lib/arachni/element/header.rb +10 -0
  37. data/lib/arachni/element/link.rb +0 -1
  38. data/lib/arachni/element_filter.rb +2 -2
  39. data/lib/arachni/framework.rb +37 -13
  40. data/lib/arachni/http.rb +3 -2
  41. data/lib/arachni/issue.rb +27 -0
  42. data/lib/arachni/module.rb +16 -0
  43. data/lib/arachni/module/auditor.rb +107 -70
  44. data/lib/arachni/module/base.rb +1 -1
  45. data/lib/arachni/module/key_filler.rb +26 -39
  46. data/lib/arachni/module/manager.rb +53 -56
  47. data/lib/arachni/options.rb +126 -19
  48. data/lib/arachni/page.rb +41 -42
  49. data/lib/arachni/parser.rb +91 -139
  50. data/lib/arachni/platform.rb +19 -0
  51. data/lib/arachni/platform/fingerprinter.rb +100 -0
  52. data/lib/arachni/platform/list.rb +293 -0
  53. data/lib/arachni/platform/manager.rb +435 -0
  54. data/lib/arachni/platforms.rb +498 -0
  55. data/lib/arachni/plugin.rb +17 -1
  56. data/lib/arachni/plugin/manager.rb +35 -36
  57. data/lib/arachni/processes.rb +27 -0
  58. data/lib/arachni/processes/dispatchers.rb +149 -0
  59. data/lib/arachni/processes/helpers.rb +19 -0
  60. data/lib/arachni/processes/helpers/dispatchers.rb +45 -0
  61. data/lib/arachni/processes/helpers/instances.rb +51 -0
  62. data/lib/arachni/processes/helpers/processes.rb +51 -0
  63. data/lib/arachni/processes/instances.rb +196 -0
  64. data/lib/arachni/processes/manager.rb +129 -0
  65. data/lib/arachni/report.rb +16 -0
  66. data/lib/arachni/rpc/client/base.rb +9 -1
  67. data/lib/arachni/rpc/server/base.rb +1 -0
  68. data/lib/arachni/rpc/server/dispatcher.rb +60 -24
  69. data/lib/arachni/rpc/server/dispatcher/handler.rb +4 -2
  70. data/lib/arachni/rpc/server/dispatcher/node.rb +8 -3
  71. data/lib/arachni/rpc/server/framework.rb +70 -772
  72. data/lib/arachni/rpc/server/{distributor.rb → framework/distributor.rb} +150 -117
  73. data/lib/arachni/rpc/server/framework/master.rb +470 -0
  74. data/lib/arachni/rpc/server/framework/multi_instance.rb +267 -0
  75. data/lib/arachni/rpc/server/framework/slave.rb +159 -0
  76. data/lib/arachni/rpc/server/instance.rb +187 -109
  77. data/lib/arachni/rpc/server/spider.rb +136 -38
  78. data/lib/arachni/ruby.rb +19 -0
  79. data/lib/arachni/ruby/hash.rb +62 -0
  80. data/lib/arachni/ruby/io.rb +49 -0
  81. data/lib/arachni/ruby/set.rb +27 -0
  82. data/lib/arachni/ruby/string.rb +17 -2
  83. data/lib/arachni/spider.rb +60 -38
  84. data/lib/arachni/support.rb +26 -0
  85. data/lib/arachni/support/buffer.rb +19 -0
  86. data/lib/arachni/support/buffer/autoflush.rb +79 -0
  87. data/lib/arachni/{buffer → support/buffer}/base.rb +1 -1
  88. data/lib/arachni/{cache.rb → support/cache.rb} +1 -1
  89. data/lib/arachni/{cache → support/cache}/base.rb +7 -9
  90. data/lib/arachni/{cache → support/cache}/least_cost_replacement.rb +7 -1
  91. data/lib/arachni/{cache → support/cache}/least_recently_used.rb +10 -34
  92. data/lib/arachni/{cache → support/cache}/preference.rb +8 -3
  93. data/lib/arachni/{cache → support/cache}/random_replacement.rb +8 -3
  94. data/lib/arachni/support/crypto.rb +18 -0
  95. data/lib/arachni/{crypto → support/crypto}/rsa_aes_cbc.rb +7 -4
  96. data/lib/arachni/support/database.rb +20 -0
  97. data/lib/arachni/support/database/base.rb +124 -0
  98. data/lib/arachni/{database → support/database}/hash.rb +1 -1
  99. data/lib/arachni/{database → support/database}/queue.rb +1 -1
  100. data/lib/arachni/support/lookup.rb +20 -0
  101. data/lib/arachni/support/lookup/base.rb +91 -0
  102. data/lib/arachni/support/lookup/hash_set.rb +42 -0
  103. data/lib/arachni/support/lookup/moolb.rb +66 -0
  104. data/lib/arachni/support/queue.rb +18 -0
  105. data/lib/arachni/support/queue/disk.rb +171 -0
  106. data/lib/arachni/trainer.rb +2 -2
  107. data/lib/arachni/ui/cli/cli.rb +22 -0
  108. data/lib/arachni/ui/cli/rpc/dispatcher_monitor.rb +7 -3
  109. data/lib/arachni/ui/cli/rpc/{rpc.rb → instance.rb} +69 -97
  110. data/lib/arachni/ui/cli/rpc/local.rb +80 -0
  111. data/lib/arachni/ui/cli/rpc/remote.rb +134 -0
  112. data/lib/arachni/ui/cli/utilities.rb +40 -5
  113. data/lib/arachni/ui/foo/output.rb +19 -16
  114. data/lib/arachni/uri.rb +35 -5
  115. data/lib/arachni/utilities.rb +5 -39
  116. data/lib/version +1 -1
  117. data/logs/Dispatcher - 21448-7331.log +17 -0
  118. data/logs/Dispatcher - 21645-1111.log +13 -0
  119. data/logs/Dispatcher - 21673-1111.log +21 -0
  120. data/modules/audit/code_injection.rb +21 -20
  121. data/modules/audit/code_injection_timing.rb +15 -13
  122. data/modules/audit/os_cmd_injection.rb +14 -10
  123. data/modules/audit/os_cmd_injection_timing.rb +12 -12
  124. data/modules/audit/path_traversal.rb +52 -47
  125. data/modules/audit/rfi.rb +25 -18
  126. data/modules/audit/sqli.rb +10 -10
  127. data/modules/audit/sqli_blind_rdiff.rb +3 -3
  128. data/modules/audit/sqli_blind_timing.rb +10 -10
  129. data/modules/audit/sqli_blind_timing/mssql.txt +9 -0
  130. data/modules/audit/sqli_blind_timing/mysql.txt +32 -0
  131. data/modules/audit/sqli_blind_timing/pgsql.txt +28 -0
  132. data/modules/audit/trainer.rb +7 -4
  133. data/modules/audit/unvalidated_redirect.rb +13 -11
  134. data/modules/audit/xpath.rb +10 -6
  135. data/modules/audit/xss_tag.rb +10 -3
  136. data/modules/recon/grep/html_objects.rb +9 -4
  137. data/plugins/defaults/content_types.rb +3 -3
  138. data/plugins/defaults/meta/remedies/timing_attacks.rb +4 -2
  139. data/plugins/defaults/meta/uniformity.rb +4 -3
  140. data/plugins/proxy.rb +42 -132
  141. data/plugins/proxy/panel/panel.html.erb +6 -0
  142. data/plugins/proxy/panel/vectors.yml.erb +9 -0
  143. data/plugins/proxy/server.rb +41 -10
  144. data/plugins/proxy/template_scope.rb +138 -0
  145. data/plugins/vector_feed.rb +12 -12
  146. data/reports/html.rb +1 -0
  147. data/spec/arachni/audit_store_spec.rb +1 -1
  148. data/spec/arachni/component/manager_spec.rb +10 -57
  149. data/spec/arachni/component/options/address_spec.rb +1 -1
  150. data/spec/arachni/component/options/base_spec.rb +1 -1
  151. data/spec/arachni/component/options/bool_spec.rb +1 -1
  152. data/spec/arachni/component/options/enum_spec.rb +1 -1
  153. data/spec/arachni/component/options/float_spec.rb +1 -1
  154. data/spec/arachni/component/options/int_spec.rb +1 -1
  155. data/spec/arachni/component/options/path_spec.rb +1 -1
  156. data/spec/arachni/component/options/port_spec.rb +1 -1
  157. data/spec/arachni/component/options/string_spec.rb +1 -1
  158. data/spec/arachni/component/options/url_spec.rb +1 -1
  159. data/spec/arachni/element/base_spec.rb +16 -5
  160. data/spec/arachni/element/body_spec.rb +1 -1
  161. data/spec/arachni/element/capabilities/auditable/rdiff_spec.rb +11 -3
  162. data/spec/arachni/element/capabilities/auditable/taint_spec.rb +27 -3
  163. data/spec/arachni/element/capabilities/auditable/timeout_spec.rb +32 -3
  164. data/spec/arachni/element/capabilities/mutable_spec.rb +1 -1
  165. data/spec/arachni/element/cookie_spec.rb +21 -7
  166. data/spec/arachni/element/form_spec.rb +7 -58
  167. data/spec/arachni/element/header_spec.rb +15 -3
  168. data/spec/arachni/element/link_spec.rb +3 -26
  169. data/spec/arachni/element/path_spec.rb +1 -1
  170. data/spec/arachni/element/server_spec.rb +1 -1
  171. data/spec/arachni/element_filter_spec.rb +1 -1
  172. data/spec/arachni/{error.rb → error_spec.rb} +1 -1
  173. data/spec/arachni/framework_spec.rb +127 -50
  174. data/spec/arachni/http/cookie_jar_spec.rb +9 -42
  175. data/spec/arachni/http_spec.rb +9 -21
  176. data/spec/arachni/issue_spec.rb +29 -1
  177. data/spec/arachni/mixins/observable_spec.rb +4 -6
  178. data/spec/arachni/mixins/progress_bar_spec.rb +1 -1
  179. data/spec/arachni/module/auditor_spec.rb +17 -5
  180. data/spec/arachni/module/key_filler.rb +33 -8
  181. data/spec/arachni/module/manager_spec.rb +1 -3
  182. data/spec/arachni/module/utilities_spec.rb +1 -1
  183. data/spec/arachni/options_spec.rb +185 -1
  184. data/spec/arachni/page_spec.rb +16 -3
  185. data/spec/arachni/parser_spec.rb +27 -123
  186. data/spec/arachni/platform/fingerprinter_spec.rb +159 -0
  187. data/spec/arachni/platform/list_spec.rb +399 -0
  188. data/spec/arachni/platform/manager_spec.rb +373 -0
  189. data/spec/arachni/plugin/manager_spec.rb +6 -29
  190. data/spec/arachni/report/base_spec.rb +2 -2
  191. data/spec/arachni/report/manager_spec.rb +2 -2
  192. data/spec/arachni/rpc/client/base_spec.rb +22 -27
  193. data/spec/arachni/rpc/client/dispatcher_spec.rb +4 -15
  194. data/spec/arachni/rpc/client/instance_spec.rb +3 -11
  195. data/spec/arachni/rpc/server/active_options_spec.rb +2 -17
  196. data/spec/arachni/rpc/server/base_spec.rb +23 -7
  197. data/spec/arachni/rpc/server/dispatcher/handler_spec.rb +4 -21
  198. data/spec/arachni/rpc/server/dispatcher/node_spec.rb +30 -8
  199. data/spec/arachni/rpc/server/dispatcher_spec.rb +130 -70
  200. data/spec/arachni/rpc/server/{distributor_spec.rb → framework/distributor_spec.rb} +95 -130
  201. data/spec/arachni/rpc/server/framework_hpg_spec.rb +38 -99
  202. data/spec/arachni/rpc/server/framework_simple_spec.rb +38 -71
  203. data/spec/arachni/rpc/server/instance_spec.rb +183 -135
  204. data/spec/arachni/rpc/server/modules/manager_spec.rb +18 -50
  205. data/spec/arachni/rpc/server/output_spec.rb +1 -1
  206. data/spec/arachni/rpc/server/plugin/manager_spec.rb +12 -36
  207. data/spec/arachni/rpc/server/spider_spec.rb +23 -48
  208. data/spec/arachni/ruby/array_spec.rb +1 -1
  209. data/spec/arachni/ruby/enumerable_spec.rb +1 -1
  210. data/spec/arachni/ruby/hash_spec.rb +70 -0
  211. data/spec/arachni/ruby/io_spec.rb +26 -0
  212. data/spec/arachni/ruby/object_spec.rb +1 -1
  213. data/spec/arachni/ruby/set_spec.rb +15 -0
  214. data/spec/arachni/ruby/string_spec.rb +18 -1
  215. data/spec/arachni/ruby/webrick_spec.rb +1 -1
  216. data/spec/arachni/session_spec.rb +3 -3
  217. data/spec/arachni/spider_spec.rb +30 -6
  218. data/spec/arachni/{buffer → support/buffer}/autoflush_spec.rb +7 -12
  219. data/spec/arachni/{buffer → support/buffer}/base_spec.rb +19 -23
  220. data/spec/arachni/{cache → support/cache}/base_spec.rb +7 -7
  221. data/spec/arachni/{cache → support/cache}/least_cost_replacement_spec.rb +3 -3
  222. data/spec/arachni/{cache → support/cache}/least_recently_used_spec.rb +3 -3
  223. data/spec/arachni/{cache → support/cache}/preference_spec.rb +3 -3
  224. data/spec/arachni/{cache → support/cache}/random_replacement_spec.rb +3 -3
  225. data/spec/arachni/{crypto → support/crypto}/rsa_aes_cbc_spec.rb +3 -5
  226. data/spec/arachni/{database → support/database}/hash_spec.rb +4 -5
  227. data/spec/arachni/{database → support/database}/queue_spec.rb +3 -4
  228. data/spec/arachni/support/lookup/hash_set_spec.rb +5 -0
  229. data/spec/arachni/support/lookup/moolb_spec.rb +41 -0
  230. data/spec/arachni/support/queue/disk_spec.rb +116 -0
  231. data/spec/arachni/trainer_spec.rb +6 -2
  232. data/spec/arachni/typhoeus/hydra_spec.rb +1 -1
  233. data/spec/arachni/typhoeus/requrest_spec.rb +1 -1
  234. data/spec/arachni/typhoeus/response_spec.rb +1 -1
  235. data/spec/arachni/uri_spec.rb +72 -38
  236. data/spec/arachni/utilities_spec.rb +6 -46
  237. data/spec/fingerprinters/frameworks/rack_spec.rb +41 -0
  238. data/spec/fingerprinters/languages/asp_spec.rb +40 -0
  239. data/spec/fingerprinters/languages/aspx_spec.rb +78 -0
  240. data/spec/fingerprinters/languages/jsp_spec.rb +58 -0
  241. data/spec/fingerprinters/languages/php_spec.rb +61 -0
  242. data/spec/fingerprinters/languages/python_spec.rb +23 -0
  243. data/spec/fingerprinters/languages/ruby.rb +34 -0
  244. data/spec/fingerprinters/os/bsd_spec.rb +26 -0
  245. data/spec/fingerprinters/os/linux_spec.rb +34 -0
  246. data/spec/fingerprinters/os/solaris_spec.rb +34 -0
  247. data/spec/fingerprinters/os/unix_spec.rb +26 -0
  248. data/spec/fingerprinters/os/windows_spec.rb +34 -0
  249. data/spec/fingerprinters/servers/apache_spec.rb +26 -0
  250. data/spec/fingerprinters/servers/iis_spec.rb +28 -0
  251. data/spec/fingerprinters/servers/jetty_spec.rb +28 -0
  252. data/spec/fingerprinters/servers/nginx_spec.rb +26 -0
  253. data/spec/fingerprinters/servers/tomcat_spec.rb +28 -0
  254. data/spec/modules/audit/code_injection_spec.rb +2 -2
  255. data/spec/modules/audit/code_injection_timing_spec.rb +1 -1
  256. data/spec/modules/audit/csrf_spec.rb +1 -1
  257. data/spec/modules/audit/ldapi_spec.rb +1 -1
  258. data/spec/modules/audit/os_cmd_injection_spec.rb +1 -1
  259. data/spec/modules/audit/os_cmd_injection_timing_spec.rb +2 -2
  260. data/spec/modules/audit/path_traversal_spec.rb +1 -1
  261. data/spec/modules/audit/response_splitting_spec.rb +1 -1
  262. data/spec/modules/audit/rfi_spec.rb +1 -1
  263. data/spec/modules/audit/session_fixation_spec.rb +1 -1
  264. data/spec/modules/audit/sqli_blind_rdiff_spec.rb +1 -1
  265. data/spec/modules/audit/sqli_blind_timing_spec.rb +4 -4
  266. data/spec/modules/audit/sqli_spec.rb +2 -2
  267. data/spec/modules/audit/trainer_spec.rb +11 -1
  268. data/spec/modules/audit/unvalidated_redirect_spec.rb +1 -1
  269. data/spec/modules/audit/xpath_spec.rb +1 -1
  270. data/spec/modules/audit/xss_event_spec.rb +1 -1
  271. data/spec/modules/audit/xss_path_spec.rb +1 -1
  272. data/spec/modules/audit/xss_script_tag_spec.rb +1 -1
  273. data/spec/modules/audit/xss_spec.rb +1 -1
  274. data/spec/modules/audit/xss_tag_spec.rb +1 -1
  275. data/spec/modules/recon/allowed_methods_spec.rb +1 -1
  276. data/spec/modules/recon/backdoors_spec.rb +1 -1
  277. data/spec/modules/recon/backup_files_spec.rb +1 -1
  278. data/spec/modules/recon/common_directories_spec.rb +1 -1
  279. data/spec/modules/recon/common_files_spec.rb +1 -1
  280. data/spec/modules/recon/directory_listing_spec.rb +1 -1
  281. data/spec/modules/recon/grep/captcha_spec.rb +1 -1
  282. data/spec/modules/recon/grep/credit_card_spec.rb +1 -1
  283. data/spec/modules/recon/grep/cvs_svn_users_spec.rb +1 -1
  284. data/spec/modules/recon/grep/emails_spec.rb +1 -1
  285. data/spec/modules/recon/grep/html_objects_spec.rb +1 -1
  286. data/spec/modules/recon/grep/http_only_cookies_spec.rb +1 -1
  287. data/spec/modules/recon/grep/insecure_cookies_spec.rb +1 -1
  288. data/spec/modules/recon/grep/mixed_resource_spec.rb +1 -1
  289. data/spec/modules/recon/grep/password_autocomplete_spec.rb +1 -1
  290. data/spec/modules/recon/grep/private_ip_spec.rb +1 -1
  291. data/spec/modules/recon/grep/ssn_spec.rb +1 -1
  292. data/spec/modules/recon/grep/unencrypted_password_forms_spec.rb +1 -1
  293. data/spec/modules/recon/htaccess_limit_spec.rb +1 -1
  294. data/spec/modules/recon/http_put_spec.rb +1 -1
  295. data/spec/modules/recon/interesting_responses_spec.rb +1 -1
  296. data/spec/modules/recon/webdav_spec.rb +1 -1
  297. data/spec/modules/recon/xst_spec.rb +1 -1
  298. data/spec/path_extractors/anchors_spec.rb +1 -1
  299. data/spec/path_extractors/areas_spec.rb +1 -1
  300. data/spec/path_extractors/forms_spec.rb +1 -1
  301. data/spec/path_extractors/frames_spec.rb +1 -1
  302. data/spec/path_extractors/generic_spec.rb +1 -1
  303. data/spec/path_extractors/links_spec.rb +1 -1
  304. data/spec/path_extractors/meta_refresh_spec.rb +1 -1
  305. data/spec/path_extractors/scripts_spec.rb +1 -1
  306. data/spec/plugins/autologin_spec.rb +1 -1
  307. data/spec/plugins/autothrottle_spec.rb +2 -2
  308. data/spec/plugins/content_types_spec.rb +1 -1
  309. data/spec/plugins/cookie_collector_spec.rb +1 -1
  310. data/spec/plugins/form_dicattack_spec.rb +7 -7
  311. data/spec/plugins/healthmap_spec.rb +1 -1
  312. data/spec/plugins/http_dicattack_spec.rb +6 -6
  313. data/spec/plugins/meta/remedies/discovery_spec.rb +1 -1
  314. data/spec/plugins/meta/remedies/timing_attacks_spec.rb +1 -1
  315. data/spec/plugins/meta/uniformity_spec.rb +1 -1
  316. data/spec/plugins/profiler_spec.rb +3 -3
  317. data/spec/plugins/rescan_spec.rb +3 -3
  318. data/spec/plugins/resolver_spec.rb +1 -1
  319. data/spec/plugins/script_spec.rb +2 -2
  320. data/spec/plugins/vector_feed_spec.rb +13 -1
  321. data/spec/plugins/waf_detector_spec.rb +2 -2
  322. data/spec/reports/afr_spec.rb +1 -1
  323. data/spec/reports/ap_spec.rb +1 -1
  324. data/spec/reports/html_spec.rb +1 -1
  325. data/spec/reports/json_spec.rb +1 -1
  326. data/spec/reports/marshal_spec.rb +1 -1
  327. data/spec/reports/stdout_spec.rb +1 -1
  328. data/spec/reports/txt_spec.rb +1 -1
  329. data/spec/reports/xml_spec.rb +1 -1
  330. data/spec/reports/yaml_spec.rb +1 -1
  331. data/spec/spec_helper.rb +27 -32
  332. data/spec/{fixtures → support/fixtures}/auditstore.afr +0 -0
  333. data/spec/{fixtures → support/fixtures}/cookies.txt +0 -0
  334. data/spec/support/fixtures/fingerprinters/test.rb +36 -0
  335. data/spec/{fixtures → support/fixtures}/modules/test.rb +0 -0
  336. data/spec/{fixtures → support/fixtures}/modules/test2.rb +0 -0
  337. data/spec/{fixtures → support/fixtures}/modules/test3.rb +0 -0
  338. data/spec/{fixtures → support/fixtures}/passwords.txt +0 -0
  339. data/spec/{fixtures → support/fixtures}/plugins/bad.rb +0 -0
  340. data/spec/{fixtures → support/fixtures}/plugins/defaults/default.rb +0 -0
  341. data/spec/{fixtures → support/fixtures}/plugins/distributable.rb +0 -0
  342. data/spec/{fixtures → support/fixtures}/plugins/loop.rb +0 -0
  343. data/spec/{fixtures → support/fixtures}/plugins/spider_hook.rb +1 -0
  344. data/spec/{fixtures → support/fixtures}/plugins/wait.rb +0 -0
  345. data/spec/{fixtures → support/fixtures}/plugins/with_options.rb +0 -0
  346. data/spec/{fixtures → support/fixtures}/reports/base_spec/plugin_formatters/with_formatters/foobar.rb +0 -0
  347. data/spec/{fixtures → support/fixtures}/reports/base_spec/with_formatters.rb +0 -0
  348. data/spec/{fixtures → support/fixtures}/reports/base_spec/with_outfile.rb +0 -0
  349. data/spec/{fixtures → support/fixtures}/reports/base_spec/without_outfile.rb +0 -0
  350. data/spec/{fixtures → support/fixtures}/reports/manager_spec/afr.rb +0 -0
  351. data/spec/{fixtures → support/fixtures}/reports/manager_spec/foo.rb +0 -0
  352. data/spec/{fixtures → support/fixtures}/rescan.afr.tpl +0 -0
  353. data/spec/{fixtures → support/fixtures}/rpcd_handlers/echo.rb +0 -0
  354. data/spec/{fixtures → support/fixtures}/run_mod/body.rb +0 -0
  355. data/spec/{fixtures → support/fixtures}/run_mod/cookies.rb +0 -0
  356. data/spec/{fixtures → support/fixtures}/run_mod/empty.rb +0 -0
  357. data/spec/{fixtures → support/fixtures}/run_mod/flch.rb +0 -0
  358. data/spec/{fixtures → support/fixtures}/run_mod/forms.rb +0 -0
  359. data/spec/{fixtures → support/fixtures}/run_mod/headers.rb +0 -0
  360. data/spec/{fixtures → support/fixtures}/run_mod/links.rb +0 -0
  361. data/spec/{fixtures → support/fixtures}/run_mod/nil.rb +0 -0
  362. data/spec/{fixtures → support/fixtures}/run_mod/path.rb +0 -0
  363. data/spec/{fixtures → support/fixtures}/run_mod/server.rb +0 -0
  364. data/spec/{fixtures → support/fixtures}/script_plugin.rb +0 -0
  365. data/spec/{fixtures → support/fixtures}/taint_module/taint.rb +0 -0
  366. data/spec/{fixtures → support/fixtures}/usernames.txt +0 -0
  367. data/spec/{fixtures → support/fixtures}/wait_module/wait.rb +0 -0
  368. data/spec/{helpers → support/helpers}/auditor.rb +0 -0
  369. data/spec/support/helpers/framework.rb +19 -0
  370. data/spec/support/helpers/misc.rb +19 -0
  371. data/spec/support/helpers/paths.rb +31 -0
  372. data/spec/support/helpers/requires.rb +24 -0
  373. data/spec/support/helpers/resets.rb +42 -0
  374. data/spec/support/helpers/web_server.rb +27 -0
  375. data/spec/support/lib/web_server_manager.rb +120 -0
  376. data/spec/support/logs/Dispatcher - 11642-42685.log +9 -0
  377. data/spec/support/logs/Dispatcher - 11669-58445.log +21 -0
  378. data/spec/support/logs/Dispatcher - 11803-19013.log +9 -0
  379. data/spec/support/logs/Dispatcher - 11813-58646.log +19 -0
  380. data/spec/support/logs/Dispatcher - 11822-1913.log +17 -0
  381. data/spec/support/logs/Dispatcher - 11831-60571.log +13 -0
  382. data/spec/support/logs/Dispatcher - 11840-20151.log +9 -0
  383. data/spec/support/logs/Dispatcher - 11850-21796.log +9 -0
  384. data/spec/support/logs/Dispatcher - 11859-47650.log +11 -0
  385. data/spec/support/logs/Dispatcher - 11872-13669.log +11 -0
  386. data/spec/support/logs/Dispatcher - 11885-40034.log +35 -0
  387. data/spec/support/logs/Dispatcher - 11946-10629.log +21 -0
  388. data/spec/support/logs/Dispatcher - 11955-55497.log +21 -0
  389. data/spec/support/logs/Dispatcher - 11964-33080.log +23 -0
  390. data/spec/support/logs/Dispatcher - 12005-28558.log +19 -0
  391. data/spec/support/logs/Dispatcher - 12014-59368.log +17 -0
  392. data/spec/support/logs/Dispatcher - 12023-41547.log +15 -0
  393. data/spec/support/logs/Dispatcher - 12037-54838.log +11 -0
  394. data/spec/support/logs/Dispatcher - 12050-38840.log +9 -0
  395. data/spec/support/logs/Dispatcher - 12059-7283.log +9 -0
  396. data/spec/support/logs/Dispatcher - 12068-19765.log +9 -0
  397. data/spec/support/logs/Dispatcher - 12077-24147.log +9 -0
  398. data/spec/support/logs/Dispatcher - 12086-60404.log +11 -0
  399. data/spec/support/logs/Dispatcher - 12099-43307.log +9 -0
  400. data/spec/support/logs/Dispatcher - 12109-9701.log +9 -0
  401. data/spec/support/logs/Dispatcher - 12162-19782.log +63 -0
  402. data/spec/support/logs/Dispatcher - 12171-35883.log +43 -0
  403. data/spec/support/logs/Dispatcher - 12180-6456.log +39 -0
  404. data/spec/support/logs/Dispatcher - 12189-64516.log +34 -0
  405. data/spec/support/logs/Dispatcher - 12198-50800.log +28 -0
  406. data/spec/support/logs/Dispatcher - 12207-6148.log +21 -0
  407. data/spec/support/logs/Dispatcher - 12216-45994.log +13 -0
  408. data/spec/support/logs/Dispatcher - 12226-59932.log +9 -0
  409. data/spec/support/logs/Dispatcher - 12369-42683.log +19 -0
  410. data/spec/support/logs/Dispatcher - 12379-51205.log +21 -0
  411. data/spec/support/logs/Dispatcher - 12388-15229.log +15 -0
  412. data/spec/support/logs/Dispatcher - 12401-35502.log +19 -0
  413. data/spec/support/logs/Dispatcher - 12410-3386.log +21 -0
  414. data/spec/support/logs/Dispatcher - 12419-16056.log +15 -0
  415. data/spec/support/logs/Dispatcher - 12540-25763.log +17 -0
  416. data/spec/support/logs/Dispatcher - 12549-49234.log +21 -0
  417. data/spec/support/logs/Dispatcher - 12558-61027.log +13 -0
  418. data/spec/support/logs/Dispatcher - 12571-34789.log +19 -0
  419. data/spec/support/logs/Dispatcher - 12580-27968.log +21 -0
  420. data/spec/support/logs/Dispatcher - 12589-38100.log +15 -0
  421. data/spec/support/logs/Dispatcher - 12643-8172.log +17 -0
  422. data/spec/support/logs/Dispatcher - 12652-44715.log +21 -0
  423. data/spec/support/logs/Dispatcher - 12661-40547.log +13 -0
  424. data/spec/support/logs/Dispatcher - 12674-20100.log +17 -0
  425. data/spec/support/logs/Dispatcher - 12683-57063.log +21 -0
  426. data/spec/support/logs/Dispatcher - 12692-20974.log +13 -0
  427. data/spec/support/logs/Dispatcher - 12920-24047.log +19 -0
  428. data/spec/support/logs/Dispatcher - 12929-13265.log +21 -0
  429. data/spec/support/logs/Dispatcher - 12938-38472.log +15 -0
  430. data/spec/support/logs/Dispatcher - 12962-47051.log +21 -0
  431. data/spec/support/logs/Dispatcher - 12971-48844.log +25 -0
  432. data/spec/support/logs/Dispatcher - 12980-2331.log +15 -0
  433. data/spec/support/logs/Dispatcher - 13016-57455.log +17 -0
  434. data/spec/support/logs/Dispatcher - 13025-44069.log +21 -0
  435. data/spec/support/logs/Dispatcher - 13034-59986.log +13 -0
  436. data/spec/support/logs/Dispatcher - 13047-17338.log +21 -0
  437. data/spec/support/logs/Dispatcher - 13056-57124.log +25 -0
  438. data/spec/support/logs/Dispatcher - 13065-3014.log +15 -0
  439. data/spec/support/logs/Dispatcher - 13101-42040.log +17 -0
  440. data/spec/support/logs/Dispatcher - 13110-29137.log +21 -0
  441. data/spec/support/logs/Dispatcher - 13119-52878.log +13 -0
  442. data/spec/support/logs/Dispatcher - 13132-20646.log +17 -0
  443. data/spec/support/logs/Dispatcher - 13141-21629.log +21 -0
  444. data/spec/support/logs/Dispatcher - 13150-42002.log +13 -0
  445. data/spec/support/logs/Dispatcher - 8291-38888.log +9 -0
  446. data/spec/support/logs/Dispatcher - 8325-2241.log +21 -0
  447. data/spec/support/logs/Dispatcher - 8458-40239.log +9 -0
  448. data/spec/support/logs/Dispatcher - 8468-26555.log +19 -0
  449. data/spec/support/logs/Dispatcher - 8477-28819.log +17 -0
  450. data/spec/support/logs/Dispatcher - 8486-36985.log +13 -0
  451. data/spec/support/logs/Dispatcher - 8495-59407.log +9 -0
  452. data/spec/support/logs/Dispatcher - 8504-27479.log +9 -0
  453. data/spec/support/logs/Dispatcher - 8513-51807.log +11 -0
  454. data/spec/support/logs/Dispatcher - 8526-53739.log +11 -0
  455. data/spec/support/logs/Dispatcher - 8539-55908.log +35 -0
  456. data/spec/support/logs/Dispatcher - 8603-24287.log +21 -0
  457. data/spec/support/logs/Dispatcher - 8612-37320.log +21 -0
  458. data/spec/support/logs/Dispatcher - 8621-60797.log +23 -0
  459. data/spec/support/logs/Dispatcher - 8662-56395.log +19 -0
  460. data/spec/support/logs/Dispatcher - 8671-54268.log +17 -0
  461. data/spec/support/logs/Dispatcher - 8680-32387.log +15 -0
  462. data/spec/support/logs/Dispatcher - 8693-60728.log +11 -0
  463. data/spec/support/logs/Dispatcher - 8706-53092.log +9 -0
  464. data/spec/support/logs/Dispatcher - 8715-35576.log +9 -0
  465. data/spec/support/logs/Dispatcher - 8724-9842.log +9 -0
  466. data/spec/support/logs/Dispatcher - 8734-37290.log +9 -0
  467. data/spec/support/logs/Dispatcher - 8743-46516.log +11 -0
  468. data/spec/support/logs/Dispatcher - 8756-59294.log +9 -0
  469. data/spec/support/logs/Dispatcher - 8765-16318.log +9 -0
  470. data/spec/support/logs/Dispatcher - 8818-35968.log +63 -0
  471. data/spec/support/logs/Dispatcher - 8827-57068.log +43 -0
  472. data/spec/support/logs/Dispatcher - 8836-31238.log +39 -0
  473. data/spec/support/logs/Dispatcher - 8845-48148.log +34 -0
  474. data/spec/support/logs/Dispatcher - 8854-17355.log +28 -0
  475. data/spec/support/logs/Dispatcher - 8863-6616.log +21 -0
  476. data/spec/support/logs/Dispatcher - 8872-1373.log +13 -0
  477. data/spec/support/logs/Dispatcher - 8882-40014.log +9 -0
  478. data/spec/support/logs/Dispatcher - 8989-17108.log +19 -0
  479. data/spec/support/logs/Dispatcher - 9000-23195.log +21 -0
  480. data/spec/support/logs/Dispatcher - 9009-33836.log +15 -0
  481. data/spec/support/logs/Dispatcher - 9022-55515.log +19 -0
  482. data/spec/support/logs/Dispatcher - 9031-51301.log +21 -0
  483. data/spec/support/logs/Dispatcher - 9040-10025.log +15 -0
  484. data/spec/support/logs/Dispatcher - 9180-20874.log +17 -0
  485. data/spec/support/logs/Dispatcher - 9189-29826.log +21 -0
  486. data/spec/support/logs/Dispatcher - 9198-21818.log +13 -0
  487. data/spec/support/logs/Dispatcher - 9211-64830.log +19 -0
  488. data/spec/support/logs/Dispatcher - 9220-2570.log +21 -0
  489. data/spec/support/logs/Dispatcher - 9229-45654.log +15 -0
  490. data/spec/support/logs/Dispatcher - 9286-1284.log +17 -0
  491. data/spec/support/logs/Dispatcher - 9295-58545.log +21 -0
  492. data/spec/support/logs/Dispatcher - 9304-52355.log +13 -0
  493. data/spec/support/logs/Dispatcher - 9317-58138.log +17 -0
  494. data/spec/support/logs/Dispatcher - 9326-39184.log +21 -0
  495. data/spec/support/logs/Dispatcher - 9336-44714.log +13 -0
  496. data/spec/support/logs/Dispatcher - 9555-26114.log +19 -0
  497. data/spec/support/logs/Dispatcher - 9564-2270.log +21 -0
  498. data/spec/support/logs/Dispatcher - 9573-26148.log +15 -0
  499. data/spec/support/logs/Dispatcher - 9597-62247.log +21 -0
  500. data/spec/support/logs/Dispatcher - 9606-16162.log +25 -0
  501. data/spec/support/logs/Dispatcher - 9615-8643.log +15 -0
  502. data/spec/support/logs/Dispatcher - 9651-49224.log +17 -0
  503. data/spec/support/logs/Dispatcher - 9660-4390.log +21 -0
  504. data/spec/support/logs/Dispatcher - 9669-18266.log +13 -0
  505. data/spec/support/logs/Dispatcher - 9682-44582.log +21 -0
  506. data/spec/support/logs/Dispatcher - 9691-15941.log +25 -0
  507. data/spec/support/logs/Dispatcher - 9700-22186.log +15 -0
  508. data/spec/support/logs/Dispatcher - 9736-29672.log +17 -0
  509. data/spec/support/logs/Dispatcher - 9745-33231.log +21 -0
  510. data/spec/support/logs/Dispatcher - 9754-48381.log +13 -0
  511. data/spec/support/logs/Dispatcher - 9767-29812.log +17 -0
  512. data/spec/support/logs/Dispatcher - 9776-9894.log +21 -0
  513. data/spec/support/logs/Dispatcher - 9785-1421.log +13 -0
  514. data/spec/support/logs/Instance - 12384-38605.error.log +328 -0
  515. data/spec/support/logs/Instance - 12657-2379.error.log +328 -0
  516. data/spec/support/logs/Instance - 12688-50940.error.log +427 -0
  517. data/spec/support/logs/Instance - 12708-13716.error.log +326 -0
  518. data/spec/support/logs/Instance - 12714-45400.error.log +328 -0
  519. data/spec/support/logs/Instance - 12848-32645.error.log +326 -0
  520. data/spec/support/logs/Instance - 9005-21883.error.log +328 -0
  521. data/spec/support/logs/Instance - 9300-33102.error.log +328 -0
  522. data/spec/support/logs/Instance - 9331-48336.error.log +427 -0
  523. data/spec/support/logs/Instance - 9352-62807.error.log +326 -0
  524. data/spec/support/logs/Instance - 9358-45154.error.log +328 -0
  525. data/spec/support/logs/Instance - 9487-8746.error.log +326 -0
  526. data/spec/{logs → support/logs}/placeholder +0 -0
  527. data/spec/{pems → support/pems}/cacert.pem +0 -0
  528. data/spec/{pems → support/pems}/client/cert.pem +0 -0
  529. data/spec/{pems → support/pems}/client/foo-cert.pem +0 -0
  530. data/spec/{pems → support/pems}/client/foo-key.pem +0 -0
  531. data/spec/{pems → support/pems}/client/key.pem +0 -0
  532. data/spec/{pems → support/pems}/server/cert.pem +0 -0
  533. data/spec/{pems → support/pems}/server/key.pem +0 -0
  534. data/spec/{servers → support/servers}/arachni/element/capabilities/auditable/rdiff.rb +0 -0
  535. data/spec/{servers → support/servers}/arachni/element/capabilities/auditable/taint.rb +0 -0
  536. data/spec/{servers → support/servers}/arachni/element/capabilities/auditable/timeout.rb +0 -0
  537. data/spec/{servers → support/servers}/arachni/element/cookie.rb +0 -0
  538. data/spec/{servers → support/servers}/arachni/element/form.rb +0 -0
  539. data/spec/{servers → support/servers}/arachni/element/header.rb +0 -0
  540. data/spec/{servers → support/servers}/arachni/element/link.rb +0 -0
  541. data/spec/{servers → support/servers}/arachni/framework.rb +0 -0
  542. data/spec/{servers → support/servers}/arachni/http.rb +0 -0
  543. data/spec/{servers → support/servers}/arachni/http_auth.rb +0 -0
  544. data/spec/{servers → support/servers}/arachni/module/auditor.rb +0 -0
  545. data/spec/{servers → support/servers}/arachni/parser.rb +0 -0
  546. data/spec/{servers → support/servers}/arachni/rpc/server/framework_hpg.rb +0 -1
  547. data/spec/{servers → support/servers}/arachni/rpc/server/framework_simple.rb +0 -0
  548. data/spec/{servers → support/servers}/arachni/session.rb +0 -0
  549. data/spec/{servers → support/servers}/arachni/spider.rb +0 -0
  550. data/spec/{servers → support/servers}/arachni/spider_https.rb +0 -0
  551. data/spec/{servers → support/servers}/arachni/trainer.rb +0 -0
  552. data/spec/{servers → support/servers}/modules/audit/code_injection.rb +3 -4
  553. data/spec/{servers → support/servers}/modules/audit/code_injection_timing.rb +0 -0
  554. data/spec/{servers → support/servers}/modules/audit/csrf.rb +0 -0
  555. data/spec/{servers → support/servers}/modules/audit/ldapi.rb +1 -1
  556. data/spec/{servers → support/servers}/modules/audit/os_cmd_injection.rb +0 -0
  557. data/spec/{servers → support/servers}/modules/audit/os_cmd_injection_timing.rb +1 -10
  558. data/spec/{servers → support/servers}/modules/audit/path_traversal.rb +0 -0
  559. data/spec/{servers → support/servers}/modules/audit/response_splitting.rb +0 -0
  560. data/spec/{servers → support/servers}/modules/audit/rfi.rb +0 -0
  561. data/spec/{servers → support/servers}/modules/audit/session_fixation.rb +0 -0
  562. data/spec/{servers → support/servers}/modules/audit/sqli.rb +1 -1
  563. data/spec/{servers → support/servers}/modules/audit/sqli/coldfusion +0 -0
  564. data/spec/{servers → support/servers}/modules/audit/sqli/db2 +0 -0
  565. data/spec/{servers → support/servers}/modules/audit/sqli/emc +0 -0
  566. data/spec/{servers → support/servers}/modules/audit/sqli/informix +0 -0
  567. data/spec/{servers → support/servers}/modules/audit/sqli/interbase +0 -0
  568. data/spec/{servers → support/servers}/modules/audit/sqli/jdbc +0 -0
  569. data/spec/{servers → support/servers}/modules/audit/sqli/mssql +0 -0
  570. data/spec/{servers → support/servers}/modules/audit/sqli/mysql +0 -0
  571. data/spec/{servers → support/servers}/modules/audit/sqli/oracle +0 -0
  572. data/spec/{servers → support/servers}/modules/audit/sqli/postgresql +0 -0
  573. data/spec/{servers → support/servers}/modules/audit/sqli/sqlite +0 -0
  574. data/spec/{servers → support/servers}/modules/audit/sqli/sybase +0 -0
  575. data/spec/{servers → support/servers}/modules/audit/sqli_blind_rdiff.rb +1 -1
  576. data/spec/{servers → support/servers}/modules/audit/sqli_blind_timing.rb +0 -0
  577. data/spec/{servers → support/servers}/modules/audit/trainer_module.rb +0 -0
  578. data/spec/{servers → support/servers}/modules/audit/unvalidated_redirect.rb +0 -0
  579. data/spec/{servers → support/servers}/modules/audit/xpath.rb +0 -0
  580. data/spec/{servers → support/servers}/modules/audit/xpath/dotnet +0 -0
  581. data/spec/{servers → support/servers}/modules/audit/xpath/general +0 -0
  582. data/spec/{servers → support/servers}/modules/audit/xpath/java +0 -0
  583. data/spec/{servers → support/servers}/modules/audit/xpath/libxml2 +0 -0
  584. data/spec/{servers → support/servers}/modules/audit/xpath/php +0 -0
  585. data/spec/{servers → support/servers}/modules/audit/xss.rb +0 -0
  586. data/spec/{servers → support/servers}/modules/audit/xss_event.rb +0 -0
  587. data/spec/{servers → support/servers}/modules/audit/xss_path.rb +0 -0
  588. data/spec/{servers → support/servers}/modules/audit/xss_script_tag.rb +0 -0
  589. data/spec/{servers → support/servers}/modules/audit/xss_tag.rb +0 -0
  590. data/spec/{servers → support/servers}/modules/module_server.rb +1 -1
  591. data/spec/{servers → support/servers}/modules/recon/allowed_methods.rb +0 -0
  592. data/spec/{servers → support/servers}/modules/recon/backdoors.rb +0 -0
  593. data/spec/{servers → support/servers}/modules/recon/backup_files.rb +0 -0
  594. data/spec/{servers → support/servers}/modules/recon/common_directories.rb +0 -0
  595. data/spec/{servers → support/servers}/modules/recon/common_files.rb +0 -0
  596. data/spec/{servers → support/servers}/modules/recon/directory_listing.rb +0 -0
  597. data/spec/{servers → support/servers}/modules/recon/grep/captcha.rb +0 -0
  598. data/spec/{servers → support/servers}/modules/recon/grep/credit_card.rb +0 -0
  599. data/spec/{servers → support/servers}/modules/recon/grep/cvs_svn_users.rb +0 -0
  600. data/spec/{servers → support/servers}/modules/recon/grep/emails.rb +0 -0
  601. data/spec/{servers → support/servers}/modules/recon/grep/html_objects.rb +0 -0
  602. data/spec/{servers → support/servers}/modules/recon/grep/http_only_cookies.rb +0 -0
  603. data/spec/{servers → support/servers}/modules/recon/grep/insecure_cookies.rb +0 -0
  604. data/spec/{servers → support/servers}/modules/recon/grep/mixed_resource.rb +0 -0
  605. data/spec/{servers → support/servers}/modules/recon/grep/password_autocomplete.rb +0 -0
  606. data/spec/{servers → support/servers}/modules/recon/grep/private_ip.rb +0 -0
  607. data/spec/{servers → support/servers}/modules/recon/grep/ssn.rb +0 -0
  608. data/spec/{servers → support/servers}/modules/recon/grep/unencrypted_password_forms.rb +0 -0
  609. data/spec/{servers → support/servers}/modules/recon/htaccess_limit.rb +0 -0
  610. data/spec/{servers → support/servers}/modules/recon/http_put.rb +0 -0
  611. data/spec/{servers → support/servers}/modules/recon/interesting_responses.rb +0 -0
  612. data/spec/{servers → support/servers}/modules/recon/webdav.rb +0 -0
  613. data/spec/{servers → support/servers}/modules/recon/xst.rb +0 -0
  614. data/spec/{servers → support/servers}/plugins/autologin.rb +0 -0
  615. data/spec/{servers → support/servers}/plugins/autothrottle.rb +0 -0
  616. data/spec/{servers → support/servers}/plugins/content_types.rb +0 -0
  617. data/spec/{servers → support/servers}/plugins/cookie_collector.rb +0 -0
  618. data/spec/{servers → support/servers}/plugins/form_dicattack.rb +0 -0
  619. data/spec/{servers → support/servers}/plugins/healthmap.rb +0 -0
  620. data/spec/{servers → support/servers}/plugins/http_dicattack.rb +0 -0
  621. data/spec/{servers → support/servers}/plugins/http_dicattack_secure.rb +0 -0
  622. data/spec/{servers → support/servers}/plugins/http_dicattack_unprotected.rb +0 -0
  623. data/spec/{servers → support/servers}/plugins/meta/remedies/discovery.rb +1 -1
  624. data/spec/{servers → support/servers}/plugins/meta/remedies/timing_attacks.rb +0 -0
  625. data/spec/{servers → support/servers}/plugins/profiler.rb +0 -0
  626. data/spec/{servers → support/servers}/plugins/rescan.rb +0 -0
  627. data/spec/{servers → support/servers}/plugins/waf_detector.rb +0 -0
  628. data/spec/{shared → support/shared}/component.rb +1 -1
  629. data/spec/{shared → support/shared}/element/capabilities/auditable.rb +363 -194
  630. data/spec/{shared → support/shared}/element/capabilities/refreshable.rb +0 -0
  631. data/spec/support/shared/fingerprinter.rb +14 -0
  632. data/spec/{shared → support/shared}/module.rb +1 -1
  633. data/spec/{shared → support/shared}/path_extractor.rb +0 -0
  634. data/spec/{shared → support/shared}/plugin.rb +0 -0
  635. data/spec/{shared → support/shared}/reports.rb +1 -1
  636. data/spec/{arachni/bloom_filter_spec.rb → support/shared/support/lookup.rb} +11 -11
  637. metadata +936 -199
  638. data/lib/arachni/bloom_filter.rb +0 -74
  639. data/lib/arachni/buffer.rb +0 -3
  640. data/lib/arachni/buffer/autoflush.rb +0 -77
  641. data/lib/arachni/database.rb +0 -4
  642. data/lib/arachni/database/base.rb +0 -131
  643. data/modules/audit/code_injection_timing/payloads.txt +0 -4
  644. data/modules/audit/os_cmd_injection/payloads.txt +0 -3
  645. data/modules/audit/os_cmd_injection_timing/payloads.txt +0 -2
  646. data/modules/audit/sqli_blind_timing/payloads.txt +0 -69
  647. data/spec/helpers/misc.rb +0 -41
  648. data/spec/helpers/processes.rb +0 -112
  649. data/spec/helpers/requires.rb +0 -8
  650. data/spec/helpers/server.rb +0 -54
@@ -1,4 +1,20 @@
1
+ =begin
2
+ Copyright 2010-2013 Tasos Laskos <tasos.laskos@gmail.com>
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ =end
16
+
1
17
  lib = Arachni::Options.dir['lib']
2
- require lib. + 'component/manager'
18
+ require lib + 'component/manager'
3
19
  require lib + 'plugin/base'
4
20
  require lib + 'plugin/manager'
@@ -38,12 +38,13 @@ class Manager < Arachni::Component::Manager
38
38
  include Utilities
39
39
  extend Utilities
40
40
 
41
+ # Namespace under which all plugins reside.
41
42
  NAMESPACE = Arachni::Plugins
43
+
44
+ # Expressions matching default plugins.
42
45
  DEFAULT = %w(defaults/*)
43
46
 
44
- #
45
- # @param [Arachni::Framework] framework framework instance
46
- #
47
+ # @param [Arachni::Framework] framework Framework instance.
47
48
  def initialize( framework )
48
49
  super( framework.opts.dir['plugins'], NAMESPACE )
49
50
  @framework = framework
@@ -51,19 +52,24 @@ class Manager < Arachni::Component::Manager
51
52
  @jobs = []
52
53
  end
53
54
 
55
+ # Loads the default plugins.
56
+ #
57
+ # @see DEFAULT
54
58
  def load_default
55
59
  load DEFAULT
56
60
  end
57
61
  alias :load_defaults :load_default
58
62
 
63
+ # @return [Array<String>] Components to load, by name.
59
64
  def default
60
65
  parse DEFAULT
61
66
  end
62
67
  alias :defaults :default
63
68
 
64
- #
65
69
  # Runs each plug-in in its own thread.
66
70
  #
71
+ # @raise [Error::UnsatisfiedDependency]
72
+ # If the environment is {#sane_env? not sane}.
67
73
  def run
68
74
  ordered = []
69
75
  unordered = []
@@ -87,12 +93,12 @@ class Manager < Arachni::Component::Manager
87
93
  if( ret = sane_env?( plugin ) ) != true
88
94
  deps = ''
89
95
  if !ret[:gem_errors].empty?
90
- print_bad( "[#{name}] The following plug-in dependencies aren't satisfied:" )
91
- ret[:gem_errors].each { |gem| print_bad( "\t* #{gem}" ) }
96
+ print_bad "[#{name}] The following plug-in dependencies aren't satisfied:"
97
+ ret[:gem_errors].each { |gem| print_bad "\t* #{gem}" }
92
98
 
93
99
  deps = ret[:gem_errors].join( ' ' )
94
- print_bad( "Try installing them by running:" )
95
- print_bad( "\tgem install #{deps}" )
100
+ print_bad 'Try installing them by running:'
101
+ print_bad "\tgem install #{deps}"
96
102
  end
97
103
 
98
104
  fail Error::UnsatisfiedDependency,
@@ -116,12 +122,16 @@ class Manager < Arachni::Component::Manager
116
122
  }
117
123
  end
118
124
 
119
- if @jobs.size > 0
120
- print_status( 'Waiting for plugins to settle...' )
121
- ::IO::select( nil, nil, nil, 1 )
122
- end
125
+ return if @jobs.empty?
126
+
127
+ print_status 'Waiting for plugins to settle...'
128
+ ::IO::select( nil, nil, nil, 1 )
123
129
  end
124
130
 
131
+ # Checks whether or not the environment satisfies all plugin dependencies.
132
+ #
133
+ # @return [TrueClass, Hash]
134
+ # `true` if the environment is sane, a hash with errors otherwise.
125
135
  def sane_env?( plugin )
126
136
  gem_errors = []
127
137
 
@@ -141,50 +151,38 @@ class Manager < Arachni::Component::Manager
141
151
  self[name].new( @framework, opts )
142
152
  end
143
153
 
144
- #
145
154
  # Blocks until all plug-ins have finished executing.
146
- #
147
155
  def block
148
156
  while !@jobs.empty?
149
157
  print_debug
150
- print_debug( "Waiting on the following (#{@jobs.size}) plugins to finish:" )
151
- print_debug( job_names.join( ', ' ) )
158
+ print_debug "Waiting on the following (#{@jobs.size}) plugins to finish:"
159
+ print_debug job_names.join( ', ' )
152
160
  print_debug
153
161
 
154
162
  @jobs.delete_if { |j| !j.alive? }
155
163
  ::IO::select( nil, nil, nil, 1 )
156
164
  end
165
+ nil
157
166
  end
158
167
 
159
- #
160
- # Will return false if all plug-ins have finished executing.
161
- #
162
168
  # @return [Bool]
163
- #
169
+ # `false` if all plug-ins have finished executing, `true` otherwise.
164
170
  def busy?
165
171
  !@jobs.reject{ |j| j.alive? }.empty?
166
172
  end
167
173
 
168
- #
169
- # Returns the names of the running plug-ins.
170
- #
171
- # @return [Array]
172
- #
174
+ # @return [Array] Names of all running plug-ins.
173
175
  def job_names
174
176
  @jobs.map{ |j| j[:name] }
175
177
  end
176
178
 
177
- #
178
- # Returns all the running threads.
179
- #
180
- # @return [Array<Thread>]
181
- #
179
+ # @return [Array<Thread>] All the running threads.
182
180
  def jobs
183
181
  @jobs
184
182
  end
185
183
 
186
184
  #
187
- # Kills a plug-in by name.
185
+ # Kills a plug-in by `name`.
188
186
  #
189
187
  # @param [String] name
190
188
  #
@@ -207,9 +205,9 @@ class Manager < Arachni::Component::Manager
207
205
  end
208
206
 
209
207
  #
210
- # Registers plugin results
208
+ # Registers plugin results.
211
209
  #
212
- # @param [Arachni::Plugin::Base] plugin instance of a plugin
210
+ # @param [Arachni::Plugin::Base] plugin Instance of a plugin.
213
211
  # @param [Object] results
214
212
  #
215
213
  def register_results( plugin, results )
@@ -223,7 +221,8 @@ class Manager < Arachni::Component::Manager
223
221
  end
224
222
 
225
223
  return if !name
226
- self.class.results[name] = { results: results }.merge( plugin.class.info )
224
+ self.class.results[name] =
225
+ { results: results }.merge( plugin.class.info )
227
226
  }
228
227
  end
229
228
 
@@ -235,14 +234,14 @@ class Manager < Arachni::Component::Manager
235
234
  end
236
235
 
237
236
  def self.results
238
- @@results ||= {}
237
+ @results ||= {}
239
238
  end
240
239
  def results
241
240
  self.class.results
242
241
  end
243
242
 
244
243
  def self.results=( v )
245
- @@results = v
244
+ @results = v
246
245
  end
247
246
  def results=( v )
248
247
  self.class.results = v
@@ -0,0 +1,27 @@
1
+ =begin
2
+ Copyright 2010-2013 Tasos Laskos <tasos.laskos@gmail.com>
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ =end
16
+
17
+ require 'singleton'
18
+ require 'ostruct'
19
+
20
+ lib = Arachni::Options.dir['lib']
21
+ require lib + 'rpc/client/instance'
22
+ require lib + 'rpc/client/dispatcher'
23
+
24
+ lib = Arachni::Options.dir['lib'] + 'processes/'
25
+ require lib + 'manager'
26
+ require lib + 'dispatchers'
27
+ require lib + 'instances'
@@ -0,0 +1,149 @@
1
+ =begin
2
+ Copyright 2010-2013 Tasos Laskos <tasos.laskos@gmail.com>
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ =end
16
+
17
+ module Arachni
18
+ module Processes
19
+
20
+ #
21
+ # Helper for managing {RPC::Server::Dispatcher} processes.
22
+ #
23
+ # @author Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>
24
+ #
25
+ class Dispatchers
26
+ include Singleton
27
+ include Utilities
28
+
29
+ # @return [Array<String>] URLs of all running Dispatchers.
30
+ attr_reader :list
31
+
32
+ def initialize
33
+ @list = []
34
+ @dispatcher_connections = {}
35
+ end
36
+
37
+ #
38
+ # Connects to a Dispatcher by URL.
39
+ #
40
+ # @param [String] url URL of the Dispatcher.
41
+ # @param [Hash] options Options for the RPC client.
42
+ #
43
+ # @return [RPC::Client::Dispatcher]
44
+ #
45
+ def connect( url, options = { } )
46
+ opts = OpenStruct.new( options )
47
+ @dispatcher_connections[url] ||= RPC::Client::Dispatcher.new( opts, url )
48
+ end
49
+
50
+ # @param [Block] block Block to pass an RPC client for each Dispatcher.
51
+ def each( &block )
52
+ @list.each do |url|
53
+ block.call connect( url )
54
+ end
55
+ end
56
+
57
+ #
58
+ # Spawns a {RPC::Server::Dispatcher} process.
59
+ #
60
+ # @param [Hash] options
61
+ # To be passed to {Arachni::Options#set}. Allows `address` instead of
62
+ # `rpc_address` and `port` instead of `rpc_port`.
63
+ #
64
+ # @param [Block] block
65
+ # Passed {Arachni::Options} to configure the Dispatcher options.
66
+ #
67
+ # @return [RPC::Client::Dispatcher]
68
+ #
69
+ def spawn( options = {}, &block )
70
+ options = Options.to_hash.symbolize_keys( false ).merge( options )
71
+
72
+ options[:rpc_port] = options.delete( :port ) if options.include?( :port )
73
+ options[:rpc_address] = options.delete( :address ) if options.include?( :address )
74
+
75
+ options[:rpc_port] ||= available_port
76
+
77
+ url = "#{options[:rpc_address]}:#{options[:rpc_port]}"
78
+
79
+ Manager.fork_em do
80
+ Options.set( options )
81
+ block.call( Options.instance ) if block_given?
82
+
83
+ require "#{Arachni::Options.dir['lib']}/rpc/server/dispatcher"
84
+
85
+ RPC::Server::Dispatcher.new
86
+ end
87
+
88
+ begin
89
+ Timeout.timeout( 10 ) do
90
+ while sleep( 0.1 )
91
+ begin
92
+ connect( url, max_retries: 1 ).alive?
93
+ break
94
+ rescue Exception
95
+ end
96
+ end
97
+ end
98
+ rescue Timeout::Error
99
+ abort "Dispatcher '#{url}' never started!"
100
+ end
101
+
102
+ @list << url
103
+ connect( url )
104
+ end
105
+
106
+ # Same as {#spawn} but sets the pool size to `1`.
107
+ def light_spawn( options = {}, &block )
108
+ spawn( options.merge( pool_size: 1 ), &block )
109
+ end
110
+
111
+ # @note Will also kill all Instances started by the Dispatcher.
112
+ #
113
+ # @param [String] url URL of the Dispatcher to kill.
114
+ def kill( url )
115
+ dispatcher = connect( url )
116
+ Manager.kill_many dispatcher.stats['consumed_pids']
117
+ Manager.kill dispatcher.proc_info['pid'].to_i
118
+ rescue => e
119
+ #ap e
120
+ #ap e.backtrace
121
+ nil
122
+ ensure
123
+ @list.delete( url )
124
+ @dispatcher_connections.delete( url )
125
+ end
126
+
127
+ # Kills all {Dispatchers #list}.
128
+ def killall
129
+ @list.dup.each do |url|
130
+ kill url
131
+ end
132
+ end
133
+
134
+ def self.method_missing( sym, *args, &block )
135
+ if instance.respond_to?( sym )
136
+ instance.send( sym, *args, &block )
137
+ elsif
138
+ super( sym, *args, &block )
139
+ end
140
+ end
141
+
142
+ def self.respond_to?( m )
143
+ super( m ) || instance.respond_to?( m )
144
+ end
145
+
146
+ end
147
+
148
+ end
149
+ end
@@ -0,0 +1,19 @@
1
+ =begin
2
+ Copyright 2010-2013 Tasos Laskos <tasos.laskos@gmail.com>
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ =end
16
+
17
+ require_relative 'helpers/processes'
18
+ require_relative 'helpers/dispatchers'
19
+ require_relative 'helpers/instances'
@@ -0,0 +1,45 @@
1
+ =begin
2
+ Copyright 2010-2013 Tasos Laskos <tasos.laskos@gmail.com>
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ =end
16
+
17
+ # @param (see Arachni::Processes::Dispatchers#spawn)
18
+ # @return (see Arachni::Processes::Dispatchers#spawn)
19
+ def dispatcher_spawn( *args )
20
+ Arachni::Processes::Dispatchers.spawn( *args )
21
+ end
22
+
23
+ # @param (see Arachni::Processes::Dispatchers#light_spawn)
24
+ # @return (see Arachni::Processes::Dispatchers#light_spawn)
25
+ def dispatcher_light_spawn( *args )
26
+ Arachni::Processes::Dispatchers.light_spawn( *args )
27
+ end
28
+
29
+ # @param (see Arachni::Processes::Dispatchers#kill)
30
+ # @return (see Arachni::Processes::Dispatchers#kill)
31
+ def dispatcher_kill( *args )
32
+ Arachni::Processes::Dispatchers.kill( *args )
33
+ end
34
+
35
+ # @param (see Arachni::Processes::Dispatchers#killall)
36
+ # @return (see Arachni::Processes::Dispatchers#killall)
37
+ def dispatcher_killall
38
+ Arachni::Processes::Dispatchers.killall
39
+ end
40
+
41
+ # @param (see Arachni::Processes::Dispatchers#connect)
42
+ # @return (see Arachni::Processes::Dispatchers#connect)
43
+ def dispatcher_connect( *args )
44
+ Arachni::Processes::Dispatchers.connect( *args )
45
+ end
@@ -0,0 +1,51 @@
1
+ =begin
2
+ Copyright 2010-2013 Tasos Laskos <tasos.laskos@gmail.com>
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ =end
16
+
17
+ # @param (see Arachni::Processes::Instances#spawn)
18
+ # @return (see Arachni::Processes::Instances#spawn)
19
+ def instance_spawn( *args )
20
+ Arachni::Processes::Instances.spawn( *args )
21
+ end
22
+
23
+ # @param (see Arachni::Processes::Instances#grid_spawn)
24
+ # @return (see Arachni::Processes::Instances#grid_spawn)
25
+ def instance_grid_spawn( *args )
26
+ Arachni::Processes::Instances.grid_spawn( *args )
27
+ end
28
+
29
+ # @param (see Arachni::Processes::Instances#dispatcher_spawn)
30
+ # @return (see Arachni::Processes::Instances#dispatcher_spawn)
31
+ def instance_dispatcher_spawn( *args )
32
+ Arachni::Processes::Instances.dispatcher_spawn( *args )
33
+ end
34
+
35
+ # @param (see Arachni::Processes::Instances#killall)
36
+ # @return (see Arachni::Processes::Instances#killall)
37
+ def instance_killall
38
+ Arachni::Processes::Instances.killall
39
+ end
40
+
41
+ # @param (see Arachni::Processes::Instances#connect)
42
+ # @return (see Arachni::Processes::Instances#connect)
43
+ def instance_connect( *args )
44
+ Arachni::Processes::Instances.connect( *args )
45
+ end
46
+
47
+ # @param (see Arachni::Processes::Instances#token_for)
48
+ # @return (see Arachni::Processes::Instances#token_for)
49
+ def instance_token_for( *args )
50
+ Arachni::Processes::Instances.token_for( *args )
51
+ end