wg-metasploit_data_models 4.1.4.01 → 4.1.4.02

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (440) hide show
  1. checksums.yaml +4 -4
  2. data/.coveralls.yml +1 -0
  3. data/.github/workflows/verify.yml +68 -0
  4. data/.gitignore +29 -0
  5. data/.rspec +3 -0
  6. data/.simplecov +38 -0
  7. data/.yardopts +4 -0
  8. data/CHANGELOG.md +6 -0
  9. data/CONTRIBUTING.md +133 -0
  10. data/Gemfile +46 -0
  11. data/LICENSE +27 -0
  12. data/README.md +65 -0
  13. data/RELEASING.md +82 -0
  14. data/Rakefile +72 -0
  15. data/UPGRADING.md +1 -0
  16. data/app/models/mdm/api_key.rb +61 -0
  17. data/app/models/mdm/async_callback.rb +64 -0
  18. data/app/models/mdm/client.rb +50 -0
  19. data/app/models/mdm/cred.rb +205 -0
  20. data/app/models/mdm/event.rb +83 -0
  21. data/app/models/mdm/exploit_attempt.rb +105 -0
  22. data/app/models/mdm/exploited_host.rb +42 -0
  23. data/app/models/mdm/host.rb +619 -0
  24. data/app/models/mdm/host_detail.rb +62 -0
  25. data/app/models/mdm/host_tag.rb +49 -0
  26. data/app/models/mdm/listener.rb +82 -0
  27. data/app/models/mdm/loot.rb +161 -0
  28. data/app/models/mdm/macro.rb +62 -0
  29. data/app/models/mdm/mod_ref.rb +24 -0
  30. data/app/models/mdm/module/action.rb +33 -0
  31. data/app/models/mdm/module/arch.rb +28 -0
  32. data/app/models/mdm/module/author.rb +34 -0
  33. data/app/models/mdm/module/detail.rb +388 -0
  34. data/app/models/mdm/module/mixin.rb +31 -0
  35. data/app/models/mdm/module/platform.rb +29 -0
  36. data/app/models/mdm/module/ref.rb +42 -0
  37. data/app/models/mdm/module/target.rb +37 -0
  38. data/app/models/mdm/nexpose_console.rb +121 -0
  39. data/app/models/mdm/note.rb +125 -0
  40. data/app/models/mdm/payload.rb +103 -0
  41. data/app/models/mdm/profile.rb +45 -0
  42. data/app/models/mdm/ref.rb +48 -0
  43. data/app/models/mdm/route.rb +28 -0
  44. data/app/models/mdm/service.rb +267 -0
  45. data/app/models/mdm/session.rb +203 -0
  46. data/app/models/mdm/session_event.rb +44 -0
  47. data/app/models/mdm/tag.rb +114 -0
  48. data/app/models/mdm/task.rb +168 -0
  49. data/app/models/mdm/task_cred.rb +45 -0
  50. data/app/models/mdm/task_host.rb +41 -0
  51. data/app/models/mdm/task_service.rb +41 -0
  52. data/app/models/mdm/task_session.rb +41 -0
  53. data/app/models/mdm/user.rb +230 -0
  54. data/app/models/mdm/vuln.rb +204 -0
  55. data/app/models/mdm/vuln_attempt.rb +76 -0
  56. data/app/models/mdm/vuln_detail.rb +156 -0
  57. data/app/models/mdm/vuln_ref.rb +21 -0
  58. data/app/models/mdm/web_form.rb +53 -0
  59. data/app/models/mdm/web_page.rb +92 -0
  60. data/app/models/mdm/web_site.rb +113 -0
  61. data/app/models/mdm/web_vuln.rb +193 -0
  62. data/app/models/mdm/wmap_request.rb +101 -0
  63. data/app/models/mdm/wmap_target.rb +56 -0
  64. data/app/models/mdm/workspace.rb +286 -0
  65. data/app/models/metasploit_data_models/automatic_exploitation/match.rb +43 -0
  66. data/app/models/metasploit_data_models/automatic_exploitation/match_result.rb +71 -0
  67. data/app/models/metasploit_data_models/automatic_exploitation/match_set.rb +40 -0
  68. data/app/models/metasploit_data_models/automatic_exploitation/run.rb +29 -0
  69. data/app/models/metasploit_data_models/ip_address/v4/cidr.rb +14 -0
  70. data/app/models/metasploit_data_models/ip_address/v4/nmap.rb +14 -0
  71. data/app/models/metasploit_data_models/ip_address/v4/range.rb +12 -0
  72. data/app/models/metasploit_data_models/ip_address/v4/segment/nmap/list.rb +125 -0
  73. data/app/models/metasploit_data_models/ip_address/v4/segment/nmap/range.rb +12 -0
  74. data/app/models/metasploit_data_models/ip_address/v4/segment/single.rb +123 -0
  75. data/app/models/metasploit_data_models/ip_address/v4/segmented.rb +200 -0
  76. data/app/models/metasploit_data_models/ip_address/v4/single.rb +53 -0
  77. data/app/models/metasploit_data_models/module_run.rb +213 -0
  78. data/app/models/metasploit_data_models/search/operation/ip_address.rb +60 -0
  79. data/app/models/metasploit_data_models/search/operation/port/number.rb +25 -0
  80. data/app/models/metasploit_data_models/search/operation/port/range.rb +79 -0
  81. data/app/models/metasploit_data_models/search/operation/range.rb +56 -0
  82. data/app/models/metasploit_data_models/search/operator/ip_address.rb +33 -0
  83. data/app/models/metasploit_data_models/search/operator/multitext.rb +73 -0
  84. data/app/models/metasploit_data_models/search/operator/port/list.rb +67 -0
  85. data/app/models/metasploit_data_models/search/visitor/attribute.rb +17 -0
  86. data/app/models/metasploit_data_models/search/visitor/includes.rb +47 -0
  87. data/app/models/metasploit_data_models/search/visitor/joins.rb +67 -0
  88. data/app/models/metasploit_data_models/search/visitor/method.rb +16 -0
  89. data/app/models/metasploit_data_models/search/visitor/relation.rb +91 -0
  90. data/app/models/metasploit_data_models/search/visitor/where.rb +128 -0
  91. data/config/initializers/arel_helper.rb +5 -0
  92. data/config/initializers/ipaddr.rb +29 -0
  93. data/config/locales/en.yml +94 -0
  94. data/console_db.yml +9 -0
  95. data/db/migrate/000_create_tables.rb +79 -0
  96. data/db/migrate/001_add_wmap_tables.rb +35 -0
  97. data/db/migrate/002_add_workspaces.rb +36 -0
  98. data/db/migrate/003_move_notes.rb +20 -0
  99. data/db/migrate/004_add_events_table.rb +16 -0
  100. data/db/migrate/005_expand_info.rb +58 -0
  101. data/db/migrate/006_add_timestamps.rb +26 -0
  102. data/db/migrate/007_add_loots.rb +20 -0
  103. data/db/migrate/008_create_users.rb +16 -0
  104. data/db/migrate/009_add_loots_ctype.rb +10 -0
  105. data/db/migrate/010_add_alert_fields.rb +16 -0
  106. data/db/migrate/011_add_reports.rb +19 -0
  107. data/db/migrate/012_add_tasks.rb +24 -0
  108. data/db/migrate/013_add_tasks_result.rb +10 -0
  109. data/db/migrate/014_add_loots_fields.rb +12 -0
  110. data/db/migrate/015_rename_user.rb +16 -0
  111. data/db/migrate/016_add_host_purpose.rb +10 -0
  112. data/db/migrate/017_expand_info2.rb +58 -0
  113. data/db/migrate/018_add_workspace_user_info.rb +29 -0
  114. data/db/migrate/019_add_workspace_desc.rb +23 -0
  115. data/db/migrate/020_add_user_preferences.rb +11 -0
  116. data/db/migrate/021_standardize_info_and_data.rb +18 -0
  117. data/db/migrate/022_enlarge_event_info.rb +10 -0
  118. data/db/migrate/023_add_report_downloaded_at.rb +10 -0
  119. data/db/migrate/024_convert_service_info_to_text.rb +12 -0
  120. data/db/migrate/025_add_user_admin.rb +19 -0
  121. data/db/migrate/026_add_creds_table.rb +19 -0
  122. data/db/migrate/20100819123300_migrate_cred_data.rb +154 -0
  123. data/db/migrate/20100824151500_add_exploited_table.rb +16 -0
  124. data/db/migrate/20100908001428_add_owner_to_workspaces.rb +9 -0
  125. data/db/migrate/20100911122000_add_report_templates.rb +18 -0
  126. data/db/migrate/20100916151530_require_admin_flag.rb +15 -0
  127. data/db/migrate/20100916175000_add_campaigns_and_templates.rb +61 -0
  128. data/db/migrate/20100920012100_add_generate_exe_column.rb +8 -0
  129. data/db/migrate/20100926214000_add_template_prefs.rb +11 -0
  130. data/db/migrate/20101001000000_add_web_tables.rb +57 -0
  131. data/db/migrate/20101002000000_add_query.rb +10 -0
  132. data/db/migrate/20101007000000_add_vuln_info.rb +15 -0
  133. data/db/migrate/20101008111800_add_clients_to_campaigns.rb +10 -0
  134. data/db/migrate/20101009023300_add_campaign_attachments.rb +15 -0
  135. data/db/migrate/20101104135100_add_imported_creds.rb +17 -0
  136. data/db/migrate/20101203000000_fix_web_tables.rb +34 -0
  137. data/db/migrate/20101203000001_expand_host_comment.rb +12 -0
  138. data/db/migrate/20101206212033_add_limit_to_network_to_workspaces.rb +9 -0
  139. data/db/migrate/20110112154300_add_module_uuid_to_tasks.rb +9 -0
  140. data/db/migrate/20110204112800_add_host_tags.rb +28 -0
  141. data/db/migrate/20110317144932_add_session_table.rb +110 -0
  142. data/db/migrate/20110414180600_add_local_id_to_session_table.rb +11 -0
  143. data/db/migrate/20110415175705_add_routes_table.rb +18 -0
  144. data/db/migrate/20110422000000_convert_binary.rb +73 -0
  145. data/db/migrate/20110425095900_add_last_seen_to_sessions.rb +8 -0
  146. data/db/migrate/20110513143900_track_successful_exploits.rb +31 -0
  147. data/db/migrate/20110517160800_rename_and_prune_nessus_vulns.rb +26 -0
  148. data/db/migrate/20110527000000_add_task_id_to_reports_table.rb +11 -0
  149. data/db/migrate/20110527000001_add_api_keys_table.rb +12 -0
  150. data/db/migrate/20110606000001_add_macros_table.rb +16 -0
  151. data/db/migrate/20110622000000_add_settings_to_tasks_table.rb +12 -0
  152. data/db/migrate/20110624000001_add_listeners_table.rb +19 -0
  153. data/db/migrate/20110625000001_add_macro_to_listeners_table.rb +12 -0
  154. data/db/migrate/20110630000001_add_nexpose_consoles_table.rb +21 -0
  155. data/db/migrate/20110630000002_add_name_to_nexpose_consoles_table.rb +12 -0
  156. data/db/migrate/20110717000001_add_profiles_table.rb +15 -0
  157. data/db/migrate/20110727163801_expand_cred_ptype_column.rb +9 -0
  158. data/db/migrate/20110730000001_add_initial_indexes.rb +85 -0
  159. data/db/migrate/20110812000001_prune_indexes.rb +23 -0
  160. data/db/migrate/20110922000000_expand_notes.rb +9 -0
  161. data/db/migrate/20110928101300_add_mod_ref_table.rb +17 -0
  162. data/db/migrate/20111011110000_add_display_name_to_reports_table.rb +24 -0
  163. data/db/migrate/20111203000000_inet_columns.rb +13 -0
  164. data/db/migrate/20111204000000_more_inet_columns.rb +17 -0
  165. data/db/migrate/20111210000000_add_scope_to_hosts.rb +9 -0
  166. data/db/migrate/20120126110000_add_virtual_host_to_hosts.rb +9 -0
  167. data/db/migrate/20120411173220_rename_workspace_members.rb +9 -0
  168. data/db/migrate/20120601152442_add_counter_caches_to_hosts.rb +21 -0
  169. data/db/migrate/20120625000000_add_vuln_details.rb +34 -0
  170. data/db/migrate/20120625000001_add_host_details.rb +16 -0
  171. data/db/migrate/20120625000002_expand_details.rb +16 -0
  172. data/db/migrate/20120625000003_expand_details2.rb +24 -0
  173. data/db/migrate/20120625000004_add_vuln_attempts.rb +19 -0
  174. data/db/migrate/20120625000005_add_vuln_and_host_counter_caches.rb +14 -0
  175. data/db/migrate/20120625000006_add_module_details.rb +118 -0
  176. data/db/migrate/20120625000007_add_exploit_attempts.rb +26 -0
  177. data/db/migrate/20120625000008_add_fail_message.rb +12 -0
  178. data/db/migrate/20120718202805_add_owner_and_payload_to_web_vulns.rb +13 -0
  179. data/db/migrate/20130228214900_change_required_columns_to_null_false_in_web_vulns.rb +19 -0
  180. data/db/migrate/20130412154159_change_foreign_key_in_module_actions.rb +25 -0
  181. data/db/migrate/20130412171844_change_foreign_key_in_module_archs.rb +25 -0
  182. data/db/migrate/20130412173121_change_foreign_key_in_module_authors.rb +25 -0
  183. data/db/migrate/20130412173640_change_foreign_key_in_module_mixins.rb +25 -0
  184. data/db/migrate/20130412174254_change_foreign_key_in_module_platforms.rb +25 -0
  185. data/db/migrate/20130412174719_change_foreign_key_in_module_refs.rb +25 -0
  186. data/db/migrate/20130412175040_change_foreign_key_in_module_targets.rb +25 -0
  187. data/db/migrate/20130423211152_add_creds_counter_cache.rb +24 -0
  188. data/db/migrate/20130430151353_change_required_columns_to_null_false_in_hosts.rb +11 -0
  189. data/db/migrate/20130430162145_enforce_address_uniqueness_in_workspace_in_hosts.rb +101 -0
  190. data/db/migrate/20130510021637_remove_campaigns.rb +11 -0
  191. data/db/migrate/20130515164311_change_web_vulns_confidence_to_integer.rb +48 -0
  192. data/db/migrate/20130515172727_valid_mdm_web_vuln_params.rb +30 -0
  193. data/db/migrate/20130516204810_making_vulns_refs_a_real_ar_model.rb +5 -0
  194. data/db/migrate/20130522001343_create_task_creds.rb +9 -0
  195. data/db/migrate/20130522032517_create_task_hosts.rb +9 -0
  196. data/db/migrate/20130522041110_create_task_services.rb +9 -0
  197. data/db/migrate/20130525015035_remove_campaign_id_from_clients.rb +9 -0
  198. data/db/migrate/20130525212420_drop_table_imported_creds.rb +14 -0
  199. data/db/migrate/20130531144949_making_host_tags_a_real_ar_model.rb +6 -0
  200. data/db/migrate/20130604145732_create_task_sessions.rb +9 -0
  201. data/db/migrate/20130717150737_remove_pname_validation.rb +7 -0
  202. data/db/migrate/20131002004641_create_automatic_exploitation_matches.rb +13 -0
  203. data/db/migrate/20131002164449_create_automatic_exploitation_match_sets.rb +12 -0
  204. data/db/migrate/20131008213344_create_automatic_exploitation_runs.rb +11 -0
  205. data/db/migrate/20131011184338_module_detail_on_automatic_exploitation_match.rb +10 -0
  206. data/db/migrate/20131017150735_create_automatic_exploitation_match_results.rb +11 -0
  207. data/db/migrate/20131021185657_make_match_polymorphic.rb +11 -0
  208. data/db/migrate/20140905031549_add_detected_arch_to_host.rb +5 -0
  209. data/db/migrate/20150112203945_remove_duplicate_services.rb +17 -0
  210. data/db/migrate/20150205192745_drop_service_uniqueness_index.rb +5 -0
  211. data/db/migrate/20150209195939_add_vuln_id_to_note.rb +6 -0
  212. data/db/migrate/20150212214222_remove_duplicate_services2.rb +17 -0
  213. data/db/migrate/20150219173821_create_module_runs.rb +23 -0
  214. data/db/migrate/20150219215039_add_module_run_to_session.rb +8 -0
  215. data/db/migrate/20150226151459_add_module_run_fk_to_loot.rb +8 -0
  216. data/db/migrate/20150312155312_add_module_full_name_to_match.rb +6 -0
  217. data/db/migrate/20150317145455_rename_module_indices.rb +29 -0
  218. data/db/migrate/20150326183742_add_missing_ae_indices.rb +13 -0
  219. data/db/migrate/20150421211719_rename_automatic_exploitation_index.rb +16 -0
  220. data/db/migrate/20150514182921_add_origin_to_mdm_vuln.rb +13 -0
  221. data/db/migrate/20160415153312_remove_not_null_from_web_vuln_p_arams.rb +5 -0
  222. data/db/migrate/20161004165612_add_fingerprinted_to_workspace.rb +5 -0
  223. data/db/migrate/20161227212223_add_os_family_to_hosts.rb +5 -0
  224. data/db/migrate/20180904120211_create_payloads.rb +21 -0
  225. data/db/migrate/20190308134512_create_async_callbacks.rb +13 -0
  226. data/db/migrate/20190507120211_remove_payload_workspaces.rb +5 -0
  227. data/lib/mdm/host/operating_system_normalization.rb +942 -0
  228. data/lib/mdm/module.rb +13 -0
  229. data/lib/mdm.rb +57 -0
  230. data/lib/metasploit_data_models/automatic_exploitation.rb +25 -0
  231. data/lib/metasploit_data_models/base64_serializer.rb +99 -0
  232. data/lib/metasploit_data_models/change_required_columns_to_null_false.rb +21 -0
  233. data/lib/metasploit_data_models/engine.rb +32 -0
  234. data/lib/metasploit_data_models/ip_address/cidr.rb +174 -0
  235. data/lib/metasploit_data_models/ip_address/range.rb +181 -0
  236. data/lib/metasploit_data_models/ip_address/v4/segment/nmap.rb +7 -0
  237. data/lib/metasploit_data_models/ip_address/v4/segment.rb +7 -0
  238. data/lib/metasploit_data_models/ip_address/v4.rb +11 -0
  239. data/lib/metasploit_data_models/ip_address.rb +9 -0
  240. data/lib/metasploit_data_models/match/child.rb +48 -0
  241. data/lib/metasploit_data_models/match/parent.rb +103 -0
  242. data/lib/metasploit_data_models/match.rb +8 -0
  243. data/lib/metasploit_data_models/search/operation/port.rb +9 -0
  244. data/lib/metasploit_data_models/search/operation.rb +9 -0
  245. data/lib/metasploit_data_models/search/operator/port.rb +6 -0
  246. data/lib/metasploit_data_models/search/operator.rb +8 -0
  247. data/lib/metasploit_data_models/search/visitor.rb +11 -0
  248. data/lib/metasploit_data_models/search.rb +8 -0
  249. data/lib/metasploit_data_models/serialized_prefs.rb +27 -0
  250. data/lib/metasploit_data_models/version.rb +13 -0
  251. data/lib/metasploit_data_models.rb +56 -0
  252. data/metasploit_data_models.gemspec +65 -0
  253. data/script/rails +8 -0
  254. data/spec/app/models/mdm/api_key_spec.rb +3 -0
  255. data/spec/app/models/mdm/client_spec.rb +43 -0
  256. data/spec/app/models/mdm/cred_spec.rb +346 -0
  257. data/spec/app/models/mdm/event_spec.rb +90 -0
  258. data/spec/app/models/mdm/exploit_attempt_spec.rb +59 -0
  259. data/spec/app/models/mdm/exploited_host_spec.rb +44 -0
  260. data/spec/app/models/mdm/host_detail_spec.rb +48 -0
  261. data/spec/app/models/mdm/host_spec.rb +1139 -0
  262. data/spec/app/models/mdm/host_tag_spec.rb +69 -0
  263. data/spec/app/models/mdm/listener_spec.rb +107 -0
  264. data/spec/app/models/mdm/loot_spec.rb +84 -0
  265. data/spec/app/models/mdm/macro_spec.rb +3 -0
  266. data/spec/app/models/mdm/mod_ref_spec.rb +3 -0
  267. data/spec/app/models/mdm/module/action_spec.rb +34 -0
  268. data/spec/app/models/mdm/module/arch_spec.rb +34 -0
  269. data/spec/app/models/mdm/module/author_spec.rb +52 -0
  270. data/spec/app/models/mdm/module/detail_spec.rb +746 -0
  271. data/spec/app/models/mdm/module/mixin_spec.rb +34 -0
  272. data/spec/app/models/mdm/module/platform_spec.rb +34 -0
  273. data/spec/app/models/mdm/module/ref_spec.rb +58 -0
  274. data/spec/app/models/mdm/module/target_spec.rb +36 -0
  275. data/spec/app/models/mdm/nexpose_console_spec.rb +146 -0
  276. data/spec/app/models/mdm/note_spec.rb +91 -0
  277. data/spec/app/models/mdm/profile_spec.rb +3 -0
  278. data/spec/app/models/mdm/ref_spec.rb +71 -0
  279. data/spec/app/models/mdm/route_spec.rb +35 -0
  280. data/spec/app/models/mdm/service_spec.rb +232 -0
  281. data/spec/app/models/mdm/session_event_spec.rb +42 -0
  282. data/spec/app/models/mdm/session_spec.rb +118 -0
  283. data/spec/app/models/mdm/tag_spec.rb +116 -0
  284. data/spec/app/models/mdm/task_cred_spec.rb +51 -0
  285. data/spec/app/models/mdm/task_host_spec.rb +50 -0
  286. data/spec/app/models/mdm/task_service_spec.rb +50 -0
  287. data/spec/app/models/mdm/task_session_spec.rb +46 -0
  288. data/spec/app/models/mdm/task_spec.rb +71 -0
  289. data/spec/app/models/mdm/user_spec.rb +50 -0
  290. data/spec/app/models/mdm/vuln_attempt_spec.rb +53 -0
  291. data/spec/app/models/mdm/vuln_detail_spec.rb +65 -0
  292. data/spec/app/models/mdm/vuln_ref_spec.rb +46 -0
  293. data/spec/app/models/mdm/vuln_spec.rb +299 -0
  294. data/spec/app/models/mdm/web_form_spec.rb +46 -0
  295. data/spec/app/models/mdm/web_page_spec.rb +101 -0
  296. data/spec/app/models/mdm/web_site_spec.rb +85 -0
  297. data/spec/app/models/mdm/web_vuln_spec.rb +312 -0
  298. data/spec/app/models/mdm/wmap_request_spec.rb +5 -0
  299. data/spec/app/models/mdm/wmap_target_spec.rb +5 -0
  300. data/spec/app/models/mdm/workspace_spec.rb +500 -0
  301. data/spec/app/models/metasploit_data_models/automatic_exploitation/match_result_spec.rb +86 -0
  302. data/spec/app/models/metasploit_data_models/automatic_exploitation/match_set_spec.rb +46 -0
  303. data/spec/app/models/metasploit_data_models/automatic_exploitation/match_spec.rb +37 -0
  304. data/spec/app/models/metasploit_data_models/automatic_exploitation/run_spec.rb +38 -0
  305. data/spec/app/models/metasploit_data_models/ip_address/v4/cidr_spec.rb +119 -0
  306. data/spec/app/models/metasploit_data_models/ip_address/v4/nmap_spec.rb +149 -0
  307. data/spec/app/models/metasploit_data_models/ip_address/v4/range_spec.rb +298 -0
  308. data/spec/app/models/metasploit_data_models/ip_address/v4/segment/nmap/list_spec.rb +276 -0
  309. data/spec/app/models/metasploit_data_models/ip_address/v4/segment/nmap/range_spec.rb +302 -0
  310. data/spec/app/models/metasploit_data_models/ip_address/v4/segment/segmented_spec.rb +27 -0
  311. data/spec/app/models/metasploit_data_models/ip_address/v4/segment/single_spec.rb +324 -0
  312. data/spec/app/models/metasploit_data_models/ip_address/v4/single_spec.rb +181 -0
  313. data/spec/app/models/metasploit_data_models/module_run_spec.rb +134 -0
  314. data/spec/app/models/metasploit_data_models/search/operation/ip_address_spec.rb +180 -0
  315. data/spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb +39 -0
  316. data/spec/app/models/metasploit_data_models/search/operation/port/range_spec.rb +138 -0
  317. data/spec/app/models/metasploit_data_models/search/operation/range_spec.rb +233 -0
  318. data/spec/app/models/metasploit_data_models/search/operator/ip_address_spec.rb +17 -0
  319. data/spec/app/models/metasploit_data_models/search/operator/multitext_spec.rb +160 -0
  320. data/spec/app/models/metasploit_data_models/search/operator/port/list_spec.rb +162 -0
  321. data/spec/app/models/metasploit_data_models/search/visitor/attribute_spec.rb +96 -0
  322. data/spec/app/models/metasploit_data_models/search/visitor/includes_spec.rb +175 -0
  323. data/spec/app/models/metasploit_data_models/search/visitor/joins_spec.rb +396 -0
  324. data/spec/app/models/metasploit_data_models/search/visitor/method_spec.rb +49 -0
  325. data/spec/app/models/metasploit_data_models/search/visitor/relation_spec.rb +925 -0
  326. data/spec/app/models/metasploit_data_models/search/visitor/where_spec.rb +187 -0
  327. data/spec/dummy/Rakefile +7 -0
  328. data/spec/dummy/app/assets/config/manifest.js +1 -0
  329. data/spec/dummy/app/assets/javascripts/application.js +15 -0
  330. data/spec/dummy/app/assets/stylesheets/application.css +13 -0
  331. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  332. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  333. data/spec/dummy/app/mailers/.gitkeep +0 -0
  334. data/spec/dummy/app/models/.gitkeep +0 -0
  335. data/spec/dummy/app/models/application_record.rb +3 -0
  336. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  337. data/spec/dummy/bin/bundle +3 -0
  338. data/spec/dummy/bin/rails +4 -0
  339. data/spec/dummy/bin/rake +4 -0
  340. data/spec/dummy/config/application.rb +61 -0
  341. data/spec/dummy/config/boot.rb +4 -0
  342. data/spec/dummy/config/database.yml.example +22 -0
  343. data/spec/dummy/config/database.yml.github_actions +21 -0
  344. data/spec/dummy/config/environment.rb +5 -0
  345. data/spec/dummy/config/environments/development.rb +37 -0
  346. data/spec/dummy/config/environments/production.rb +78 -0
  347. data/spec/dummy/config/environments/test.rb +39 -0
  348. data/spec/dummy/config/initializers/active_record_migrations.rb +4 -0
  349. data/spec/dummy/config/initializers/assets.rb +8 -0
  350. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  351. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  352. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  353. data/spec/dummy/config/initializers/inflections.rb +16 -0
  354. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  355. data/spec/dummy/config/initializers/session_store.rb +3 -0
  356. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  357. data/spec/dummy/config/locales/en.yml +23 -0
  358. data/spec/dummy/config/routes.rb +2 -0
  359. data/spec/dummy/config.ru +4 -0
  360. data/spec/dummy/db/structure.sql +3430 -0
  361. data/spec/dummy/db/structure.sql.from_rails_3 +3403 -0
  362. data/spec/dummy/lib/assets/.gitkeep +0 -0
  363. data/spec/dummy/log/.gitkeep +0 -0
  364. data/spec/dummy/public/404.html +26 -0
  365. data/spec/dummy/public/422.html +26 -0
  366. data/spec/dummy/public/500.html +25 -0
  367. data/spec/dummy/public/favicon.ico +0 -0
  368. data/spec/dummy/script/rails +6 -0
  369. data/spec/factories/mdm/addresses.rb +12 -0
  370. data/spec/factories/mdm/clients.rb +8 -0
  371. data/spec/factories/mdm/creds.rb +17 -0
  372. data/spec/factories/mdm/events.rb +15 -0
  373. data/spec/factories/mdm/exploit_attempts.rb +8 -0
  374. data/spec/factories/mdm/exploited_hosts.rb +7 -0
  375. data/spec/factories/mdm/fingerprints/nessus_fingerprints.rb +6 -0
  376. data/spec/factories/mdm/fingerprints/nexpose_fingerprints.rb +6 -0
  377. data/spec/factories/mdm/fingerprints/nmap_fingerprints.rb +6 -0
  378. data/spec/factories/mdm/fingerprints/retina_fingerprints.rb +6 -0
  379. data/spec/factories/mdm/fingerprints/session_fingerprints.rb +6 -0
  380. data/spec/factories/mdm/host_details.rb +8 -0
  381. data/spec/factories/mdm/host_tags.rb +9 -0
  382. data/spec/factories/mdm/hosts.rb +85 -0
  383. data/spec/factories/mdm/listeners.rb +12 -0
  384. data/spec/factories/mdm/loots.rb +11 -0
  385. data/spec/factories/mdm/module/actions.rb +14 -0
  386. data/spec/factories/mdm/module/archs.rb +14 -0
  387. data/spec/factories/mdm/module/authors.rb +22 -0
  388. data/spec/factories/mdm/module/details.rb +73 -0
  389. data/spec/factories/mdm/module/mixins.rb +14 -0
  390. data/spec/factories/mdm/module/platforms.rb +14 -0
  391. data/spec/factories/mdm/module/refs.rb +14 -0
  392. data/spec/factories/mdm/module/targets.rb +19 -0
  393. data/spec/factories/mdm/nexpose_consoles.rb +15 -0
  394. data/spec/factories/mdm/notes.rb +12 -0
  395. data/spec/factories/mdm/refs.rb +9 -0
  396. data/spec/factories/mdm/routes.rb +36 -0
  397. data/spec/factories/mdm/services.rb +41 -0
  398. data/spec/factories/mdm/session_events.rb +8 -0
  399. data/spec/factories/mdm/sessions.rb +13 -0
  400. data/spec/factories/mdm/tags.rb +14 -0
  401. data/spec/factories/mdm/task.rb +16 -0
  402. data/spec/factories/mdm/task_creds.rb +9 -0
  403. data/spec/factories/mdm/task_hosts.rb +9 -0
  404. data/spec/factories/mdm/task_services.rb +8 -0
  405. data/spec/factories/mdm/task_sessions.rb +8 -0
  406. data/spec/factories/mdm/users.rb +22 -0
  407. data/spec/factories/mdm/vuln_attempts.rb +8 -0
  408. data/spec/factories/mdm/vuln_details.rb +8 -0
  409. data/spec/factories/mdm/vuln_refs.rb +4 -0
  410. data/spec/factories/mdm/vulns.rb +20 -0
  411. data/spec/factories/mdm/web_forms.rb +33 -0
  412. data/spec/factories/mdm/web_pages.rb +64 -0
  413. data/spec/factories/mdm/web_sites.rb +8 -0
  414. data/spec/factories/mdm/web_vulns.rb +64 -0
  415. data/spec/factories/mdm/workspaces.rb +23 -0
  416. data/spec/factories/metasploit_data_models/automatic_exploitation/match_results.rb +7 -0
  417. data/spec/factories/metasploit_data_models/automatic_exploitation/match_sets.rb +8 -0
  418. data/spec/factories/metasploit_data_models/automatic_exploitation/matches.rb +7 -0
  419. data/spec/factories/metasploit_data_models/automatic_exploitation/runs.rb +6 -0
  420. data/spec/factories/module_runs.rb +40 -0
  421. data/spec/lib/base64_serializer_spec.rb +172 -0
  422. data/spec/lib/ipaddr_spec.rb +29 -0
  423. data/spec/lib/metasploit_data_models/ip_address/cidr_spec.rb +356 -0
  424. data/spec/lib/metasploit_data_models/ip_address/range_spec.rb +75 -0
  425. data/spec/lib/metasploit_data_models/match/child_spec.rb +59 -0
  426. data/spec/lib/metasploit_data_models/match/parent_spec.rb +153 -0
  427. data/spec/lib/metasploit_data_models_spec.rb +13 -0
  428. data/spec/spec_helper.rb +148 -0
  429. data/spec/support/matchers/match_regex_exactly.rb +28 -0
  430. data/spec/support/shared/contexts/rex/text.rb +15 -0
  431. data/spec/support/shared/examples/coerces_inet_column_type_to_string.rb +15 -0
  432. data/spec/support/shared/examples/mdm/module/detail/does_not_support_stance_with_mtype.rb +20 -0
  433. data/spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb +36 -0
  434. data/spec/support/shared/examples/metasploit_data_models/search/operation/ipaddress/match.rb +109 -0
  435. data/spec/support/shared/examples/metasploit_data_models/search/visitor/includes/visit/with_children.rb +38 -0
  436. data/spec/support/shared/examples/metasploit_data_models/search/visitor/includes/visit/with_metasploit_model_search_operation_base.rb +26 -0
  437. data/spec/support/shared/examples/metasploit_data_models/search/visitor/relation/visit/matching_record.rb +50 -0
  438. data/spec/support/shared/examples/metasploit_data_models/search/visitor/where/visit/with_equality.rb +34 -0
  439. data/spec/support/shared/examples/metasploit_data_models/search/visitor/where/visit/with_metasploit_model_search_group_base.rb +51 -0
  440. metadata +444 -6
@@ -0,0 +1,3430 @@
1
+ SET statement_timeout = 0;
2
+ SET lock_timeout = 0;
3
+ SET idle_in_transaction_session_timeout = 0;
4
+ SET client_encoding = 'UTF8';
5
+ SET standard_conforming_strings = on;
6
+ SELECT pg_catalog.set_config('search_path', '', false);
7
+ SET check_function_bodies = false;
8
+ SET client_min_messages = warning;
9
+ SET row_security = off;
10
+
11
+ --
12
+ -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -
13
+ --
14
+
15
+ CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
16
+
17
+
18
+ --
19
+ -- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: -
20
+ --
21
+
22
+ COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
23
+
24
+
25
+ SET default_tablespace = '';
26
+
27
+ SET default_with_oids = false;
28
+
29
+ --
30
+ -- Name: api_keys; Type: TABLE; Schema: public; Owner: -
31
+ --
32
+
33
+ CREATE TABLE public.api_keys (
34
+ id integer NOT NULL,
35
+ token text,
36
+ created_at timestamp without time zone NOT NULL,
37
+ updated_at timestamp without time zone NOT NULL
38
+ );
39
+
40
+
41
+ --
42
+ -- Name: api_keys_id_seq; Type: SEQUENCE; Schema: public; Owner: -
43
+ --
44
+
45
+ CREATE SEQUENCE public.api_keys_id_seq
46
+ START WITH 1
47
+ INCREMENT BY 1
48
+ NO MINVALUE
49
+ NO MAXVALUE
50
+ CACHE 1;
51
+
52
+
53
+ --
54
+ -- Name: api_keys_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
55
+ --
56
+
57
+ ALTER SEQUENCE public.api_keys_id_seq OWNED BY public.api_keys.id;
58
+
59
+
60
+ --
61
+ -- Name: ar_internal_metadata; Type: TABLE; Schema: public; Owner: -
62
+ --
63
+
64
+ CREATE TABLE public.ar_internal_metadata (
65
+ key character varying NOT NULL,
66
+ value character varying,
67
+ created_at timestamp without time zone NOT NULL,
68
+ updated_at timestamp without time zone NOT NULL
69
+ );
70
+
71
+
72
+ --
73
+ -- Name: async_callbacks; Type: TABLE; Schema: public; Owner: -
74
+ --
75
+
76
+ CREATE TABLE public.async_callbacks (
77
+ id integer NOT NULL,
78
+ uuid character varying NOT NULL,
79
+ "timestamp" integer NOT NULL,
80
+ listener_uri character varying,
81
+ target_host character varying,
82
+ target_port character varying,
83
+ created_at timestamp without time zone NOT NULL,
84
+ updated_at timestamp without time zone NOT NULL
85
+ );
86
+
87
+
88
+ --
89
+ -- Name: async_callbacks_id_seq; Type: SEQUENCE; Schema: public; Owner: -
90
+ --
91
+
92
+ CREATE SEQUENCE public.async_callbacks_id_seq
93
+ START WITH 1
94
+ INCREMENT BY 1
95
+ NO MINVALUE
96
+ NO MAXVALUE
97
+ CACHE 1;
98
+
99
+
100
+ --
101
+ -- Name: async_callbacks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
102
+ --
103
+
104
+ ALTER SEQUENCE public.async_callbacks_id_seq OWNED BY public.async_callbacks.id;
105
+
106
+
107
+ --
108
+ -- Name: automatic_exploitation_match_results; Type: TABLE; Schema: public; Owner: -
109
+ --
110
+
111
+ CREATE TABLE public.automatic_exploitation_match_results (
112
+ id integer NOT NULL,
113
+ match_id integer,
114
+ run_id integer,
115
+ state character varying NOT NULL,
116
+ created_at timestamp without time zone NOT NULL,
117
+ updated_at timestamp without time zone NOT NULL
118
+ );
119
+
120
+
121
+ --
122
+ -- Name: automatic_exploitation_match_results_id_seq; Type: SEQUENCE; Schema: public; Owner: -
123
+ --
124
+
125
+ CREATE SEQUENCE public.automatic_exploitation_match_results_id_seq
126
+ START WITH 1
127
+ INCREMENT BY 1
128
+ NO MINVALUE
129
+ NO MAXVALUE
130
+ CACHE 1;
131
+
132
+
133
+ --
134
+ -- Name: automatic_exploitation_match_results_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
135
+ --
136
+
137
+ ALTER SEQUENCE public.automatic_exploitation_match_results_id_seq OWNED BY public.automatic_exploitation_match_results.id;
138
+
139
+
140
+ --
141
+ -- Name: automatic_exploitation_match_sets; Type: TABLE; Schema: public; Owner: -
142
+ --
143
+
144
+ CREATE TABLE public.automatic_exploitation_match_sets (
145
+ id integer NOT NULL,
146
+ workspace_id integer,
147
+ user_id integer,
148
+ created_at timestamp without time zone NOT NULL,
149
+ updated_at timestamp without time zone NOT NULL
150
+ );
151
+
152
+
153
+ --
154
+ -- Name: automatic_exploitation_match_sets_id_seq; Type: SEQUENCE; Schema: public; Owner: -
155
+ --
156
+
157
+ CREATE SEQUENCE public.automatic_exploitation_match_sets_id_seq
158
+ START WITH 1
159
+ INCREMENT BY 1
160
+ NO MINVALUE
161
+ NO MAXVALUE
162
+ CACHE 1;
163
+
164
+
165
+ --
166
+ -- Name: automatic_exploitation_match_sets_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
167
+ --
168
+
169
+ ALTER SEQUENCE public.automatic_exploitation_match_sets_id_seq OWNED BY public.automatic_exploitation_match_sets.id;
170
+
171
+
172
+ --
173
+ -- Name: automatic_exploitation_matches; Type: TABLE; Schema: public; Owner: -
174
+ --
175
+
176
+ CREATE TABLE public.automatic_exploitation_matches (
177
+ id integer NOT NULL,
178
+ module_detail_id integer,
179
+ state character varying,
180
+ nexpose_data_vulnerability_definition_id integer,
181
+ created_at timestamp without time zone NOT NULL,
182
+ updated_at timestamp without time zone NOT NULL,
183
+ match_set_id integer,
184
+ matchable_type character varying,
185
+ matchable_id integer,
186
+ module_fullname text
187
+ );
188
+
189
+
190
+ --
191
+ -- Name: automatic_exploitation_matches_id_seq; Type: SEQUENCE; Schema: public; Owner: -
192
+ --
193
+
194
+ CREATE SEQUENCE public.automatic_exploitation_matches_id_seq
195
+ START WITH 1
196
+ INCREMENT BY 1
197
+ NO MINVALUE
198
+ NO MAXVALUE
199
+ CACHE 1;
200
+
201
+
202
+ --
203
+ -- Name: automatic_exploitation_matches_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
204
+ --
205
+
206
+ ALTER SEQUENCE public.automatic_exploitation_matches_id_seq OWNED BY public.automatic_exploitation_matches.id;
207
+
208
+
209
+ --
210
+ -- Name: automatic_exploitation_runs; Type: TABLE; Schema: public; Owner: -
211
+ --
212
+
213
+ CREATE TABLE public.automatic_exploitation_runs (
214
+ id integer NOT NULL,
215
+ workspace_id integer,
216
+ user_id integer,
217
+ match_set_id integer,
218
+ created_at timestamp without time zone NOT NULL,
219
+ updated_at timestamp without time zone NOT NULL
220
+ );
221
+
222
+
223
+ --
224
+ -- Name: automatic_exploitation_runs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
225
+ --
226
+
227
+ CREATE SEQUENCE public.automatic_exploitation_runs_id_seq
228
+ START WITH 1
229
+ INCREMENT BY 1
230
+ NO MINVALUE
231
+ NO MAXVALUE
232
+ CACHE 1;
233
+
234
+
235
+ --
236
+ -- Name: automatic_exploitation_runs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
237
+ --
238
+
239
+ ALTER SEQUENCE public.automatic_exploitation_runs_id_seq OWNED BY public.automatic_exploitation_runs.id;
240
+
241
+
242
+ --
243
+ -- Name: clients; Type: TABLE; Schema: public; Owner: -
244
+ --
245
+
246
+ CREATE TABLE public.clients (
247
+ id integer NOT NULL,
248
+ host_id integer,
249
+ created_at timestamp without time zone,
250
+ ua_string character varying(1024) NOT NULL,
251
+ ua_name character varying(64),
252
+ ua_ver character varying(32),
253
+ updated_at timestamp without time zone
254
+ );
255
+
256
+
257
+ --
258
+ -- Name: clients_id_seq; Type: SEQUENCE; Schema: public; Owner: -
259
+ --
260
+
261
+ CREATE SEQUENCE public.clients_id_seq
262
+ START WITH 1
263
+ INCREMENT BY 1
264
+ NO MINVALUE
265
+ NO MAXVALUE
266
+ CACHE 1;
267
+
268
+
269
+ --
270
+ -- Name: clients_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
271
+ --
272
+
273
+ ALTER SEQUENCE public.clients_id_seq OWNED BY public.clients.id;
274
+
275
+
276
+ --
277
+ -- Name: creds; Type: TABLE; Schema: public; Owner: -
278
+ --
279
+
280
+ CREATE TABLE public.creds (
281
+ id integer NOT NULL,
282
+ service_id integer NOT NULL,
283
+ created_at timestamp without time zone NOT NULL,
284
+ updated_at timestamp without time zone NOT NULL,
285
+ "user" character varying(2048),
286
+ pass character varying(4096),
287
+ active boolean DEFAULT true,
288
+ proof character varying(4096),
289
+ ptype character varying(256),
290
+ source_id integer,
291
+ source_type character varying
292
+ );
293
+
294
+
295
+ --
296
+ -- Name: creds_id_seq; Type: SEQUENCE; Schema: public; Owner: -
297
+ --
298
+
299
+ CREATE SEQUENCE public.creds_id_seq
300
+ START WITH 1
301
+ INCREMENT BY 1
302
+ NO MINVALUE
303
+ NO MAXVALUE
304
+ CACHE 1;
305
+
306
+
307
+ --
308
+ -- Name: creds_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
309
+ --
310
+
311
+ ALTER SEQUENCE public.creds_id_seq OWNED BY public.creds.id;
312
+
313
+
314
+ --
315
+ -- Name: events; Type: TABLE; Schema: public; Owner: -
316
+ --
317
+
318
+ CREATE TABLE public.events (
319
+ id integer NOT NULL,
320
+ workspace_id integer,
321
+ host_id integer,
322
+ created_at timestamp without time zone,
323
+ name character varying,
324
+ updated_at timestamp without time zone,
325
+ critical boolean,
326
+ seen boolean,
327
+ username character varying,
328
+ info text
329
+ );
330
+
331
+
332
+ --
333
+ -- Name: events_id_seq; Type: SEQUENCE; Schema: public; Owner: -
334
+ --
335
+
336
+ CREATE SEQUENCE public.events_id_seq
337
+ START WITH 1
338
+ INCREMENT BY 1
339
+ NO MINVALUE
340
+ NO MAXVALUE
341
+ CACHE 1;
342
+
343
+
344
+ --
345
+ -- Name: events_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
346
+ --
347
+
348
+ ALTER SEQUENCE public.events_id_seq OWNED BY public.events.id;
349
+
350
+
351
+ --
352
+ -- Name: exploit_attempts; Type: TABLE; Schema: public; Owner: -
353
+ --
354
+
355
+ CREATE TABLE public.exploit_attempts (
356
+ id integer NOT NULL,
357
+ host_id integer,
358
+ service_id integer,
359
+ vuln_id integer,
360
+ attempted_at timestamp without time zone,
361
+ exploited boolean,
362
+ fail_reason character varying,
363
+ username character varying,
364
+ module text,
365
+ session_id integer,
366
+ loot_id integer,
367
+ port integer,
368
+ proto character varying,
369
+ fail_detail text
370
+ );
371
+
372
+
373
+ --
374
+ -- Name: exploit_attempts_id_seq; Type: SEQUENCE; Schema: public; Owner: -
375
+ --
376
+
377
+ CREATE SEQUENCE public.exploit_attempts_id_seq
378
+ START WITH 1
379
+ INCREMENT BY 1
380
+ NO MINVALUE
381
+ NO MAXVALUE
382
+ CACHE 1;
383
+
384
+
385
+ --
386
+ -- Name: exploit_attempts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
387
+ --
388
+
389
+ ALTER SEQUENCE public.exploit_attempts_id_seq OWNED BY public.exploit_attempts.id;
390
+
391
+
392
+ --
393
+ -- Name: exploited_hosts; Type: TABLE; Schema: public; Owner: -
394
+ --
395
+
396
+ CREATE TABLE public.exploited_hosts (
397
+ id integer NOT NULL,
398
+ host_id integer NOT NULL,
399
+ service_id integer,
400
+ session_uuid character varying(8),
401
+ name character varying(2048),
402
+ payload character varying(2048),
403
+ created_at timestamp without time zone NOT NULL,
404
+ updated_at timestamp without time zone NOT NULL
405
+ );
406
+
407
+
408
+ --
409
+ -- Name: exploited_hosts_id_seq; Type: SEQUENCE; Schema: public; Owner: -
410
+ --
411
+
412
+ CREATE SEQUENCE public.exploited_hosts_id_seq
413
+ START WITH 1
414
+ INCREMENT BY 1
415
+ NO MINVALUE
416
+ NO MAXVALUE
417
+ CACHE 1;
418
+
419
+
420
+ --
421
+ -- Name: exploited_hosts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
422
+ --
423
+
424
+ ALTER SEQUENCE public.exploited_hosts_id_seq OWNED BY public.exploited_hosts.id;
425
+
426
+
427
+ --
428
+ -- Name: host_details; Type: TABLE; Schema: public; Owner: -
429
+ --
430
+
431
+ CREATE TABLE public.host_details (
432
+ id integer NOT NULL,
433
+ host_id integer,
434
+ nx_console_id integer,
435
+ nx_device_id integer,
436
+ src character varying,
437
+ nx_site_name character varying,
438
+ nx_site_importance character varying,
439
+ nx_scan_template character varying,
440
+ nx_risk_score double precision
441
+ );
442
+
443
+
444
+ --
445
+ -- Name: host_details_id_seq; Type: SEQUENCE; Schema: public; Owner: -
446
+ --
447
+
448
+ CREATE SEQUENCE public.host_details_id_seq
449
+ START WITH 1
450
+ INCREMENT BY 1
451
+ NO MINVALUE
452
+ NO MAXVALUE
453
+ CACHE 1;
454
+
455
+
456
+ --
457
+ -- Name: host_details_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
458
+ --
459
+
460
+ ALTER SEQUENCE public.host_details_id_seq OWNED BY public.host_details.id;
461
+
462
+
463
+ --
464
+ -- Name: hosts; Type: TABLE; Schema: public; Owner: -
465
+ --
466
+
467
+ CREATE TABLE public.hosts (
468
+ id integer NOT NULL,
469
+ created_at timestamp without time zone,
470
+ address inet NOT NULL,
471
+ mac character varying,
472
+ comm character varying,
473
+ name character varying,
474
+ state character varying,
475
+ os_name character varying,
476
+ os_flavor character varying,
477
+ os_sp character varying,
478
+ os_lang character varying,
479
+ arch character varying,
480
+ workspace_id integer NOT NULL,
481
+ updated_at timestamp without time zone,
482
+ purpose text,
483
+ info character varying(65536),
484
+ comments text,
485
+ scope text,
486
+ virtual_host text,
487
+ note_count integer DEFAULT 0,
488
+ vuln_count integer DEFAULT 0,
489
+ service_count integer DEFAULT 0,
490
+ host_detail_count integer DEFAULT 0,
491
+ exploit_attempt_count integer DEFAULT 0,
492
+ cred_count integer DEFAULT 0,
493
+ detected_arch character varying,
494
+ os_family character varying
495
+ );
496
+
497
+
498
+ --
499
+ -- Name: hosts_id_seq; Type: SEQUENCE; Schema: public; Owner: -
500
+ --
501
+
502
+ CREATE SEQUENCE public.hosts_id_seq
503
+ START WITH 1
504
+ INCREMENT BY 1
505
+ NO MINVALUE
506
+ NO MAXVALUE
507
+ CACHE 1;
508
+
509
+
510
+ --
511
+ -- Name: hosts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
512
+ --
513
+
514
+ ALTER SEQUENCE public.hosts_id_seq OWNED BY public.hosts.id;
515
+
516
+
517
+ --
518
+ -- Name: hosts_tags; Type: TABLE; Schema: public; Owner: -
519
+ --
520
+
521
+ CREATE TABLE public.hosts_tags (
522
+ host_id integer,
523
+ tag_id integer,
524
+ id integer NOT NULL
525
+ );
526
+
527
+
528
+ --
529
+ -- Name: hosts_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: -
530
+ --
531
+
532
+ CREATE SEQUENCE public.hosts_tags_id_seq
533
+ START WITH 1
534
+ INCREMENT BY 1
535
+ NO MINVALUE
536
+ NO MAXVALUE
537
+ CACHE 1;
538
+
539
+
540
+ --
541
+ -- Name: hosts_tags_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
542
+ --
543
+
544
+ ALTER SEQUENCE public.hosts_tags_id_seq OWNED BY public.hosts_tags.id;
545
+
546
+
547
+ --
548
+ -- Name: listeners; Type: TABLE; Schema: public; Owner: -
549
+ --
550
+
551
+ CREATE TABLE public.listeners (
552
+ id integer NOT NULL,
553
+ created_at timestamp without time zone NOT NULL,
554
+ updated_at timestamp without time zone NOT NULL,
555
+ workspace_id integer DEFAULT 1 NOT NULL,
556
+ task_id integer,
557
+ enabled boolean DEFAULT true,
558
+ owner text,
559
+ payload text,
560
+ address text,
561
+ port integer,
562
+ options bytea,
563
+ macro text
564
+ );
565
+
566
+
567
+ --
568
+ -- Name: listeners_id_seq; Type: SEQUENCE; Schema: public; Owner: -
569
+ --
570
+
571
+ CREATE SEQUENCE public.listeners_id_seq
572
+ START WITH 1
573
+ INCREMENT BY 1
574
+ NO MINVALUE
575
+ NO MAXVALUE
576
+ CACHE 1;
577
+
578
+
579
+ --
580
+ -- Name: listeners_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
581
+ --
582
+
583
+ ALTER SEQUENCE public.listeners_id_seq OWNED BY public.listeners.id;
584
+
585
+
586
+ --
587
+ -- Name: loots; Type: TABLE; Schema: public; Owner: -
588
+ --
589
+
590
+ CREATE TABLE public.loots (
591
+ id integer NOT NULL,
592
+ workspace_id integer DEFAULT 1 NOT NULL,
593
+ host_id integer,
594
+ service_id integer,
595
+ ltype character varying(512),
596
+ path character varying(1024),
597
+ data text,
598
+ created_at timestamp without time zone NOT NULL,
599
+ updated_at timestamp without time zone NOT NULL,
600
+ content_type character varying,
601
+ name text,
602
+ info text,
603
+ module_run_id integer
604
+ );
605
+
606
+
607
+ --
608
+ -- Name: loots_id_seq; Type: SEQUENCE; Schema: public; Owner: -
609
+ --
610
+
611
+ CREATE SEQUENCE public.loots_id_seq
612
+ START WITH 1
613
+ INCREMENT BY 1
614
+ NO MINVALUE
615
+ NO MAXVALUE
616
+ CACHE 1;
617
+
618
+
619
+ --
620
+ -- Name: loots_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
621
+ --
622
+
623
+ ALTER SEQUENCE public.loots_id_seq OWNED BY public.loots.id;
624
+
625
+
626
+ --
627
+ -- Name: macros; Type: TABLE; Schema: public; Owner: -
628
+ --
629
+
630
+ CREATE TABLE public.macros (
631
+ id integer NOT NULL,
632
+ created_at timestamp without time zone NOT NULL,
633
+ updated_at timestamp without time zone NOT NULL,
634
+ owner text,
635
+ name text,
636
+ description text,
637
+ actions bytea,
638
+ prefs bytea
639
+ );
640
+
641
+
642
+ --
643
+ -- Name: macros_id_seq; Type: SEQUENCE; Schema: public; Owner: -
644
+ --
645
+
646
+ CREATE SEQUENCE public.macros_id_seq
647
+ START WITH 1
648
+ INCREMENT BY 1
649
+ NO MINVALUE
650
+ NO MAXVALUE
651
+ CACHE 1;
652
+
653
+
654
+ --
655
+ -- Name: macros_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
656
+ --
657
+
658
+ ALTER SEQUENCE public.macros_id_seq OWNED BY public.macros.id;
659
+
660
+
661
+ --
662
+ -- Name: mod_refs; Type: TABLE; Schema: public; Owner: -
663
+ --
664
+
665
+ CREATE TABLE public.mod_refs (
666
+ id integer NOT NULL,
667
+ module character varying(1024),
668
+ mtype character varying(128),
669
+ ref text
670
+ );
671
+
672
+
673
+ --
674
+ -- Name: mod_refs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
675
+ --
676
+
677
+ CREATE SEQUENCE public.mod_refs_id_seq
678
+ START WITH 1
679
+ INCREMENT BY 1
680
+ NO MINVALUE
681
+ NO MAXVALUE
682
+ CACHE 1;
683
+
684
+
685
+ --
686
+ -- Name: mod_refs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
687
+ --
688
+
689
+ ALTER SEQUENCE public.mod_refs_id_seq OWNED BY public.mod_refs.id;
690
+
691
+
692
+ --
693
+ -- Name: module_actions; Type: TABLE; Schema: public; Owner: -
694
+ --
695
+
696
+ CREATE TABLE public.module_actions (
697
+ id integer NOT NULL,
698
+ detail_id integer,
699
+ name text
700
+ );
701
+
702
+
703
+ --
704
+ -- Name: module_actions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
705
+ --
706
+
707
+ CREATE SEQUENCE public.module_actions_id_seq
708
+ START WITH 1
709
+ INCREMENT BY 1
710
+ NO MINVALUE
711
+ NO MAXVALUE
712
+ CACHE 1;
713
+
714
+
715
+ --
716
+ -- Name: module_actions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
717
+ --
718
+
719
+ ALTER SEQUENCE public.module_actions_id_seq OWNED BY public.module_actions.id;
720
+
721
+
722
+ --
723
+ -- Name: module_archs; Type: TABLE; Schema: public; Owner: -
724
+ --
725
+
726
+ CREATE TABLE public.module_archs (
727
+ id integer NOT NULL,
728
+ detail_id integer,
729
+ name text
730
+ );
731
+
732
+
733
+ --
734
+ -- Name: module_archs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
735
+ --
736
+
737
+ CREATE SEQUENCE public.module_archs_id_seq
738
+ START WITH 1
739
+ INCREMENT BY 1
740
+ NO MINVALUE
741
+ NO MAXVALUE
742
+ CACHE 1;
743
+
744
+
745
+ --
746
+ -- Name: module_archs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
747
+ --
748
+
749
+ ALTER SEQUENCE public.module_archs_id_seq OWNED BY public.module_archs.id;
750
+
751
+
752
+ --
753
+ -- Name: module_authors; Type: TABLE; Schema: public; Owner: -
754
+ --
755
+
756
+ CREATE TABLE public.module_authors (
757
+ id integer NOT NULL,
758
+ detail_id integer,
759
+ name text,
760
+ email text
761
+ );
762
+
763
+
764
+ --
765
+ -- Name: module_authors_id_seq; Type: SEQUENCE; Schema: public; Owner: -
766
+ --
767
+
768
+ CREATE SEQUENCE public.module_authors_id_seq
769
+ START WITH 1
770
+ INCREMENT BY 1
771
+ NO MINVALUE
772
+ NO MAXVALUE
773
+ CACHE 1;
774
+
775
+
776
+ --
777
+ -- Name: module_authors_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
778
+ --
779
+
780
+ ALTER SEQUENCE public.module_authors_id_seq OWNED BY public.module_authors.id;
781
+
782
+
783
+ --
784
+ -- Name: module_details; Type: TABLE; Schema: public; Owner: -
785
+ --
786
+
787
+ CREATE TABLE public.module_details (
788
+ id integer NOT NULL,
789
+ mtime timestamp without time zone,
790
+ file text,
791
+ mtype character varying,
792
+ refname text,
793
+ fullname text,
794
+ name text,
795
+ rank integer,
796
+ description text,
797
+ license character varying,
798
+ privileged boolean,
799
+ disclosure_date timestamp without time zone,
800
+ default_target integer,
801
+ default_action text,
802
+ stance character varying,
803
+ ready boolean
804
+ );
805
+
806
+
807
+ --
808
+ -- Name: module_details_id_seq; Type: SEQUENCE; Schema: public; Owner: -
809
+ --
810
+
811
+ CREATE SEQUENCE public.module_details_id_seq
812
+ START WITH 1
813
+ INCREMENT BY 1
814
+ NO MINVALUE
815
+ NO MAXVALUE
816
+ CACHE 1;
817
+
818
+
819
+ --
820
+ -- Name: module_details_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
821
+ --
822
+
823
+ ALTER SEQUENCE public.module_details_id_seq OWNED BY public.module_details.id;
824
+
825
+
826
+ --
827
+ -- Name: module_mixins; Type: TABLE; Schema: public; Owner: -
828
+ --
829
+
830
+ CREATE TABLE public.module_mixins (
831
+ id integer NOT NULL,
832
+ detail_id integer,
833
+ name text
834
+ );
835
+
836
+
837
+ --
838
+ -- Name: module_mixins_id_seq; Type: SEQUENCE; Schema: public; Owner: -
839
+ --
840
+
841
+ CREATE SEQUENCE public.module_mixins_id_seq
842
+ START WITH 1
843
+ INCREMENT BY 1
844
+ NO MINVALUE
845
+ NO MAXVALUE
846
+ CACHE 1;
847
+
848
+
849
+ --
850
+ -- Name: module_mixins_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
851
+ --
852
+
853
+ ALTER SEQUENCE public.module_mixins_id_seq OWNED BY public.module_mixins.id;
854
+
855
+
856
+ --
857
+ -- Name: module_platforms; Type: TABLE; Schema: public; Owner: -
858
+ --
859
+
860
+ CREATE TABLE public.module_platforms (
861
+ id integer NOT NULL,
862
+ detail_id integer,
863
+ name text
864
+ );
865
+
866
+
867
+ --
868
+ -- Name: module_platforms_id_seq; Type: SEQUENCE; Schema: public; Owner: -
869
+ --
870
+
871
+ CREATE SEQUENCE public.module_platforms_id_seq
872
+ START WITH 1
873
+ INCREMENT BY 1
874
+ NO MINVALUE
875
+ NO MAXVALUE
876
+ CACHE 1;
877
+
878
+
879
+ --
880
+ -- Name: module_platforms_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
881
+ --
882
+
883
+ ALTER SEQUENCE public.module_platforms_id_seq OWNED BY public.module_platforms.id;
884
+
885
+
886
+ --
887
+ -- Name: module_refs; Type: TABLE; Schema: public; Owner: -
888
+ --
889
+
890
+ CREATE TABLE public.module_refs (
891
+ id integer NOT NULL,
892
+ detail_id integer,
893
+ name text
894
+ );
895
+
896
+
897
+ --
898
+ -- Name: module_refs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
899
+ --
900
+
901
+ CREATE SEQUENCE public.module_refs_id_seq
902
+ START WITH 1
903
+ INCREMENT BY 1
904
+ NO MINVALUE
905
+ NO MAXVALUE
906
+ CACHE 1;
907
+
908
+
909
+ --
910
+ -- Name: module_refs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
911
+ --
912
+
913
+ ALTER SEQUENCE public.module_refs_id_seq OWNED BY public.module_refs.id;
914
+
915
+
916
+ --
917
+ -- Name: module_runs; Type: TABLE; Schema: public; Owner: -
918
+ --
919
+
920
+ CREATE TABLE public.module_runs (
921
+ id integer NOT NULL,
922
+ attempted_at timestamp without time zone,
923
+ fail_detail text,
924
+ fail_reason character varying,
925
+ module_fullname text,
926
+ port integer,
927
+ proto character varying,
928
+ session_id integer,
929
+ status character varying,
930
+ trackable_id integer,
931
+ trackable_type character varying,
932
+ user_id integer,
933
+ username character varying,
934
+ created_at timestamp without time zone NOT NULL,
935
+ updated_at timestamp without time zone NOT NULL
936
+ );
937
+
938
+
939
+ --
940
+ -- Name: module_runs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
941
+ --
942
+
943
+ CREATE SEQUENCE public.module_runs_id_seq
944
+ START WITH 1
945
+ INCREMENT BY 1
946
+ NO MINVALUE
947
+ NO MAXVALUE
948
+ CACHE 1;
949
+
950
+
951
+ --
952
+ -- Name: module_runs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
953
+ --
954
+
955
+ ALTER SEQUENCE public.module_runs_id_seq OWNED BY public.module_runs.id;
956
+
957
+
958
+ --
959
+ -- Name: module_targets; Type: TABLE; Schema: public; Owner: -
960
+ --
961
+
962
+ CREATE TABLE public.module_targets (
963
+ id integer NOT NULL,
964
+ detail_id integer,
965
+ index integer,
966
+ name text
967
+ );
968
+
969
+
970
+ --
971
+ -- Name: module_targets_id_seq; Type: SEQUENCE; Schema: public; Owner: -
972
+ --
973
+
974
+ CREATE SEQUENCE public.module_targets_id_seq
975
+ START WITH 1
976
+ INCREMENT BY 1
977
+ NO MINVALUE
978
+ NO MAXVALUE
979
+ CACHE 1;
980
+
981
+
982
+ --
983
+ -- Name: module_targets_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
984
+ --
985
+
986
+ ALTER SEQUENCE public.module_targets_id_seq OWNED BY public.module_targets.id;
987
+
988
+
989
+ --
990
+ -- Name: nexpose_consoles; Type: TABLE; Schema: public; Owner: -
991
+ --
992
+
993
+ CREATE TABLE public.nexpose_consoles (
994
+ id integer NOT NULL,
995
+ created_at timestamp without time zone NOT NULL,
996
+ updated_at timestamp without time zone NOT NULL,
997
+ enabled boolean DEFAULT true,
998
+ owner text,
999
+ address text,
1000
+ port integer DEFAULT 3780,
1001
+ username text,
1002
+ password text,
1003
+ status text,
1004
+ version text,
1005
+ cert text,
1006
+ cached_sites bytea,
1007
+ name text
1008
+ );
1009
+
1010
+
1011
+ --
1012
+ -- Name: nexpose_consoles_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1013
+ --
1014
+
1015
+ CREATE SEQUENCE public.nexpose_consoles_id_seq
1016
+ START WITH 1
1017
+ INCREMENT BY 1
1018
+ NO MINVALUE
1019
+ NO MAXVALUE
1020
+ CACHE 1;
1021
+
1022
+
1023
+ --
1024
+ -- Name: nexpose_consoles_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1025
+ --
1026
+
1027
+ ALTER SEQUENCE public.nexpose_consoles_id_seq OWNED BY public.nexpose_consoles.id;
1028
+
1029
+
1030
+ --
1031
+ -- Name: notes; Type: TABLE; Schema: public; Owner: -
1032
+ --
1033
+
1034
+ CREATE TABLE public.notes (
1035
+ id integer NOT NULL,
1036
+ created_at timestamp without time zone,
1037
+ ntype character varying(512),
1038
+ workspace_id integer DEFAULT 1 NOT NULL,
1039
+ service_id integer,
1040
+ host_id integer,
1041
+ updated_at timestamp without time zone,
1042
+ critical boolean,
1043
+ seen boolean,
1044
+ data text,
1045
+ vuln_id integer
1046
+ );
1047
+
1048
+
1049
+ --
1050
+ -- Name: notes_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1051
+ --
1052
+
1053
+ CREATE SEQUENCE public.notes_id_seq
1054
+ START WITH 1
1055
+ INCREMENT BY 1
1056
+ NO MINVALUE
1057
+ NO MAXVALUE
1058
+ CACHE 1;
1059
+
1060
+
1061
+ --
1062
+ -- Name: notes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1063
+ --
1064
+
1065
+ ALTER SEQUENCE public.notes_id_seq OWNED BY public.notes.id;
1066
+
1067
+
1068
+ --
1069
+ -- Name: payloads; Type: TABLE; Schema: public; Owner: -
1070
+ --
1071
+
1072
+ CREATE TABLE public.payloads (
1073
+ id integer NOT NULL,
1074
+ name character varying,
1075
+ uuid character varying,
1076
+ uuid_mask integer,
1077
+ "timestamp" integer,
1078
+ arch character varying,
1079
+ platform character varying,
1080
+ urls character varying,
1081
+ description character varying,
1082
+ raw_payload character varying,
1083
+ raw_payload_hash character varying,
1084
+ build_status character varying,
1085
+ build_opts character varying,
1086
+ created_at timestamp without time zone NOT NULL,
1087
+ updated_at timestamp without time zone NOT NULL
1088
+ );
1089
+
1090
+
1091
+ --
1092
+ -- Name: payloads_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1093
+ --
1094
+
1095
+ CREATE SEQUENCE public.payloads_id_seq
1096
+ START WITH 1
1097
+ INCREMENT BY 1
1098
+ NO MINVALUE
1099
+ NO MAXVALUE
1100
+ CACHE 1;
1101
+
1102
+
1103
+ --
1104
+ -- Name: payloads_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1105
+ --
1106
+
1107
+ ALTER SEQUENCE public.payloads_id_seq OWNED BY public.payloads.id;
1108
+
1109
+
1110
+ --
1111
+ -- Name: profiles; Type: TABLE; Schema: public; Owner: -
1112
+ --
1113
+
1114
+ CREATE TABLE public.profiles (
1115
+ id integer NOT NULL,
1116
+ created_at timestamp without time zone NOT NULL,
1117
+ updated_at timestamp without time zone NOT NULL,
1118
+ active boolean DEFAULT true,
1119
+ name text,
1120
+ owner text,
1121
+ settings bytea
1122
+ );
1123
+
1124
+
1125
+ --
1126
+ -- Name: profiles_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1127
+ --
1128
+
1129
+ CREATE SEQUENCE public.profiles_id_seq
1130
+ START WITH 1
1131
+ INCREMENT BY 1
1132
+ NO MINVALUE
1133
+ NO MAXVALUE
1134
+ CACHE 1;
1135
+
1136
+
1137
+ --
1138
+ -- Name: profiles_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1139
+ --
1140
+
1141
+ ALTER SEQUENCE public.profiles_id_seq OWNED BY public.profiles.id;
1142
+
1143
+
1144
+ --
1145
+ -- Name: refs; Type: TABLE; Schema: public; Owner: -
1146
+ --
1147
+
1148
+ CREATE TABLE public.refs (
1149
+ id integer NOT NULL,
1150
+ ref_id integer,
1151
+ created_at timestamp without time zone,
1152
+ name character varying(512),
1153
+ updated_at timestamp without time zone
1154
+ );
1155
+
1156
+
1157
+ --
1158
+ -- Name: refs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1159
+ --
1160
+
1161
+ CREATE SEQUENCE public.refs_id_seq
1162
+ START WITH 1
1163
+ INCREMENT BY 1
1164
+ NO MINVALUE
1165
+ NO MAXVALUE
1166
+ CACHE 1;
1167
+
1168
+
1169
+ --
1170
+ -- Name: refs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1171
+ --
1172
+
1173
+ ALTER SEQUENCE public.refs_id_seq OWNED BY public.refs.id;
1174
+
1175
+
1176
+ --
1177
+ -- Name: report_templates; Type: TABLE; Schema: public; Owner: -
1178
+ --
1179
+
1180
+ CREATE TABLE public.report_templates (
1181
+ id integer NOT NULL,
1182
+ workspace_id integer DEFAULT 1 NOT NULL,
1183
+ created_by character varying,
1184
+ path character varying(1024),
1185
+ name text,
1186
+ created_at timestamp without time zone NOT NULL,
1187
+ updated_at timestamp without time zone NOT NULL
1188
+ );
1189
+
1190
+
1191
+ --
1192
+ -- Name: report_templates_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1193
+ --
1194
+
1195
+ CREATE SEQUENCE public.report_templates_id_seq
1196
+ START WITH 1
1197
+ INCREMENT BY 1
1198
+ NO MINVALUE
1199
+ NO MAXVALUE
1200
+ CACHE 1;
1201
+
1202
+
1203
+ --
1204
+ -- Name: report_templates_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1205
+ --
1206
+
1207
+ ALTER SEQUENCE public.report_templates_id_seq OWNED BY public.report_templates.id;
1208
+
1209
+
1210
+ --
1211
+ -- Name: reports; Type: TABLE; Schema: public; Owner: -
1212
+ --
1213
+
1214
+ CREATE TABLE public.reports (
1215
+ id integer NOT NULL,
1216
+ workspace_id integer DEFAULT 1 NOT NULL,
1217
+ created_by character varying,
1218
+ rtype character varying,
1219
+ path character varying(1024),
1220
+ options text,
1221
+ created_at timestamp without time zone NOT NULL,
1222
+ updated_at timestamp without time zone NOT NULL,
1223
+ downloaded_at timestamp without time zone,
1224
+ task_id integer,
1225
+ name character varying(63)
1226
+ );
1227
+
1228
+
1229
+ --
1230
+ -- Name: reports_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1231
+ --
1232
+
1233
+ CREATE SEQUENCE public.reports_id_seq
1234
+ START WITH 1
1235
+ INCREMENT BY 1
1236
+ NO MINVALUE
1237
+ NO MAXVALUE
1238
+ CACHE 1;
1239
+
1240
+
1241
+ --
1242
+ -- Name: reports_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1243
+ --
1244
+
1245
+ ALTER SEQUENCE public.reports_id_seq OWNED BY public.reports.id;
1246
+
1247
+
1248
+ --
1249
+ -- Name: routes; Type: TABLE; Schema: public; Owner: -
1250
+ --
1251
+
1252
+ CREATE TABLE public.routes (
1253
+ id integer NOT NULL,
1254
+ session_id integer,
1255
+ subnet character varying,
1256
+ netmask character varying
1257
+ );
1258
+
1259
+
1260
+ --
1261
+ -- Name: routes_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1262
+ --
1263
+
1264
+ CREATE SEQUENCE public.routes_id_seq
1265
+ START WITH 1
1266
+ INCREMENT BY 1
1267
+ NO MINVALUE
1268
+ NO MAXVALUE
1269
+ CACHE 1;
1270
+
1271
+
1272
+ --
1273
+ -- Name: routes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1274
+ --
1275
+
1276
+ ALTER SEQUENCE public.routes_id_seq OWNED BY public.routes.id;
1277
+
1278
+
1279
+ --
1280
+ -- Name: schema_migrations; Type: TABLE; Schema: public; Owner: -
1281
+ --
1282
+
1283
+ CREATE TABLE public.schema_migrations (
1284
+ version character varying NOT NULL
1285
+ );
1286
+
1287
+
1288
+ --
1289
+ -- Name: services; Type: TABLE; Schema: public; Owner: -
1290
+ --
1291
+
1292
+ CREATE TABLE public.services (
1293
+ id integer NOT NULL,
1294
+ host_id integer,
1295
+ created_at timestamp without time zone,
1296
+ port integer NOT NULL,
1297
+ proto character varying(16) NOT NULL,
1298
+ state character varying,
1299
+ name character varying,
1300
+ updated_at timestamp without time zone,
1301
+ info text
1302
+ );
1303
+
1304
+
1305
+ --
1306
+ -- Name: services_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1307
+ --
1308
+
1309
+ CREATE SEQUENCE public.services_id_seq
1310
+ START WITH 1
1311
+ INCREMENT BY 1
1312
+ NO MINVALUE
1313
+ NO MAXVALUE
1314
+ CACHE 1;
1315
+
1316
+
1317
+ --
1318
+ -- Name: services_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1319
+ --
1320
+
1321
+ ALTER SEQUENCE public.services_id_seq OWNED BY public.services.id;
1322
+
1323
+
1324
+ --
1325
+ -- Name: session_events; Type: TABLE; Schema: public; Owner: -
1326
+ --
1327
+
1328
+ CREATE TABLE public.session_events (
1329
+ id integer NOT NULL,
1330
+ session_id integer,
1331
+ etype character varying,
1332
+ command bytea,
1333
+ output bytea,
1334
+ remote_path character varying,
1335
+ local_path character varying,
1336
+ created_at timestamp without time zone
1337
+ );
1338
+
1339
+
1340
+ --
1341
+ -- Name: session_events_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1342
+ --
1343
+
1344
+ CREATE SEQUENCE public.session_events_id_seq
1345
+ START WITH 1
1346
+ INCREMENT BY 1
1347
+ NO MINVALUE
1348
+ NO MAXVALUE
1349
+ CACHE 1;
1350
+
1351
+
1352
+ --
1353
+ -- Name: session_events_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1354
+ --
1355
+
1356
+ ALTER SEQUENCE public.session_events_id_seq OWNED BY public.session_events.id;
1357
+
1358
+
1359
+ --
1360
+ -- Name: sessions; Type: TABLE; Schema: public; Owner: -
1361
+ --
1362
+
1363
+ CREATE TABLE public.sessions (
1364
+ id integer NOT NULL,
1365
+ host_id integer,
1366
+ stype character varying,
1367
+ via_exploit character varying,
1368
+ via_payload character varying,
1369
+ "desc" character varying,
1370
+ port integer,
1371
+ platform character varying,
1372
+ datastore text,
1373
+ opened_at timestamp without time zone NOT NULL,
1374
+ closed_at timestamp without time zone,
1375
+ close_reason character varying,
1376
+ local_id integer,
1377
+ last_seen timestamp without time zone,
1378
+ module_run_id integer
1379
+ );
1380
+
1381
+
1382
+ --
1383
+ -- Name: sessions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1384
+ --
1385
+
1386
+ CREATE SEQUENCE public.sessions_id_seq
1387
+ START WITH 1
1388
+ INCREMENT BY 1
1389
+ NO MINVALUE
1390
+ NO MAXVALUE
1391
+ CACHE 1;
1392
+
1393
+
1394
+ --
1395
+ -- Name: sessions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1396
+ --
1397
+
1398
+ ALTER SEQUENCE public.sessions_id_seq OWNED BY public.sessions.id;
1399
+
1400
+
1401
+ --
1402
+ -- Name: tags; Type: TABLE; Schema: public; Owner: -
1403
+ --
1404
+
1405
+ CREATE TABLE public.tags (
1406
+ id integer NOT NULL,
1407
+ user_id integer,
1408
+ name character varying(1024),
1409
+ "desc" text,
1410
+ report_summary boolean DEFAULT false NOT NULL,
1411
+ report_detail boolean DEFAULT false NOT NULL,
1412
+ critical boolean DEFAULT false NOT NULL,
1413
+ created_at timestamp without time zone NOT NULL,
1414
+ updated_at timestamp without time zone NOT NULL
1415
+ );
1416
+
1417
+
1418
+ --
1419
+ -- Name: tags_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1420
+ --
1421
+
1422
+ CREATE SEQUENCE public.tags_id_seq
1423
+ START WITH 1
1424
+ INCREMENT BY 1
1425
+ NO MINVALUE
1426
+ NO MAXVALUE
1427
+ CACHE 1;
1428
+
1429
+
1430
+ --
1431
+ -- Name: tags_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1432
+ --
1433
+
1434
+ ALTER SEQUENCE public.tags_id_seq OWNED BY public.tags.id;
1435
+
1436
+
1437
+ --
1438
+ -- Name: task_creds; Type: TABLE; Schema: public; Owner: -
1439
+ --
1440
+
1441
+ CREATE TABLE public.task_creds (
1442
+ id integer NOT NULL,
1443
+ task_id integer NOT NULL,
1444
+ cred_id integer NOT NULL,
1445
+ created_at timestamp without time zone NOT NULL,
1446
+ updated_at timestamp without time zone NOT NULL
1447
+ );
1448
+
1449
+
1450
+ --
1451
+ -- Name: task_creds_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1452
+ --
1453
+
1454
+ CREATE SEQUENCE public.task_creds_id_seq
1455
+ START WITH 1
1456
+ INCREMENT BY 1
1457
+ NO MINVALUE
1458
+ NO MAXVALUE
1459
+ CACHE 1;
1460
+
1461
+
1462
+ --
1463
+ -- Name: task_creds_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1464
+ --
1465
+
1466
+ ALTER SEQUENCE public.task_creds_id_seq OWNED BY public.task_creds.id;
1467
+
1468
+
1469
+ --
1470
+ -- Name: task_hosts; Type: TABLE; Schema: public; Owner: -
1471
+ --
1472
+
1473
+ CREATE TABLE public.task_hosts (
1474
+ id integer NOT NULL,
1475
+ task_id integer NOT NULL,
1476
+ host_id integer NOT NULL,
1477
+ created_at timestamp without time zone NOT NULL,
1478
+ updated_at timestamp without time zone NOT NULL
1479
+ );
1480
+
1481
+
1482
+ --
1483
+ -- Name: task_hosts_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1484
+ --
1485
+
1486
+ CREATE SEQUENCE public.task_hosts_id_seq
1487
+ START WITH 1
1488
+ INCREMENT BY 1
1489
+ NO MINVALUE
1490
+ NO MAXVALUE
1491
+ CACHE 1;
1492
+
1493
+
1494
+ --
1495
+ -- Name: task_hosts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1496
+ --
1497
+
1498
+ ALTER SEQUENCE public.task_hosts_id_seq OWNED BY public.task_hosts.id;
1499
+
1500
+
1501
+ --
1502
+ -- Name: task_services; Type: TABLE; Schema: public; Owner: -
1503
+ --
1504
+
1505
+ CREATE TABLE public.task_services (
1506
+ id integer NOT NULL,
1507
+ task_id integer NOT NULL,
1508
+ service_id integer NOT NULL,
1509
+ created_at timestamp without time zone NOT NULL,
1510
+ updated_at timestamp without time zone NOT NULL
1511
+ );
1512
+
1513
+
1514
+ --
1515
+ -- Name: task_services_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1516
+ --
1517
+
1518
+ CREATE SEQUENCE public.task_services_id_seq
1519
+ START WITH 1
1520
+ INCREMENT BY 1
1521
+ NO MINVALUE
1522
+ NO MAXVALUE
1523
+ CACHE 1;
1524
+
1525
+
1526
+ --
1527
+ -- Name: task_services_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1528
+ --
1529
+
1530
+ ALTER SEQUENCE public.task_services_id_seq OWNED BY public.task_services.id;
1531
+
1532
+
1533
+ --
1534
+ -- Name: task_sessions; Type: TABLE; Schema: public; Owner: -
1535
+ --
1536
+
1537
+ CREATE TABLE public.task_sessions (
1538
+ id integer NOT NULL,
1539
+ task_id integer NOT NULL,
1540
+ session_id integer NOT NULL,
1541
+ created_at timestamp without time zone NOT NULL,
1542
+ updated_at timestamp without time zone NOT NULL
1543
+ );
1544
+
1545
+
1546
+ --
1547
+ -- Name: task_sessions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1548
+ --
1549
+
1550
+ CREATE SEQUENCE public.task_sessions_id_seq
1551
+ START WITH 1
1552
+ INCREMENT BY 1
1553
+ NO MINVALUE
1554
+ NO MAXVALUE
1555
+ CACHE 1;
1556
+
1557
+
1558
+ --
1559
+ -- Name: task_sessions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1560
+ --
1561
+
1562
+ ALTER SEQUENCE public.task_sessions_id_seq OWNED BY public.task_sessions.id;
1563
+
1564
+
1565
+ --
1566
+ -- Name: tasks; Type: TABLE; Schema: public; Owner: -
1567
+ --
1568
+
1569
+ CREATE TABLE public.tasks (
1570
+ id integer NOT NULL,
1571
+ workspace_id integer DEFAULT 1 NOT NULL,
1572
+ created_by character varying,
1573
+ module character varying,
1574
+ completed_at timestamp without time zone,
1575
+ path character varying(1024),
1576
+ info character varying,
1577
+ description character varying,
1578
+ progress integer,
1579
+ options text,
1580
+ error text,
1581
+ created_at timestamp without time zone NOT NULL,
1582
+ updated_at timestamp without time zone NOT NULL,
1583
+ result text,
1584
+ module_uuid character varying(8),
1585
+ settings bytea
1586
+ );
1587
+
1588
+
1589
+ --
1590
+ -- Name: tasks_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1591
+ --
1592
+
1593
+ CREATE SEQUENCE public.tasks_id_seq
1594
+ START WITH 1
1595
+ INCREMENT BY 1
1596
+ NO MINVALUE
1597
+ NO MAXVALUE
1598
+ CACHE 1;
1599
+
1600
+
1601
+ --
1602
+ -- Name: tasks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1603
+ --
1604
+
1605
+ ALTER SEQUENCE public.tasks_id_seq OWNED BY public.tasks.id;
1606
+
1607
+
1608
+ --
1609
+ -- Name: users; Type: TABLE; Schema: public; Owner: -
1610
+ --
1611
+
1612
+ CREATE TABLE public.users (
1613
+ id integer NOT NULL,
1614
+ username character varying,
1615
+ crypted_password character varying,
1616
+ password_salt character varying,
1617
+ persistence_token character varying,
1618
+ created_at timestamp without time zone NOT NULL,
1619
+ updated_at timestamp without time zone NOT NULL,
1620
+ fullname character varying,
1621
+ email character varying,
1622
+ phone character varying,
1623
+ company character varying,
1624
+ prefs character varying(524288),
1625
+ admin boolean DEFAULT true NOT NULL
1626
+ );
1627
+
1628
+
1629
+ --
1630
+ -- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1631
+ --
1632
+
1633
+ CREATE SEQUENCE public.users_id_seq
1634
+ START WITH 1
1635
+ INCREMENT BY 1
1636
+ NO MINVALUE
1637
+ NO MAXVALUE
1638
+ CACHE 1;
1639
+
1640
+
1641
+ --
1642
+ -- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1643
+ --
1644
+
1645
+ ALTER SEQUENCE public.users_id_seq OWNED BY public.users.id;
1646
+
1647
+
1648
+ --
1649
+ -- Name: vuln_attempts; Type: TABLE; Schema: public; Owner: -
1650
+ --
1651
+
1652
+ CREATE TABLE public.vuln_attempts (
1653
+ id integer NOT NULL,
1654
+ vuln_id integer,
1655
+ attempted_at timestamp without time zone,
1656
+ exploited boolean,
1657
+ fail_reason character varying,
1658
+ username character varying,
1659
+ module text,
1660
+ session_id integer,
1661
+ loot_id integer,
1662
+ fail_detail text
1663
+ );
1664
+
1665
+
1666
+ --
1667
+ -- Name: vuln_attempts_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1668
+ --
1669
+
1670
+ CREATE SEQUENCE public.vuln_attempts_id_seq
1671
+ START WITH 1
1672
+ INCREMENT BY 1
1673
+ NO MINVALUE
1674
+ NO MAXVALUE
1675
+ CACHE 1;
1676
+
1677
+
1678
+ --
1679
+ -- Name: vuln_attempts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1680
+ --
1681
+
1682
+ ALTER SEQUENCE public.vuln_attempts_id_seq OWNED BY public.vuln_attempts.id;
1683
+
1684
+
1685
+ --
1686
+ -- Name: vuln_details; Type: TABLE; Schema: public; Owner: -
1687
+ --
1688
+
1689
+ CREATE TABLE public.vuln_details (
1690
+ id integer NOT NULL,
1691
+ vuln_id integer,
1692
+ cvss_score double precision,
1693
+ cvss_vector character varying,
1694
+ title character varying,
1695
+ description text,
1696
+ solution text,
1697
+ proof bytea,
1698
+ nx_console_id integer,
1699
+ nx_device_id integer,
1700
+ nx_vuln_id character varying,
1701
+ nx_severity double precision,
1702
+ nx_pci_severity double precision,
1703
+ nx_published timestamp without time zone,
1704
+ nx_added timestamp without time zone,
1705
+ nx_modified timestamp without time zone,
1706
+ nx_tags text,
1707
+ nx_vuln_status text,
1708
+ nx_proof_key text,
1709
+ src character varying,
1710
+ nx_scan_id integer,
1711
+ nx_vulnerable_since timestamp without time zone,
1712
+ nx_pci_compliance_status character varying
1713
+ );
1714
+
1715
+
1716
+ --
1717
+ -- Name: vuln_details_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1718
+ --
1719
+
1720
+ CREATE SEQUENCE public.vuln_details_id_seq
1721
+ START WITH 1
1722
+ INCREMENT BY 1
1723
+ NO MINVALUE
1724
+ NO MAXVALUE
1725
+ CACHE 1;
1726
+
1727
+
1728
+ --
1729
+ -- Name: vuln_details_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1730
+ --
1731
+
1732
+ ALTER SEQUENCE public.vuln_details_id_seq OWNED BY public.vuln_details.id;
1733
+
1734
+
1735
+ --
1736
+ -- Name: vulns; Type: TABLE; Schema: public; Owner: -
1737
+ --
1738
+
1739
+ CREATE TABLE public.vulns (
1740
+ id integer NOT NULL,
1741
+ host_id integer,
1742
+ service_id integer,
1743
+ created_at timestamp without time zone,
1744
+ name character varying,
1745
+ updated_at timestamp without time zone,
1746
+ info character varying(65536),
1747
+ exploited_at timestamp without time zone,
1748
+ vuln_detail_count integer DEFAULT 0,
1749
+ vuln_attempt_count integer DEFAULT 0,
1750
+ origin_id integer,
1751
+ origin_type character varying
1752
+ );
1753
+
1754
+
1755
+ --
1756
+ -- Name: vulns_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1757
+ --
1758
+
1759
+ CREATE SEQUENCE public.vulns_id_seq
1760
+ START WITH 1
1761
+ INCREMENT BY 1
1762
+ NO MINVALUE
1763
+ NO MAXVALUE
1764
+ CACHE 1;
1765
+
1766
+
1767
+ --
1768
+ -- Name: vulns_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1769
+ --
1770
+
1771
+ ALTER SEQUENCE public.vulns_id_seq OWNED BY public.vulns.id;
1772
+
1773
+
1774
+ --
1775
+ -- Name: vulns_refs; Type: TABLE; Schema: public; Owner: -
1776
+ --
1777
+
1778
+ CREATE TABLE public.vulns_refs (
1779
+ ref_id integer,
1780
+ vuln_id integer,
1781
+ id integer NOT NULL
1782
+ );
1783
+
1784
+
1785
+ --
1786
+ -- Name: vulns_refs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1787
+ --
1788
+
1789
+ CREATE SEQUENCE public.vulns_refs_id_seq
1790
+ START WITH 1
1791
+ INCREMENT BY 1
1792
+ NO MINVALUE
1793
+ NO MAXVALUE
1794
+ CACHE 1;
1795
+
1796
+
1797
+ --
1798
+ -- Name: vulns_refs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1799
+ --
1800
+
1801
+ ALTER SEQUENCE public.vulns_refs_id_seq OWNED BY public.vulns_refs.id;
1802
+
1803
+
1804
+ --
1805
+ -- Name: web_forms; Type: TABLE; Schema: public; Owner: -
1806
+ --
1807
+
1808
+ CREATE TABLE public.web_forms (
1809
+ id integer NOT NULL,
1810
+ web_site_id integer NOT NULL,
1811
+ created_at timestamp without time zone NOT NULL,
1812
+ updated_at timestamp without time zone NOT NULL,
1813
+ path text,
1814
+ method character varying(1024),
1815
+ params text,
1816
+ query text
1817
+ );
1818
+
1819
+
1820
+ --
1821
+ -- Name: web_forms_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1822
+ --
1823
+
1824
+ CREATE SEQUENCE public.web_forms_id_seq
1825
+ START WITH 1
1826
+ INCREMENT BY 1
1827
+ NO MINVALUE
1828
+ NO MAXVALUE
1829
+ CACHE 1;
1830
+
1831
+
1832
+ --
1833
+ -- Name: web_forms_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1834
+ --
1835
+
1836
+ ALTER SEQUENCE public.web_forms_id_seq OWNED BY public.web_forms.id;
1837
+
1838
+
1839
+ --
1840
+ -- Name: web_pages; Type: TABLE; Schema: public; Owner: -
1841
+ --
1842
+
1843
+ CREATE TABLE public.web_pages (
1844
+ id integer NOT NULL,
1845
+ web_site_id integer NOT NULL,
1846
+ created_at timestamp without time zone NOT NULL,
1847
+ updated_at timestamp without time zone NOT NULL,
1848
+ path text,
1849
+ query text,
1850
+ code integer NOT NULL,
1851
+ cookie text,
1852
+ auth text,
1853
+ ctype text,
1854
+ mtime timestamp without time zone,
1855
+ location text,
1856
+ headers text,
1857
+ body bytea,
1858
+ request bytea
1859
+ );
1860
+
1861
+
1862
+ --
1863
+ -- Name: web_pages_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1864
+ --
1865
+
1866
+ CREATE SEQUENCE public.web_pages_id_seq
1867
+ START WITH 1
1868
+ INCREMENT BY 1
1869
+ NO MINVALUE
1870
+ NO MAXVALUE
1871
+ CACHE 1;
1872
+
1873
+
1874
+ --
1875
+ -- Name: web_pages_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1876
+ --
1877
+
1878
+ ALTER SEQUENCE public.web_pages_id_seq OWNED BY public.web_pages.id;
1879
+
1880
+
1881
+ --
1882
+ -- Name: web_sites; Type: TABLE; Schema: public; Owner: -
1883
+ --
1884
+
1885
+ CREATE TABLE public.web_sites (
1886
+ id integer NOT NULL,
1887
+ service_id integer NOT NULL,
1888
+ created_at timestamp without time zone NOT NULL,
1889
+ updated_at timestamp without time zone NOT NULL,
1890
+ vhost character varying(2048),
1891
+ comments text,
1892
+ options text
1893
+ );
1894
+
1895
+
1896
+ --
1897
+ -- Name: web_sites_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1898
+ --
1899
+
1900
+ CREATE SEQUENCE public.web_sites_id_seq
1901
+ START WITH 1
1902
+ INCREMENT BY 1
1903
+ NO MINVALUE
1904
+ NO MAXVALUE
1905
+ CACHE 1;
1906
+
1907
+
1908
+ --
1909
+ -- Name: web_sites_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1910
+ --
1911
+
1912
+ ALTER SEQUENCE public.web_sites_id_seq OWNED BY public.web_sites.id;
1913
+
1914
+
1915
+ --
1916
+ -- Name: web_vulns; Type: TABLE; Schema: public; Owner: -
1917
+ --
1918
+
1919
+ CREATE TABLE public.web_vulns (
1920
+ id integer NOT NULL,
1921
+ web_site_id integer NOT NULL,
1922
+ created_at timestamp without time zone NOT NULL,
1923
+ updated_at timestamp without time zone NOT NULL,
1924
+ path text NOT NULL,
1925
+ method character varying(1024) NOT NULL,
1926
+ params text,
1927
+ pname text,
1928
+ risk integer NOT NULL,
1929
+ name character varying(1024) NOT NULL,
1930
+ query text,
1931
+ category text NOT NULL,
1932
+ confidence integer NOT NULL,
1933
+ description text,
1934
+ blame text,
1935
+ request bytea,
1936
+ proof bytea NOT NULL,
1937
+ owner character varying,
1938
+ payload text
1939
+ );
1940
+
1941
+
1942
+ --
1943
+ -- Name: web_vulns_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1944
+ --
1945
+
1946
+ CREATE SEQUENCE public.web_vulns_id_seq
1947
+ START WITH 1
1948
+ INCREMENT BY 1
1949
+ NO MINVALUE
1950
+ NO MAXVALUE
1951
+ CACHE 1;
1952
+
1953
+
1954
+ --
1955
+ -- Name: web_vulns_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1956
+ --
1957
+
1958
+ ALTER SEQUENCE public.web_vulns_id_seq OWNED BY public.web_vulns.id;
1959
+
1960
+
1961
+ --
1962
+ -- Name: wmap_requests; Type: TABLE; Schema: public; Owner: -
1963
+ --
1964
+
1965
+ CREATE TABLE public.wmap_requests (
1966
+ id integer NOT NULL,
1967
+ host character varying,
1968
+ address inet,
1969
+ port integer,
1970
+ ssl integer,
1971
+ meth character varying(32),
1972
+ path text,
1973
+ headers text,
1974
+ query text,
1975
+ body text,
1976
+ respcode character varying(16),
1977
+ resphead text,
1978
+ response text,
1979
+ created_at timestamp without time zone,
1980
+ updated_at timestamp without time zone
1981
+ );
1982
+
1983
+
1984
+ --
1985
+ -- Name: wmap_requests_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1986
+ --
1987
+
1988
+ CREATE SEQUENCE public.wmap_requests_id_seq
1989
+ START WITH 1
1990
+ INCREMENT BY 1
1991
+ NO MINVALUE
1992
+ NO MAXVALUE
1993
+ CACHE 1;
1994
+
1995
+
1996
+ --
1997
+ -- Name: wmap_requests_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1998
+ --
1999
+
2000
+ ALTER SEQUENCE public.wmap_requests_id_seq OWNED BY public.wmap_requests.id;
2001
+
2002
+
2003
+ --
2004
+ -- Name: wmap_targets; Type: TABLE; Schema: public; Owner: -
2005
+ --
2006
+
2007
+ CREATE TABLE public.wmap_targets (
2008
+ id integer NOT NULL,
2009
+ host character varying,
2010
+ address inet,
2011
+ port integer,
2012
+ ssl integer,
2013
+ selected integer,
2014
+ created_at timestamp without time zone,
2015
+ updated_at timestamp without time zone
2016
+ );
2017
+
2018
+
2019
+ --
2020
+ -- Name: wmap_targets_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2021
+ --
2022
+
2023
+ CREATE SEQUENCE public.wmap_targets_id_seq
2024
+ START WITH 1
2025
+ INCREMENT BY 1
2026
+ NO MINVALUE
2027
+ NO MAXVALUE
2028
+ CACHE 1;
2029
+
2030
+
2031
+ --
2032
+ -- Name: wmap_targets_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2033
+ --
2034
+
2035
+ ALTER SEQUENCE public.wmap_targets_id_seq OWNED BY public.wmap_targets.id;
2036
+
2037
+
2038
+ --
2039
+ -- Name: workspace_members; Type: TABLE; Schema: public; Owner: -
2040
+ --
2041
+
2042
+ CREATE TABLE public.workspace_members (
2043
+ workspace_id integer NOT NULL,
2044
+ user_id integer NOT NULL
2045
+ );
2046
+
2047
+
2048
+ --
2049
+ -- Name: workspaces; Type: TABLE; Schema: public; Owner: -
2050
+ --
2051
+
2052
+ CREATE TABLE public.workspaces (
2053
+ id integer NOT NULL,
2054
+ name character varying,
2055
+ created_at timestamp without time zone NOT NULL,
2056
+ updated_at timestamp without time zone NOT NULL,
2057
+ boundary character varying(4096),
2058
+ description character varying(4096),
2059
+ owner_id integer,
2060
+ limit_to_network boolean DEFAULT false NOT NULL,
2061
+ import_fingerprint boolean DEFAULT false
2062
+ );
2063
+
2064
+
2065
+ --
2066
+ -- Name: workspaces_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2067
+ --
2068
+
2069
+ CREATE SEQUENCE public.workspaces_id_seq
2070
+ START WITH 1
2071
+ INCREMENT BY 1
2072
+ NO MINVALUE
2073
+ NO MAXVALUE
2074
+ CACHE 1;
2075
+
2076
+
2077
+ --
2078
+ -- Name: workspaces_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2079
+ --
2080
+
2081
+ ALTER SEQUENCE public.workspaces_id_seq OWNED BY public.workspaces.id;
2082
+
2083
+
2084
+ --
2085
+ -- Name: api_keys id; Type: DEFAULT; Schema: public; Owner: -
2086
+ --
2087
+
2088
+ ALTER TABLE ONLY public.api_keys ALTER COLUMN id SET DEFAULT nextval('public.api_keys_id_seq'::regclass);
2089
+
2090
+
2091
+ --
2092
+ -- Name: async_callbacks id; Type: DEFAULT; Schema: public; Owner: -
2093
+ --
2094
+
2095
+ ALTER TABLE ONLY public.async_callbacks ALTER COLUMN id SET DEFAULT nextval('public.async_callbacks_id_seq'::regclass);
2096
+
2097
+
2098
+ --
2099
+ -- Name: automatic_exploitation_match_results id; Type: DEFAULT; Schema: public; Owner: -
2100
+ --
2101
+
2102
+ ALTER TABLE ONLY public.automatic_exploitation_match_results ALTER COLUMN id SET DEFAULT nextval('public.automatic_exploitation_match_results_id_seq'::regclass);
2103
+
2104
+
2105
+ --
2106
+ -- Name: automatic_exploitation_match_sets id; Type: DEFAULT; Schema: public; Owner: -
2107
+ --
2108
+
2109
+ ALTER TABLE ONLY public.automatic_exploitation_match_sets ALTER COLUMN id SET DEFAULT nextval('public.automatic_exploitation_match_sets_id_seq'::regclass);
2110
+
2111
+
2112
+ --
2113
+ -- Name: automatic_exploitation_matches id; Type: DEFAULT; Schema: public; Owner: -
2114
+ --
2115
+
2116
+ ALTER TABLE ONLY public.automatic_exploitation_matches ALTER COLUMN id SET DEFAULT nextval('public.automatic_exploitation_matches_id_seq'::regclass);
2117
+
2118
+
2119
+ --
2120
+ -- Name: automatic_exploitation_runs id; Type: DEFAULT; Schema: public; Owner: -
2121
+ --
2122
+
2123
+ ALTER TABLE ONLY public.automatic_exploitation_runs ALTER COLUMN id SET DEFAULT nextval('public.automatic_exploitation_runs_id_seq'::regclass);
2124
+
2125
+
2126
+ --
2127
+ -- Name: clients id; Type: DEFAULT; Schema: public; Owner: -
2128
+ --
2129
+
2130
+ ALTER TABLE ONLY public.clients ALTER COLUMN id SET DEFAULT nextval('public.clients_id_seq'::regclass);
2131
+
2132
+
2133
+ --
2134
+ -- Name: creds id; Type: DEFAULT; Schema: public; Owner: -
2135
+ --
2136
+
2137
+ ALTER TABLE ONLY public.creds ALTER COLUMN id SET DEFAULT nextval('public.creds_id_seq'::regclass);
2138
+
2139
+
2140
+ --
2141
+ -- Name: events id; Type: DEFAULT; Schema: public; Owner: -
2142
+ --
2143
+
2144
+ ALTER TABLE ONLY public.events ALTER COLUMN id SET DEFAULT nextval('public.events_id_seq'::regclass);
2145
+
2146
+
2147
+ --
2148
+ -- Name: exploit_attempts id; Type: DEFAULT; Schema: public; Owner: -
2149
+ --
2150
+
2151
+ ALTER TABLE ONLY public.exploit_attempts ALTER COLUMN id SET DEFAULT nextval('public.exploit_attempts_id_seq'::regclass);
2152
+
2153
+
2154
+ --
2155
+ -- Name: exploited_hosts id; Type: DEFAULT; Schema: public; Owner: -
2156
+ --
2157
+
2158
+ ALTER TABLE ONLY public.exploited_hosts ALTER COLUMN id SET DEFAULT nextval('public.exploited_hosts_id_seq'::regclass);
2159
+
2160
+
2161
+ --
2162
+ -- Name: host_details id; Type: DEFAULT; Schema: public; Owner: -
2163
+ --
2164
+
2165
+ ALTER TABLE ONLY public.host_details ALTER COLUMN id SET DEFAULT nextval('public.host_details_id_seq'::regclass);
2166
+
2167
+
2168
+ --
2169
+ -- Name: hosts id; Type: DEFAULT; Schema: public; Owner: -
2170
+ --
2171
+
2172
+ ALTER TABLE ONLY public.hosts ALTER COLUMN id SET DEFAULT nextval('public.hosts_id_seq'::regclass);
2173
+
2174
+
2175
+ --
2176
+ -- Name: hosts_tags id; Type: DEFAULT; Schema: public; Owner: -
2177
+ --
2178
+
2179
+ ALTER TABLE ONLY public.hosts_tags ALTER COLUMN id SET DEFAULT nextval('public.hosts_tags_id_seq'::regclass);
2180
+
2181
+
2182
+ --
2183
+ -- Name: listeners id; Type: DEFAULT; Schema: public; Owner: -
2184
+ --
2185
+
2186
+ ALTER TABLE ONLY public.listeners ALTER COLUMN id SET DEFAULT nextval('public.listeners_id_seq'::regclass);
2187
+
2188
+
2189
+ --
2190
+ -- Name: loots id; Type: DEFAULT; Schema: public; Owner: -
2191
+ --
2192
+
2193
+ ALTER TABLE ONLY public.loots ALTER COLUMN id SET DEFAULT nextval('public.loots_id_seq'::regclass);
2194
+
2195
+
2196
+ --
2197
+ -- Name: macros id; Type: DEFAULT; Schema: public; Owner: -
2198
+ --
2199
+
2200
+ ALTER TABLE ONLY public.macros ALTER COLUMN id SET DEFAULT nextval('public.macros_id_seq'::regclass);
2201
+
2202
+
2203
+ --
2204
+ -- Name: mod_refs id; Type: DEFAULT; Schema: public; Owner: -
2205
+ --
2206
+
2207
+ ALTER TABLE ONLY public.mod_refs ALTER COLUMN id SET DEFAULT nextval('public.mod_refs_id_seq'::regclass);
2208
+
2209
+
2210
+ --
2211
+ -- Name: module_actions id; Type: DEFAULT; Schema: public; Owner: -
2212
+ --
2213
+
2214
+ ALTER TABLE ONLY public.module_actions ALTER COLUMN id SET DEFAULT nextval('public.module_actions_id_seq'::regclass);
2215
+
2216
+
2217
+ --
2218
+ -- Name: module_archs id; Type: DEFAULT; Schema: public; Owner: -
2219
+ --
2220
+
2221
+ ALTER TABLE ONLY public.module_archs ALTER COLUMN id SET DEFAULT nextval('public.module_archs_id_seq'::regclass);
2222
+
2223
+
2224
+ --
2225
+ -- Name: module_authors id; Type: DEFAULT; Schema: public; Owner: -
2226
+ --
2227
+
2228
+ ALTER TABLE ONLY public.module_authors ALTER COLUMN id SET DEFAULT nextval('public.module_authors_id_seq'::regclass);
2229
+
2230
+
2231
+ --
2232
+ -- Name: module_details id; Type: DEFAULT; Schema: public; Owner: -
2233
+ --
2234
+
2235
+ ALTER TABLE ONLY public.module_details ALTER COLUMN id SET DEFAULT nextval('public.module_details_id_seq'::regclass);
2236
+
2237
+
2238
+ --
2239
+ -- Name: module_mixins id; Type: DEFAULT; Schema: public; Owner: -
2240
+ --
2241
+
2242
+ ALTER TABLE ONLY public.module_mixins ALTER COLUMN id SET DEFAULT nextval('public.module_mixins_id_seq'::regclass);
2243
+
2244
+
2245
+ --
2246
+ -- Name: module_platforms id; Type: DEFAULT; Schema: public; Owner: -
2247
+ --
2248
+
2249
+ ALTER TABLE ONLY public.module_platforms ALTER COLUMN id SET DEFAULT nextval('public.module_platforms_id_seq'::regclass);
2250
+
2251
+
2252
+ --
2253
+ -- Name: module_refs id; Type: DEFAULT; Schema: public; Owner: -
2254
+ --
2255
+
2256
+ ALTER TABLE ONLY public.module_refs ALTER COLUMN id SET DEFAULT nextval('public.module_refs_id_seq'::regclass);
2257
+
2258
+
2259
+ --
2260
+ -- Name: module_runs id; Type: DEFAULT; Schema: public; Owner: -
2261
+ --
2262
+
2263
+ ALTER TABLE ONLY public.module_runs ALTER COLUMN id SET DEFAULT nextval('public.module_runs_id_seq'::regclass);
2264
+
2265
+
2266
+ --
2267
+ -- Name: module_targets id; Type: DEFAULT; Schema: public; Owner: -
2268
+ --
2269
+
2270
+ ALTER TABLE ONLY public.module_targets ALTER COLUMN id SET DEFAULT nextval('public.module_targets_id_seq'::regclass);
2271
+
2272
+
2273
+ --
2274
+ -- Name: nexpose_consoles id; Type: DEFAULT; Schema: public; Owner: -
2275
+ --
2276
+
2277
+ ALTER TABLE ONLY public.nexpose_consoles ALTER COLUMN id SET DEFAULT nextval('public.nexpose_consoles_id_seq'::regclass);
2278
+
2279
+
2280
+ --
2281
+ -- Name: notes id; Type: DEFAULT; Schema: public; Owner: -
2282
+ --
2283
+
2284
+ ALTER TABLE ONLY public.notes ALTER COLUMN id SET DEFAULT nextval('public.notes_id_seq'::regclass);
2285
+
2286
+
2287
+ --
2288
+ -- Name: payloads id; Type: DEFAULT; Schema: public; Owner: -
2289
+ --
2290
+
2291
+ ALTER TABLE ONLY public.payloads ALTER COLUMN id SET DEFAULT nextval('public.payloads_id_seq'::regclass);
2292
+
2293
+
2294
+ --
2295
+ -- Name: profiles id; Type: DEFAULT; Schema: public; Owner: -
2296
+ --
2297
+
2298
+ ALTER TABLE ONLY public.profiles ALTER COLUMN id SET DEFAULT nextval('public.profiles_id_seq'::regclass);
2299
+
2300
+
2301
+ --
2302
+ -- Name: refs id; Type: DEFAULT; Schema: public; Owner: -
2303
+ --
2304
+
2305
+ ALTER TABLE ONLY public.refs ALTER COLUMN id SET DEFAULT nextval('public.refs_id_seq'::regclass);
2306
+
2307
+
2308
+ --
2309
+ -- Name: report_templates id; Type: DEFAULT; Schema: public; Owner: -
2310
+ --
2311
+
2312
+ ALTER TABLE ONLY public.report_templates ALTER COLUMN id SET DEFAULT nextval('public.report_templates_id_seq'::regclass);
2313
+
2314
+
2315
+ --
2316
+ -- Name: reports id; Type: DEFAULT; Schema: public; Owner: -
2317
+ --
2318
+
2319
+ ALTER TABLE ONLY public.reports ALTER COLUMN id SET DEFAULT nextval('public.reports_id_seq'::regclass);
2320
+
2321
+
2322
+ --
2323
+ -- Name: routes id; Type: DEFAULT; Schema: public; Owner: -
2324
+ --
2325
+
2326
+ ALTER TABLE ONLY public.routes ALTER COLUMN id SET DEFAULT nextval('public.routes_id_seq'::regclass);
2327
+
2328
+
2329
+ --
2330
+ -- Name: services id; Type: DEFAULT; Schema: public; Owner: -
2331
+ --
2332
+
2333
+ ALTER TABLE ONLY public.services ALTER COLUMN id SET DEFAULT nextval('public.services_id_seq'::regclass);
2334
+
2335
+
2336
+ --
2337
+ -- Name: session_events id; Type: DEFAULT; Schema: public; Owner: -
2338
+ --
2339
+
2340
+ ALTER TABLE ONLY public.session_events ALTER COLUMN id SET DEFAULT nextval('public.session_events_id_seq'::regclass);
2341
+
2342
+
2343
+ --
2344
+ -- Name: sessions id; Type: DEFAULT; Schema: public; Owner: -
2345
+ --
2346
+
2347
+ ALTER TABLE ONLY public.sessions ALTER COLUMN id SET DEFAULT nextval('public.sessions_id_seq'::regclass);
2348
+
2349
+
2350
+ --
2351
+ -- Name: tags id; Type: DEFAULT; Schema: public; Owner: -
2352
+ --
2353
+
2354
+ ALTER TABLE ONLY public.tags ALTER COLUMN id SET DEFAULT nextval('public.tags_id_seq'::regclass);
2355
+
2356
+
2357
+ --
2358
+ -- Name: task_creds id; Type: DEFAULT; Schema: public; Owner: -
2359
+ --
2360
+
2361
+ ALTER TABLE ONLY public.task_creds ALTER COLUMN id SET DEFAULT nextval('public.task_creds_id_seq'::regclass);
2362
+
2363
+
2364
+ --
2365
+ -- Name: task_hosts id; Type: DEFAULT; Schema: public; Owner: -
2366
+ --
2367
+
2368
+ ALTER TABLE ONLY public.task_hosts ALTER COLUMN id SET DEFAULT nextval('public.task_hosts_id_seq'::regclass);
2369
+
2370
+
2371
+ --
2372
+ -- Name: task_services id; Type: DEFAULT; Schema: public; Owner: -
2373
+ --
2374
+
2375
+ ALTER TABLE ONLY public.task_services ALTER COLUMN id SET DEFAULT nextval('public.task_services_id_seq'::regclass);
2376
+
2377
+
2378
+ --
2379
+ -- Name: task_sessions id; Type: DEFAULT; Schema: public; Owner: -
2380
+ --
2381
+
2382
+ ALTER TABLE ONLY public.task_sessions ALTER COLUMN id SET DEFAULT nextval('public.task_sessions_id_seq'::regclass);
2383
+
2384
+
2385
+ --
2386
+ -- Name: tasks id; Type: DEFAULT; Schema: public; Owner: -
2387
+ --
2388
+
2389
+ ALTER TABLE ONLY public.tasks ALTER COLUMN id SET DEFAULT nextval('public.tasks_id_seq'::regclass);
2390
+
2391
+
2392
+ --
2393
+ -- Name: users id; Type: DEFAULT; Schema: public; Owner: -
2394
+ --
2395
+
2396
+ ALTER TABLE ONLY public.users ALTER COLUMN id SET DEFAULT nextval('public.users_id_seq'::regclass);
2397
+
2398
+
2399
+ --
2400
+ -- Name: vuln_attempts id; Type: DEFAULT; Schema: public; Owner: -
2401
+ --
2402
+
2403
+ ALTER TABLE ONLY public.vuln_attempts ALTER COLUMN id SET DEFAULT nextval('public.vuln_attempts_id_seq'::regclass);
2404
+
2405
+
2406
+ --
2407
+ -- Name: vuln_details id; Type: DEFAULT; Schema: public; Owner: -
2408
+ --
2409
+
2410
+ ALTER TABLE ONLY public.vuln_details ALTER COLUMN id SET DEFAULT nextval('public.vuln_details_id_seq'::regclass);
2411
+
2412
+
2413
+ --
2414
+ -- Name: vulns id; Type: DEFAULT; Schema: public; Owner: -
2415
+ --
2416
+
2417
+ ALTER TABLE ONLY public.vulns ALTER COLUMN id SET DEFAULT nextval('public.vulns_id_seq'::regclass);
2418
+
2419
+
2420
+ --
2421
+ -- Name: vulns_refs id; Type: DEFAULT; Schema: public; Owner: -
2422
+ --
2423
+
2424
+ ALTER TABLE ONLY public.vulns_refs ALTER COLUMN id SET DEFAULT nextval('public.vulns_refs_id_seq'::regclass);
2425
+
2426
+
2427
+ --
2428
+ -- Name: web_forms id; Type: DEFAULT; Schema: public; Owner: -
2429
+ --
2430
+
2431
+ ALTER TABLE ONLY public.web_forms ALTER COLUMN id SET DEFAULT nextval('public.web_forms_id_seq'::regclass);
2432
+
2433
+
2434
+ --
2435
+ -- Name: web_pages id; Type: DEFAULT; Schema: public; Owner: -
2436
+ --
2437
+
2438
+ ALTER TABLE ONLY public.web_pages ALTER COLUMN id SET DEFAULT nextval('public.web_pages_id_seq'::regclass);
2439
+
2440
+
2441
+ --
2442
+ -- Name: web_sites id; Type: DEFAULT; Schema: public; Owner: -
2443
+ --
2444
+
2445
+ ALTER TABLE ONLY public.web_sites ALTER COLUMN id SET DEFAULT nextval('public.web_sites_id_seq'::regclass);
2446
+
2447
+
2448
+ --
2449
+ -- Name: web_vulns id; Type: DEFAULT; Schema: public; Owner: -
2450
+ --
2451
+
2452
+ ALTER TABLE ONLY public.web_vulns ALTER COLUMN id SET DEFAULT nextval('public.web_vulns_id_seq'::regclass);
2453
+
2454
+
2455
+ --
2456
+ -- Name: wmap_requests id; Type: DEFAULT; Schema: public; Owner: -
2457
+ --
2458
+
2459
+ ALTER TABLE ONLY public.wmap_requests ALTER COLUMN id SET DEFAULT nextval('public.wmap_requests_id_seq'::regclass);
2460
+
2461
+
2462
+ --
2463
+ -- Name: wmap_targets id; Type: DEFAULT; Schema: public; Owner: -
2464
+ --
2465
+
2466
+ ALTER TABLE ONLY public.wmap_targets ALTER COLUMN id SET DEFAULT nextval('public.wmap_targets_id_seq'::regclass);
2467
+
2468
+
2469
+ --
2470
+ -- Name: workspaces id; Type: DEFAULT; Schema: public; Owner: -
2471
+ --
2472
+
2473
+ ALTER TABLE ONLY public.workspaces ALTER COLUMN id SET DEFAULT nextval('public.workspaces_id_seq'::regclass);
2474
+
2475
+
2476
+ --
2477
+ -- Name: api_keys api_keys_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2478
+ --
2479
+
2480
+ ALTER TABLE ONLY public.api_keys
2481
+ ADD CONSTRAINT api_keys_pkey PRIMARY KEY (id);
2482
+
2483
+
2484
+ --
2485
+ -- Name: ar_internal_metadata ar_internal_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2486
+ --
2487
+
2488
+ ALTER TABLE ONLY public.ar_internal_metadata
2489
+ ADD CONSTRAINT ar_internal_metadata_pkey PRIMARY KEY (key);
2490
+
2491
+
2492
+ --
2493
+ -- Name: async_callbacks async_callbacks_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2494
+ --
2495
+
2496
+ ALTER TABLE ONLY public.async_callbacks
2497
+ ADD CONSTRAINT async_callbacks_pkey PRIMARY KEY (id);
2498
+
2499
+
2500
+ --
2501
+ -- Name: automatic_exploitation_match_results automatic_exploitation_match_results_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2502
+ --
2503
+
2504
+ ALTER TABLE ONLY public.automatic_exploitation_match_results
2505
+ ADD CONSTRAINT automatic_exploitation_match_results_pkey PRIMARY KEY (id);
2506
+
2507
+
2508
+ --
2509
+ -- Name: automatic_exploitation_match_sets automatic_exploitation_match_sets_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2510
+ --
2511
+
2512
+ ALTER TABLE ONLY public.automatic_exploitation_match_sets
2513
+ ADD CONSTRAINT automatic_exploitation_match_sets_pkey PRIMARY KEY (id);
2514
+
2515
+
2516
+ --
2517
+ -- Name: automatic_exploitation_matches automatic_exploitation_matches_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2518
+ --
2519
+
2520
+ ALTER TABLE ONLY public.automatic_exploitation_matches
2521
+ ADD CONSTRAINT automatic_exploitation_matches_pkey PRIMARY KEY (id);
2522
+
2523
+
2524
+ --
2525
+ -- Name: automatic_exploitation_runs automatic_exploitation_runs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2526
+ --
2527
+
2528
+ ALTER TABLE ONLY public.automatic_exploitation_runs
2529
+ ADD CONSTRAINT automatic_exploitation_runs_pkey PRIMARY KEY (id);
2530
+
2531
+
2532
+ --
2533
+ -- Name: clients clients_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2534
+ --
2535
+
2536
+ ALTER TABLE ONLY public.clients
2537
+ ADD CONSTRAINT clients_pkey PRIMARY KEY (id);
2538
+
2539
+
2540
+ --
2541
+ -- Name: creds creds_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2542
+ --
2543
+
2544
+ ALTER TABLE ONLY public.creds
2545
+ ADD CONSTRAINT creds_pkey PRIMARY KEY (id);
2546
+
2547
+
2548
+ --
2549
+ -- Name: events events_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2550
+ --
2551
+
2552
+ ALTER TABLE ONLY public.events
2553
+ ADD CONSTRAINT events_pkey PRIMARY KEY (id);
2554
+
2555
+
2556
+ --
2557
+ -- Name: exploit_attempts exploit_attempts_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2558
+ --
2559
+
2560
+ ALTER TABLE ONLY public.exploit_attempts
2561
+ ADD CONSTRAINT exploit_attempts_pkey PRIMARY KEY (id);
2562
+
2563
+
2564
+ --
2565
+ -- Name: exploited_hosts exploited_hosts_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2566
+ --
2567
+
2568
+ ALTER TABLE ONLY public.exploited_hosts
2569
+ ADD CONSTRAINT exploited_hosts_pkey PRIMARY KEY (id);
2570
+
2571
+
2572
+ --
2573
+ -- Name: host_details host_details_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2574
+ --
2575
+
2576
+ ALTER TABLE ONLY public.host_details
2577
+ ADD CONSTRAINT host_details_pkey PRIMARY KEY (id);
2578
+
2579
+
2580
+ --
2581
+ -- Name: hosts hosts_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2582
+ --
2583
+
2584
+ ALTER TABLE ONLY public.hosts
2585
+ ADD CONSTRAINT hosts_pkey PRIMARY KEY (id);
2586
+
2587
+
2588
+ --
2589
+ -- Name: hosts_tags hosts_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2590
+ --
2591
+
2592
+ ALTER TABLE ONLY public.hosts_tags
2593
+ ADD CONSTRAINT hosts_tags_pkey PRIMARY KEY (id);
2594
+
2595
+
2596
+ --
2597
+ -- Name: listeners listeners_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2598
+ --
2599
+
2600
+ ALTER TABLE ONLY public.listeners
2601
+ ADD CONSTRAINT listeners_pkey PRIMARY KEY (id);
2602
+
2603
+
2604
+ --
2605
+ -- Name: loots loots_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2606
+ --
2607
+
2608
+ ALTER TABLE ONLY public.loots
2609
+ ADD CONSTRAINT loots_pkey PRIMARY KEY (id);
2610
+
2611
+
2612
+ --
2613
+ -- Name: macros macros_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2614
+ --
2615
+
2616
+ ALTER TABLE ONLY public.macros
2617
+ ADD CONSTRAINT macros_pkey PRIMARY KEY (id);
2618
+
2619
+
2620
+ --
2621
+ -- Name: mod_refs mod_refs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2622
+ --
2623
+
2624
+ ALTER TABLE ONLY public.mod_refs
2625
+ ADD CONSTRAINT mod_refs_pkey PRIMARY KEY (id);
2626
+
2627
+
2628
+ --
2629
+ -- Name: module_actions module_actions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2630
+ --
2631
+
2632
+ ALTER TABLE ONLY public.module_actions
2633
+ ADD CONSTRAINT module_actions_pkey PRIMARY KEY (id);
2634
+
2635
+
2636
+ --
2637
+ -- Name: module_archs module_archs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2638
+ --
2639
+
2640
+ ALTER TABLE ONLY public.module_archs
2641
+ ADD CONSTRAINT module_archs_pkey PRIMARY KEY (id);
2642
+
2643
+
2644
+ --
2645
+ -- Name: module_authors module_authors_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2646
+ --
2647
+
2648
+ ALTER TABLE ONLY public.module_authors
2649
+ ADD CONSTRAINT module_authors_pkey PRIMARY KEY (id);
2650
+
2651
+
2652
+ --
2653
+ -- Name: module_details module_details_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2654
+ --
2655
+
2656
+ ALTER TABLE ONLY public.module_details
2657
+ ADD CONSTRAINT module_details_pkey PRIMARY KEY (id);
2658
+
2659
+
2660
+ --
2661
+ -- Name: module_mixins module_mixins_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2662
+ --
2663
+
2664
+ ALTER TABLE ONLY public.module_mixins
2665
+ ADD CONSTRAINT module_mixins_pkey PRIMARY KEY (id);
2666
+
2667
+
2668
+ --
2669
+ -- Name: module_platforms module_platforms_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2670
+ --
2671
+
2672
+ ALTER TABLE ONLY public.module_platforms
2673
+ ADD CONSTRAINT module_platforms_pkey PRIMARY KEY (id);
2674
+
2675
+
2676
+ --
2677
+ -- Name: module_refs module_refs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2678
+ --
2679
+
2680
+ ALTER TABLE ONLY public.module_refs
2681
+ ADD CONSTRAINT module_refs_pkey PRIMARY KEY (id);
2682
+
2683
+
2684
+ --
2685
+ -- Name: module_runs module_runs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2686
+ --
2687
+
2688
+ ALTER TABLE ONLY public.module_runs
2689
+ ADD CONSTRAINT module_runs_pkey PRIMARY KEY (id);
2690
+
2691
+
2692
+ --
2693
+ -- Name: module_targets module_targets_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2694
+ --
2695
+
2696
+ ALTER TABLE ONLY public.module_targets
2697
+ ADD CONSTRAINT module_targets_pkey PRIMARY KEY (id);
2698
+
2699
+
2700
+ --
2701
+ -- Name: nexpose_consoles nexpose_consoles_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2702
+ --
2703
+
2704
+ ALTER TABLE ONLY public.nexpose_consoles
2705
+ ADD CONSTRAINT nexpose_consoles_pkey PRIMARY KEY (id);
2706
+
2707
+
2708
+ --
2709
+ -- Name: notes notes_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2710
+ --
2711
+
2712
+ ALTER TABLE ONLY public.notes
2713
+ ADD CONSTRAINT notes_pkey PRIMARY KEY (id);
2714
+
2715
+
2716
+ --
2717
+ -- Name: payloads payloads_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2718
+ --
2719
+
2720
+ ALTER TABLE ONLY public.payloads
2721
+ ADD CONSTRAINT payloads_pkey PRIMARY KEY (id);
2722
+
2723
+
2724
+ --
2725
+ -- Name: profiles profiles_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2726
+ --
2727
+
2728
+ ALTER TABLE ONLY public.profiles
2729
+ ADD CONSTRAINT profiles_pkey PRIMARY KEY (id);
2730
+
2731
+
2732
+ --
2733
+ -- Name: refs refs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2734
+ --
2735
+
2736
+ ALTER TABLE ONLY public.refs
2737
+ ADD CONSTRAINT refs_pkey PRIMARY KEY (id);
2738
+
2739
+
2740
+ --
2741
+ -- Name: report_templates report_templates_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2742
+ --
2743
+
2744
+ ALTER TABLE ONLY public.report_templates
2745
+ ADD CONSTRAINT report_templates_pkey PRIMARY KEY (id);
2746
+
2747
+
2748
+ --
2749
+ -- Name: reports reports_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2750
+ --
2751
+
2752
+ ALTER TABLE ONLY public.reports
2753
+ ADD CONSTRAINT reports_pkey PRIMARY KEY (id);
2754
+
2755
+
2756
+ --
2757
+ -- Name: routes routes_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2758
+ --
2759
+
2760
+ ALTER TABLE ONLY public.routes
2761
+ ADD CONSTRAINT routes_pkey PRIMARY KEY (id);
2762
+
2763
+
2764
+ --
2765
+ -- Name: schema_migrations schema_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2766
+ --
2767
+
2768
+ ALTER TABLE ONLY public.schema_migrations
2769
+ ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version);
2770
+
2771
+
2772
+ --
2773
+ -- Name: services services_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2774
+ --
2775
+
2776
+ ALTER TABLE ONLY public.services
2777
+ ADD CONSTRAINT services_pkey PRIMARY KEY (id);
2778
+
2779
+
2780
+ --
2781
+ -- Name: session_events session_events_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2782
+ --
2783
+
2784
+ ALTER TABLE ONLY public.session_events
2785
+ ADD CONSTRAINT session_events_pkey PRIMARY KEY (id);
2786
+
2787
+
2788
+ --
2789
+ -- Name: sessions sessions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2790
+ --
2791
+
2792
+ ALTER TABLE ONLY public.sessions
2793
+ ADD CONSTRAINT sessions_pkey PRIMARY KEY (id);
2794
+
2795
+
2796
+ --
2797
+ -- Name: tags tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2798
+ --
2799
+
2800
+ ALTER TABLE ONLY public.tags
2801
+ ADD CONSTRAINT tags_pkey PRIMARY KEY (id);
2802
+
2803
+
2804
+ --
2805
+ -- Name: task_creds task_creds_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2806
+ --
2807
+
2808
+ ALTER TABLE ONLY public.task_creds
2809
+ ADD CONSTRAINT task_creds_pkey PRIMARY KEY (id);
2810
+
2811
+
2812
+ --
2813
+ -- Name: task_hosts task_hosts_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2814
+ --
2815
+
2816
+ ALTER TABLE ONLY public.task_hosts
2817
+ ADD CONSTRAINT task_hosts_pkey PRIMARY KEY (id);
2818
+
2819
+
2820
+ --
2821
+ -- Name: task_services task_services_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2822
+ --
2823
+
2824
+ ALTER TABLE ONLY public.task_services
2825
+ ADD CONSTRAINT task_services_pkey PRIMARY KEY (id);
2826
+
2827
+
2828
+ --
2829
+ -- Name: task_sessions task_sessions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2830
+ --
2831
+
2832
+ ALTER TABLE ONLY public.task_sessions
2833
+ ADD CONSTRAINT task_sessions_pkey PRIMARY KEY (id);
2834
+
2835
+
2836
+ --
2837
+ -- Name: tasks tasks_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2838
+ --
2839
+
2840
+ ALTER TABLE ONLY public.tasks
2841
+ ADD CONSTRAINT tasks_pkey PRIMARY KEY (id);
2842
+
2843
+
2844
+ --
2845
+ -- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2846
+ --
2847
+
2848
+ ALTER TABLE ONLY public.users
2849
+ ADD CONSTRAINT users_pkey PRIMARY KEY (id);
2850
+
2851
+
2852
+ --
2853
+ -- Name: vuln_attempts vuln_attempts_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2854
+ --
2855
+
2856
+ ALTER TABLE ONLY public.vuln_attempts
2857
+ ADD CONSTRAINT vuln_attempts_pkey PRIMARY KEY (id);
2858
+
2859
+
2860
+ --
2861
+ -- Name: vuln_details vuln_details_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2862
+ --
2863
+
2864
+ ALTER TABLE ONLY public.vuln_details
2865
+ ADD CONSTRAINT vuln_details_pkey PRIMARY KEY (id);
2866
+
2867
+
2868
+ --
2869
+ -- Name: vulns vulns_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2870
+ --
2871
+
2872
+ ALTER TABLE ONLY public.vulns
2873
+ ADD CONSTRAINT vulns_pkey PRIMARY KEY (id);
2874
+
2875
+
2876
+ --
2877
+ -- Name: vulns_refs vulns_refs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2878
+ --
2879
+
2880
+ ALTER TABLE ONLY public.vulns_refs
2881
+ ADD CONSTRAINT vulns_refs_pkey PRIMARY KEY (id);
2882
+
2883
+
2884
+ --
2885
+ -- Name: web_forms web_forms_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2886
+ --
2887
+
2888
+ ALTER TABLE ONLY public.web_forms
2889
+ ADD CONSTRAINT web_forms_pkey PRIMARY KEY (id);
2890
+
2891
+
2892
+ --
2893
+ -- Name: web_pages web_pages_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2894
+ --
2895
+
2896
+ ALTER TABLE ONLY public.web_pages
2897
+ ADD CONSTRAINT web_pages_pkey PRIMARY KEY (id);
2898
+
2899
+
2900
+ --
2901
+ -- Name: web_sites web_sites_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2902
+ --
2903
+
2904
+ ALTER TABLE ONLY public.web_sites
2905
+ ADD CONSTRAINT web_sites_pkey PRIMARY KEY (id);
2906
+
2907
+
2908
+ --
2909
+ -- Name: web_vulns web_vulns_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2910
+ --
2911
+
2912
+ ALTER TABLE ONLY public.web_vulns
2913
+ ADD CONSTRAINT web_vulns_pkey PRIMARY KEY (id);
2914
+
2915
+
2916
+ --
2917
+ -- Name: wmap_requests wmap_requests_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2918
+ --
2919
+
2920
+ ALTER TABLE ONLY public.wmap_requests
2921
+ ADD CONSTRAINT wmap_requests_pkey PRIMARY KEY (id);
2922
+
2923
+
2924
+ --
2925
+ -- Name: wmap_targets wmap_targets_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2926
+ --
2927
+
2928
+ ALTER TABLE ONLY public.wmap_targets
2929
+ ADD CONSTRAINT wmap_targets_pkey PRIMARY KEY (id);
2930
+
2931
+
2932
+ --
2933
+ -- Name: workspaces workspaces_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2934
+ --
2935
+
2936
+ ALTER TABLE ONLY public.workspaces
2937
+ ADD CONSTRAINT workspaces_pkey PRIMARY KEY (id);
2938
+
2939
+
2940
+ --
2941
+ -- Name: index_automatic_exploitation_match_results_on_match_id; Type: INDEX; Schema: public; Owner: -
2942
+ --
2943
+
2944
+ CREATE INDEX index_automatic_exploitation_match_results_on_match_id ON public.automatic_exploitation_match_results USING btree (match_id);
2945
+
2946
+
2947
+ --
2948
+ -- Name: index_automatic_exploitation_match_results_on_run_id; Type: INDEX; Schema: public; Owner: -
2949
+ --
2950
+
2951
+ CREATE INDEX index_automatic_exploitation_match_results_on_run_id ON public.automatic_exploitation_match_results USING btree (run_id);
2952
+
2953
+
2954
+ --
2955
+ -- Name: index_automatic_exploitation_match_sets_on_user_id; Type: INDEX; Schema: public; Owner: -
2956
+ --
2957
+
2958
+ CREATE INDEX index_automatic_exploitation_match_sets_on_user_id ON public.automatic_exploitation_match_sets USING btree (user_id);
2959
+
2960
+
2961
+ --
2962
+ -- Name: index_automatic_exploitation_match_sets_on_workspace_id; Type: INDEX; Schema: public; Owner: -
2963
+ --
2964
+
2965
+ CREATE INDEX index_automatic_exploitation_match_sets_on_workspace_id ON public.automatic_exploitation_match_sets USING btree (workspace_id);
2966
+
2967
+
2968
+ --
2969
+ -- Name: index_automatic_exploitation_matches_on_module_detail_id; Type: INDEX; Schema: public; Owner: -
2970
+ --
2971
+
2972
+ CREATE INDEX index_automatic_exploitation_matches_on_module_detail_id ON public.automatic_exploitation_matches USING btree (module_detail_id);
2973
+
2974
+
2975
+ --
2976
+ -- Name: index_automatic_exploitation_matches_on_module_fullname; Type: INDEX; Schema: public; Owner: -
2977
+ --
2978
+
2979
+ CREATE INDEX index_automatic_exploitation_matches_on_module_fullname ON public.automatic_exploitation_matches USING btree (module_fullname);
2980
+
2981
+
2982
+ --
2983
+ -- Name: index_automatic_exploitation_runs_on_match_set_id; Type: INDEX; Schema: public; Owner: -
2984
+ --
2985
+
2986
+ CREATE INDEX index_automatic_exploitation_runs_on_match_set_id ON public.automatic_exploitation_runs USING btree (match_set_id);
2987
+
2988
+
2989
+ --
2990
+ -- Name: index_automatic_exploitation_runs_on_user_id; Type: INDEX; Schema: public; Owner: -
2991
+ --
2992
+
2993
+ CREATE INDEX index_automatic_exploitation_runs_on_user_id ON public.automatic_exploitation_runs USING btree (user_id);
2994
+
2995
+
2996
+ --
2997
+ -- Name: index_automatic_exploitation_runs_on_workspace_id; Type: INDEX; Schema: public; Owner: -
2998
+ --
2999
+
3000
+ CREATE INDEX index_automatic_exploitation_runs_on_workspace_id ON public.automatic_exploitation_runs USING btree (workspace_id);
3001
+
3002
+
3003
+ --
3004
+ -- Name: index_hosts_on_name; Type: INDEX; Schema: public; Owner: -
3005
+ --
3006
+
3007
+ CREATE INDEX index_hosts_on_name ON public.hosts USING btree (name);
3008
+
3009
+
3010
+ --
3011
+ -- Name: index_hosts_on_os_flavor; Type: INDEX; Schema: public; Owner: -
3012
+ --
3013
+
3014
+ CREATE INDEX index_hosts_on_os_flavor ON public.hosts USING btree (os_flavor);
3015
+
3016
+
3017
+ --
3018
+ -- Name: index_hosts_on_os_name; Type: INDEX; Schema: public; Owner: -
3019
+ --
3020
+
3021
+ CREATE INDEX index_hosts_on_os_name ON public.hosts USING btree (os_name);
3022
+
3023
+
3024
+ --
3025
+ -- Name: index_hosts_on_purpose; Type: INDEX; Schema: public; Owner: -
3026
+ --
3027
+
3028
+ CREATE INDEX index_hosts_on_purpose ON public.hosts USING btree (purpose);
3029
+
3030
+
3031
+ --
3032
+ -- Name: index_hosts_on_state; Type: INDEX; Schema: public; Owner: -
3033
+ --
3034
+
3035
+ CREATE INDEX index_hosts_on_state ON public.hosts USING btree (state);
3036
+
3037
+
3038
+ --
3039
+ -- Name: index_hosts_on_workspace_id_and_address; Type: INDEX; Schema: public; Owner: -
3040
+ --
3041
+
3042
+ CREATE UNIQUE INDEX index_hosts_on_workspace_id_and_address ON public.hosts USING btree (workspace_id, address);
3043
+
3044
+
3045
+ --
3046
+ -- Name: index_loots_on_module_run_id; Type: INDEX; Schema: public; Owner: -
3047
+ --
3048
+
3049
+ CREATE INDEX index_loots_on_module_run_id ON public.loots USING btree (module_run_id);
3050
+
3051
+
3052
+ --
3053
+ -- Name: index_module_actions_on_detail_id; Type: INDEX; Schema: public; Owner: -
3054
+ --
3055
+
3056
+ CREATE INDEX index_module_actions_on_detail_id ON public.module_actions USING btree (detail_id);
3057
+
3058
+
3059
+ --
3060
+ -- Name: index_module_archs_on_detail_id; Type: INDEX; Schema: public; Owner: -
3061
+ --
3062
+
3063
+ CREATE INDEX index_module_archs_on_detail_id ON public.module_archs USING btree (detail_id);
3064
+
3065
+
3066
+ --
3067
+ -- Name: index_module_authors_on_detail_id; Type: INDEX; Schema: public; Owner: -
3068
+ --
3069
+
3070
+ CREATE INDEX index_module_authors_on_detail_id ON public.module_authors USING btree (detail_id);
3071
+
3072
+
3073
+ --
3074
+ -- Name: index_module_details_on_description; Type: INDEX; Schema: public; Owner: -
3075
+ --
3076
+
3077
+ CREATE INDEX index_module_details_on_description ON public.module_details USING btree (description);
3078
+
3079
+
3080
+ --
3081
+ -- Name: index_module_details_on_mtype; Type: INDEX; Schema: public; Owner: -
3082
+ --
3083
+
3084
+ CREATE INDEX index_module_details_on_mtype ON public.module_details USING btree (mtype);
3085
+
3086
+
3087
+ --
3088
+ -- Name: index_module_details_on_name; Type: INDEX; Schema: public; Owner: -
3089
+ --
3090
+
3091
+ CREATE INDEX index_module_details_on_name ON public.module_details USING btree (name);
3092
+
3093
+
3094
+ --
3095
+ -- Name: index_module_details_on_refname; Type: INDEX; Schema: public; Owner: -
3096
+ --
3097
+
3098
+ CREATE INDEX index_module_details_on_refname ON public.module_details USING btree (refname);
3099
+
3100
+
3101
+ --
3102
+ -- Name: index_module_mixins_on_detail_id; Type: INDEX; Schema: public; Owner: -
3103
+ --
3104
+
3105
+ CREATE INDEX index_module_mixins_on_detail_id ON public.module_mixins USING btree (detail_id);
3106
+
3107
+
3108
+ --
3109
+ -- Name: index_module_platforms_on_detail_id; Type: INDEX; Schema: public; Owner: -
3110
+ --
3111
+
3112
+ CREATE INDEX index_module_platforms_on_detail_id ON public.module_platforms USING btree (detail_id);
3113
+
3114
+
3115
+ --
3116
+ -- Name: index_module_refs_on_detail_id; Type: INDEX; Schema: public; Owner: -
3117
+ --
3118
+
3119
+ CREATE INDEX index_module_refs_on_detail_id ON public.module_refs USING btree (detail_id);
3120
+
3121
+
3122
+ --
3123
+ -- Name: index_module_refs_on_name; Type: INDEX; Schema: public; Owner: -
3124
+ --
3125
+
3126
+ CREATE INDEX index_module_refs_on_name ON public.module_refs USING btree (name);
3127
+
3128
+
3129
+ --
3130
+ -- Name: index_module_runs_on_session_id; Type: INDEX; Schema: public; Owner: -
3131
+ --
3132
+
3133
+ CREATE INDEX index_module_runs_on_session_id ON public.module_runs USING btree (session_id);
3134
+
3135
+
3136
+ --
3137
+ -- Name: index_module_runs_on_user_id; Type: INDEX; Schema: public; Owner: -
3138
+ --
3139
+
3140
+ CREATE INDEX index_module_runs_on_user_id ON public.module_runs USING btree (user_id);
3141
+
3142
+
3143
+ --
3144
+ -- Name: index_module_targets_on_detail_id; Type: INDEX; Schema: public; Owner: -
3145
+ --
3146
+
3147
+ CREATE INDEX index_module_targets_on_detail_id ON public.module_targets USING btree (detail_id);
3148
+
3149
+
3150
+ --
3151
+ -- Name: index_notes_on_ntype; Type: INDEX; Schema: public; Owner: -
3152
+ --
3153
+
3154
+ CREATE INDEX index_notes_on_ntype ON public.notes USING btree (ntype);
3155
+
3156
+
3157
+ --
3158
+ -- Name: index_notes_on_vuln_id; Type: INDEX; Schema: public; Owner: -
3159
+ --
3160
+
3161
+ CREATE INDEX index_notes_on_vuln_id ON public.notes USING btree (vuln_id);
3162
+
3163
+
3164
+ --
3165
+ -- Name: index_refs_on_name; Type: INDEX; Schema: public; Owner: -
3166
+ --
3167
+
3168
+ CREATE INDEX index_refs_on_name ON public.refs USING btree (name);
3169
+
3170
+
3171
+ --
3172
+ -- Name: index_services_on_host_id_and_port_and_proto; Type: INDEX; Schema: public; Owner: -
3173
+ --
3174
+
3175
+ CREATE UNIQUE INDEX index_services_on_host_id_and_port_and_proto ON public.services USING btree (host_id, port, proto);
3176
+
3177
+
3178
+ --
3179
+ -- Name: index_services_on_name; Type: INDEX; Schema: public; Owner: -
3180
+ --
3181
+
3182
+ CREATE INDEX index_services_on_name ON public.services USING btree (name);
3183
+
3184
+
3185
+ --
3186
+ -- Name: index_services_on_port; Type: INDEX; Schema: public; Owner: -
3187
+ --
3188
+
3189
+ CREATE INDEX index_services_on_port ON public.services USING btree (port);
3190
+
3191
+
3192
+ --
3193
+ -- Name: index_services_on_proto; Type: INDEX; Schema: public; Owner: -
3194
+ --
3195
+
3196
+ CREATE INDEX index_services_on_proto ON public.services USING btree (proto);
3197
+
3198
+
3199
+ --
3200
+ -- Name: index_services_on_state; Type: INDEX; Schema: public; Owner: -
3201
+ --
3202
+
3203
+ CREATE INDEX index_services_on_state ON public.services USING btree (state);
3204
+
3205
+
3206
+ --
3207
+ -- Name: index_sessions_on_module_run_id; Type: INDEX; Schema: public; Owner: -
3208
+ --
3209
+
3210
+ CREATE INDEX index_sessions_on_module_run_id ON public.sessions USING btree (module_run_id);
3211
+
3212
+
3213
+ --
3214
+ -- Name: index_vulns_on_name; Type: INDEX; Schema: public; Owner: -
3215
+ --
3216
+
3217
+ CREATE INDEX index_vulns_on_name ON public.vulns USING btree (name);
3218
+
3219
+
3220
+ --
3221
+ -- Name: index_vulns_on_origin_id; Type: INDEX; Schema: public; Owner: -
3222
+ --
3223
+
3224
+ CREATE INDEX index_vulns_on_origin_id ON public.vulns USING btree (origin_id);
3225
+
3226
+
3227
+ --
3228
+ -- Name: index_web_forms_on_path; Type: INDEX; Schema: public; Owner: -
3229
+ --
3230
+
3231
+ CREATE INDEX index_web_forms_on_path ON public.web_forms USING btree (path);
3232
+
3233
+
3234
+ --
3235
+ -- Name: index_web_pages_on_path; Type: INDEX; Schema: public; Owner: -
3236
+ --
3237
+
3238
+ CREATE INDEX index_web_pages_on_path ON public.web_pages USING btree (path);
3239
+
3240
+
3241
+ --
3242
+ -- Name: index_web_pages_on_query; Type: INDEX; Schema: public; Owner: -
3243
+ --
3244
+
3245
+ CREATE INDEX index_web_pages_on_query ON public.web_pages USING btree (query);
3246
+
3247
+
3248
+ --
3249
+ -- Name: index_web_sites_on_comments; Type: INDEX; Schema: public; Owner: -
3250
+ --
3251
+
3252
+ CREATE INDEX index_web_sites_on_comments ON public.web_sites USING btree (comments);
3253
+
3254
+
3255
+ --
3256
+ -- Name: index_web_sites_on_options; Type: INDEX; Schema: public; Owner: -
3257
+ --
3258
+
3259
+ CREATE INDEX index_web_sites_on_options ON public.web_sites USING btree (options);
3260
+
3261
+
3262
+ --
3263
+ -- Name: index_web_sites_on_vhost; Type: INDEX; Schema: public; Owner: -
3264
+ --
3265
+
3266
+ CREATE INDEX index_web_sites_on_vhost ON public.web_sites USING btree (vhost);
3267
+
3268
+
3269
+ --
3270
+ -- Name: index_web_vulns_on_method; Type: INDEX; Schema: public; Owner: -
3271
+ --
3272
+
3273
+ CREATE INDEX index_web_vulns_on_method ON public.web_vulns USING btree (method);
3274
+
3275
+
3276
+ --
3277
+ -- Name: index_web_vulns_on_name; Type: INDEX; Schema: public; Owner: -
3278
+ --
3279
+
3280
+ CREATE INDEX index_web_vulns_on_name ON public.web_vulns USING btree (name);
3281
+
3282
+
3283
+ --
3284
+ -- Name: index_web_vulns_on_path; Type: INDEX; Schema: public; Owner: -
3285
+ --
3286
+
3287
+ CREATE INDEX index_web_vulns_on_path ON public.web_vulns USING btree (path);
3288
+
3289
+
3290
+ --
3291
+ -- PostgreSQL database dump complete
3292
+ --
3293
+
3294
+ SET search_path TO "$user", public;
3295
+
3296
+ INSERT INTO "schema_migrations" (version) VALUES
3297
+ ('0'),
3298
+ ('1'),
3299
+ ('10'),
3300
+ ('11'),
3301
+ ('12'),
3302
+ ('13'),
3303
+ ('14'),
3304
+ ('15'),
3305
+ ('16'),
3306
+ ('17'),
3307
+ ('18'),
3308
+ ('19'),
3309
+ ('2'),
3310
+ ('20'),
3311
+ ('20100819123300'),
3312
+ ('20100824151500'),
3313
+ ('20100908001428'),
3314
+ ('20100911122000'),
3315
+ ('20100916151530'),
3316
+ ('20100916175000'),
3317
+ ('20100920012100'),
3318
+ ('20100926214000'),
3319
+ ('20101001000000'),
3320
+ ('20101002000000'),
3321
+ ('20101007000000'),
3322
+ ('20101008111800'),
3323
+ ('20101009023300'),
3324
+ ('20101104135100'),
3325
+ ('20101203000000'),
3326
+ ('20101203000001'),
3327
+ ('20101206212033'),
3328
+ ('20110112154300'),
3329
+ ('20110204112800'),
3330
+ ('20110317144932'),
3331
+ ('20110414180600'),
3332
+ ('20110415175705'),
3333
+ ('20110422000000'),
3334
+ ('20110425095900'),
3335
+ ('20110513143900'),
3336
+ ('20110517160800'),
3337
+ ('20110527000000'),
3338
+ ('20110527000001'),
3339
+ ('20110606000001'),
3340
+ ('20110622000000'),
3341
+ ('20110624000001'),
3342
+ ('20110625000001'),
3343
+ ('20110630000001'),
3344
+ ('20110630000002'),
3345
+ ('20110717000001'),
3346
+ ('20110727163801'),
3347
+ ('20110730000001'),
3348
+ ('20110812000001'),
3349
+ ('20110922000000'),
3350
+ ('20110928101300'),
3351
+ ('20111011110000'),
3352
+ ('20111203000000'),
3353
+ ('20111204000000'),
3354
+ ('20111210000000'),
3355
+ ('20120126110000'),
3356
+ ('20120411173220'),
3357
+ ('20120601152442'),
3358
+ ('20120625000000'),
3359
+ ('20120625000001'),
3360
+ ('20120625000002'),
3361
+ ('20120625000003'),
3362
+ ('20120625000004'),
3363
+ ('20120625000005'),
3364
+ ('20120625000006'),
3365
+ ('20120625000007'),
3366
+ ('20120625000008'),
3367
+ ('20120718202805'),
3368
+ ('20130228214900'),
3369
+ ('20130412154159'),
3370
+ ('20130412171844'),
3371
+ ('20130412173121'),
3372
+ ('20130412173640'),
3373
+ ('20130412174254'),
3374
+ ('20130412174719'),
3375
+ ('20130412175040'),
3376
+ ('20130423211152'),
3377
+ ('20130430151353'),
3378
+ ('20130430162145'),
3379
+ ('20130510021637'),
3380
+ ('20130515164311'),
3381
+ ('20130515172727'),
3382
+ ('20130516204810'),
3383
+ ('20130522001343'),
3384
+ ('20130522032517'),
3385
+ ('20130522041110'),
3386
+ ('20130525015035'),
3387
+ ('20130525212420'),
3388
+ ('20130531144949'),
3389
+ ('20130604145732'),
3390
+ ('20130717150737'),
3391
+ ('20131002004641'),
3392
+ ('20131002164449'),
3393
+ ('20131008213344'),
3394
+ ('20131011184338'),
3395
+ ('20131017150735'),
3396
+ ('20131021185657'),
3397
+ ('20140905031549'),
3398
+ ('20150112203945'),
3399
+ ('20150205192745'),
3400
+ ('20150209195939'),
3401
+ ('20150212214222'),
3402
+ ('20150219173821'),
3403
+ ('20150219215039'),
3404
+ ('20150226151459'),
3405
+ ('20150312155312'),
3406
+ ('20150317145455'),
3407
+ ('20150326183742'),
3408
+ ('20150421211719'),
3409
+ ('20150514182921'),
3410
+ ('20160415153312'),
3411
+ ('20161004165612'),
3412
+ ('20161227212223'),
3413
+ ('20180904120211'),
3414
+ ('20190308134512'),
3415
+ ('20190507120211'),
3416
+ ('21'),
3417
+ ('22'),
3418
+ ('23'),
3419
+ ('24'),
3420
+ ('25'),
3421
+ ('26'),
3422
+ ('3'),
3423
+ ('4'),
3424
+ ('5'),
3425
+ ('6'),
3426
+ ('7'),
3427
+ ('8'),
3428
+ ('9');
3429
+
3430
+