metasploit_data_models 0.18.1 → 0.19.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +8 -8
  2. data/app/models/mdm/host.rb +7 -0
  3. data/app/models/mdm/service.rb +30 -1
  4. data/app/models/mdm/tag.rb +10 -0
  5. data/app/models/metasploit_data_models/ip_address/v4/cidr.rb +14 -0
  6. data/app/models/metasploit_data_models/ip_address/v4/nmap.rb +14 -0
  7. data/app/models/metasploit_data_models/ip_address/v4/range.rb +12 -0
  8. data/app/models/metasploit_data_models/ip_address/v4/segment/nmap/list.rb +126 -0
  9. data/app/models/metasploit_data_models/ip_address/v4/segment/nmap/range.rb +12 -0
  10. data/app/models/metasploit_data_models/ip_address/v4/segment/single.rb +123 -0
  11. data/app/models/metasploit_data_models/ip_address/v4/segmented.rb +200 -0
  12. data/app/models/metasploit_data_models/ip_address/v4/single.rb +53 -0
  13. data/app/models/metasploit_data_models/search/operation/ip_address.rb +60 -0
  14. data/app/models/metasploit_data_models/search/operator/ip_address.rb +33 -0
  15. data/app/models/metasploit_data_models/search/visitor/attribute.rb +1 -0
  16. data/app/models/metasploit_data_models/search/visitor/includes.rb +1 -0
  17. data/app/models/metasploit_data_models/search/visitor/joins.rb +1 -0
  18. data/app/models/metasploit_data_models/search/visitor/where.rb +51 -0
  19. data/config/locales/en.yml +35 -4
  20. data/lib/metasploit_data_models/ip_address.rb +5 -0
  21. data/lib/metasploit_data_models/ip_address/cidr.rb +174 -0
  22. data/lib/metasploit_data_models/ip_address/range.rb +181 -0
  23. data/lib/metasploit_data_models/match/child.rb +48 -0
  24. data/lib/metasploit_data_models/match/parent.rb +103 -0
  25. data/lib/metasploit_data_models/version.rb +4 -4
  26. data/metasploit_data_models.gemspec +2 -1
  27. data/spec/app/models/mdm/cred_spec.rb +164 -31
  28. data/spec/app/models/mdm/service_spec.rb +33 -44
  29. data/spec/app/models/metasploit_data_models/ip_address/v4/cidr_spec.rb +121 -0
  30. data/spec/app/models/metasploit_data_models/ip_address/v4/nmap_spec.rb +151 -0
  31. data/spec/app/models/metasploit_data_models/ip_address/v4/range_spec.rb +300 -0
  32. data/spec/app/models/metasploit_data_models/ip_address/v4/segment/nmap/list_spec.rb +278 -0
  33. data/spec/app/models/metasploit_data_models/ip_address/v4/segment/nmap/range_spec.rb +304 -0
  34. data/spec/app/models/metasploit_data_models/ip_address/v4/segment/segmented_spec.rb +29 -0
  35. data/spec/app/models/metasploit_data_models/ip_address/v4/segment/single_spec.rb +315 -0
  36. data/spec/app/models/metasploit_data_models/ip_address/v4/single_spec.rb +183 -0
  37. data/spec/app/models/metasploit_data_models/search/operation/ip_address_spec.rb +182 -0
  38. data/spec/app/models/metasploit_data_models/search/operator/ip_address_spec.rb +19 -0
  39. data/spec/app/models/metasploit_data_models/search/visitor/relation_spec.rb +229 -36
  40. data/spec/dummy/config/application.rb +1 -1
  41. data/spec/dummy/db/structure.sql +3011 -0
  42. data/spec/factories/mdm/services.rb +3 -1
  43. data/spec/lib/metasploit_data_models/ip_address/cidr_spec.rb +350 -0
  44. data/spec/lib/metasploit_data_models/ip_address/range_spec.rb +77 -0
  45. data/spec/lib/metasploit_data_models/match/child_spec.rb +61 -0
  46. data/spec/lib/metasploit_data_models/match/parent_spec.rb +155 -0
  47. data/spec/support/matchers/match_regex_exactly.rb +28 -0
  48. data/spec/support/shared/contexts/rex/text.rb +15 -0
  49. data/spec/support/shared/examples/metasploit_data_models/search/operation/ipaddress/match.rb +109 -0
  50. metadata +58 -9
  51. data/spec/dummy/db/schema.rb +0 -609
@@ -43,7 +43,7 @@ module Dummy
43
43
  # Use SQL instead of Active Record's schema dumper when creating the database.
44
44
  # This is necessary if your schema can't be completely dumped by the schema dumper,
45
45
  # like if you have constraints or database-specific column types
46
- # config.active_record.schema_format = :sql
46
+ config.active_record.schema_format = :sql
47
47
 
48
48
  # Enforce whitelist mode for mass assignment.
49
49
  # This will create an empty whitelist of attributes available for mass-assignment for all models
@@ -0,0 +1,3011 @@
1
+ --
2
+ -- PostgreSQL database dump
3
+ --
4
+
5
+ SET statement_timeout = 0;
6
+ SET lock_timeout = 0;
7
+ SET client_encoding = 'UTF8';
8
+ SET standard_conforming_strings = on;
9
+ SET check_function_bodies = false;
10
+ SET client_min_messages = warning;
11
+
12
+ --
13
+ -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -
14
+ --
15
+
16
+ CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
17
+
18
+
19
+ --
20
+ -- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: -
21
+ --
22
+
23
+ COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
24
+
25
+
26
+ SET search_path = public, pg_catalog;
27
+
28
+ SET default_tablespace = '';
29
+
30
+ SET default_with_oids = false;
31
+
32
+ --
33
+ -- Name: api_keys; Type: TABLE; Schema: public; Owner: -; Tablespace:
34
+ --
35
+
36
+ CREATE TABLE api_keys (
37
+ id integer NOT NULL,
38
+ token text,
39
+ created_at timestamp without time zone NOT NULL,
40
+ updated_at timestamp without time zone NOT NULL
41
+ );
42
+
43
+
44
+ --
45
+ -- Name: api_keys_id_seq; Type: SEQUENCE; Schema: public; Owner: -
46
+ --
47
+
48
+ CREATE SEQUENCE api_keys_id_seq
49
+ START WITH 1
50
+ INCREMENT BY 1
51
+ NO MINVALUE
52
+ NO MAXVALUE
53
+ CACHE 1;
54
+
55
+
56
+ --
57
+ -- Name: api_keys_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
58
+ --
59
+
60
+ ALTER SEQUENCE api_keys_id_seq OWNED BY api_keys.id;
61
+
62
+
63
+ --
64
+ -- Name: clients; Type: TABLE; Schema: public; Owner: -; Tablespace:
65
+ --
66
+
67
+ CREATE TABLE clients (
68
+ id integer NOT NULL,
69
+ host_id integer,
70
+ created_at timestamp without time zone,
71
+ ua_string character varying(1024) NOT NULL,
72
+ ua_name character varying(64),
73
+ ua_ver character varying(32),
74
+ updated_at timestamp without time zone
75
+ );
76
+
77
+
78
+ --
79
+ -- Name: clients_id_seq; Type: SEQUENCE; Schema: public; Owner: -
80
+ --
81
+
82
+ CREATE SEQUENCE clients_id_seq
83
+ START WITH 1
84
+ INCREMENT BY 1
85
+ NO MINVALUE
86
+ NO MAXVALUE
87
+ CACHE 1;
88
+
89
+
90
+ --
91
+ -- Name: clients_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
92
+ --
93
+
94
+ ALTER SEQUENCE clients_id_seq OWNED BY clients.id;
95
+
96
+
97
+ --
98
+ -- Name: creds; Type: TABLE; Schema: public; Owner: -; Tablespace:
99
+ --
100
+
101
+ CREATE TABLE creds (
102
+ id integer NOT NULL,
103
+ service_id integer NOT NULL,
104
+ created_at timestamp without time zone NOT NULL,
105
+ updated_at timestamp without time zone NOT NULL,
106
+ "user" character varying(2048),
107
+ pass character varying(4096),
108
+ active boolean DEFAULT true,
109
+ proof character varying(4096),
110
+ ptype character varying(256),
111
+ source_id integer,
112
+ source_type character varying(255)
113
+ );
114
+
115
+
116
+ --
117
+ -- Name: creds_id_seq; Type: SEQUENCE; Schema: public; Owner: -
118
+ --
119
+
120
+ CREATE SEQUENCE creds_id_seq
121
+ START WITH 1
122
+ INCREMENT BY 1
123
+ NO MINVALUE
124
+ NO MAXVALUE
125
+ CACHE 1;
126
+
127
+
128
+ --
129
+ -- Name: creds_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
130
+ --
131
+
132
+ ALTER SEQUENCE creds_id_seq OWNED BY creds.id;
133
+
134
+
135
+ --
136
+ -- Name: events; Type: TABLE; Schema: public; Owner: -; Tablespace:
137
+ --
138
+
139
+ CREATE TABLE events (
140
+ id integer NOT NULL,
141
+ workspace_id integer,
142
+ host_id integer,
143
+ created_at timestamp without time zone,
144
+ name character varying(255),
145
+ updated_at timestamp without time zone,
146
+ critical boolean,
147
+ seen boolean,
148
+ username character varying(255),
149
+ info text
150
+ );
151
+
152
+
153
+ --
154
+ -- Name: events_id_seq; Type: SEQUENCE; Schema: public; Owner: -
155
+ --
156
+
157
+ CREATE SEQUENCE events_id_seq
158
+ START WITH 1
159
+ INCREMENT BY 1
160
+ NO MINVALUE
161
+ NO MAXVALUE
162
+ CACHE 1;
163
+
164
+
165
+ --
166
+ -- Name: events_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
167
+ --
168
+
169
+ ALTER SEQUENCE events_id_seq OWNED BY events.id;
170
+
171
+
172
+ --
173
+ -- Name: exploit_attempts; Type: TABLE; Schema: public; Owner: -; Tablespace:
174
+ --
175
+
176
+ CREATE TABLE exploit_attempts (
177
+ id integer NOT NULL,
178
+ host_id integer,
179
+ service_id integer,
180
+ vuln_id integer,
181
+ attempted_at timestamp without time zone,
182
+ exploited boolean,
183
+ fail_reason character varying(255),
184
+ username character varying(255),
185
+ module text,
186
+ session_id integer,
187
+ loot_id integer,
188
+ port integer,
189
+ proto character varying(255),
190
+ fail_detail text
191
+ );
192
+
193
+
194
+ --
195
+ -- Name: exploit_attempts_id_seq; Type: SEQUENCE; Schema: public; Owner: -
196
+ --
197
+
198
+ CREATE SEQUENCE exploit_attempts_id_seq
199
+ START WITH 1
200
+ INCREMENT BY 1
201
+ NO MINVALUE
202
+ NO MAXVALUE
203
+ CACHE 1;
204
+
205
+
206
+ --
207
+ -- Name: exploit_attempts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
208
+ --
209
+
210
+ ALTER SEQUENCE exploit_attempts_id_seq OWNED BY exploit_attempts.id;
211
+
212
+
213
+ --
214
+ -- Name: exploited_hosts; Type: TABLE; Schema: public; Owner: -; Tablespace:
215
+ --
216
+
217
+ CREATE TABLE exploited_hosts (
218
+ id integer NOT NULL,
219
+ host_id integer NOT NULL,
220
+ service_id integer,
221
+ session_uuid character varying(8),
222
+ name character varying(2048),
223
+ payload character varying(2048),
224
+ created_at timestamp without time zone NOT NULL,
225
+ updated_at timestamp without time zone NOT NULL
226
+ );
227
+
228
+
229
+ --
230
+ -- Name: exploited_hosts_id_seq; Type: SEQUENCE; Schema: public; Owner: -
231
+ --
232
+
233
+ CREATE SEQUENCE exploited_hosts_id_seq
234
+ START WITH 1
235
+ INCREMENT BY 1
236
+ NO MINVALUE
237
+ NO MAXVALUE
238
+ CACHE 1;
239
+
240
+
241
+ --
242
+ -- Name: exploited_hosts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
243
+ --
244
+
245
+ ALTER SEQUENCE exploited_hosts_id_seq OWNED BY exploited_hosts.id;
246
+
247
+
248
+ --
249
+ -- Name: host_details; Type: TABLE; Schema: public; Owner: -; Tablespace:
250
+ --
251
+
252
+ CREATE TABLE host_details (
253
+ id integer NOT NULL,
254
+ host_id integer,
255
+ nx_console_id integer,
256
+ nx_device_id integer,
257
+ src character varying(255),
258
+ nx_site_name character varying(255),
259
+ nx_site_importance character varying(255),
260
+ nx_scan_template character varying(255),
261
+ nx_risk_score double precision
262
+ );
263
+
264
+
265
+ --
266
+ -- Name: host_details_id_seq; Type: SEQUENCE; Schema: public; Owner: -
267
+ --
268
+
269
+ CREATE SEQUENCE host_details_id_seq
270
+ START WITH 1
271
+ INCREMENT BY 1
272
+ NO MINVALUE
273
+ NO MAXVALUE
274
+ CACHE 1;
275
+
276
+
277
+ --
278
+ -- Name: host_details_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
279
+ --
280
+
281
+ ALTER SEQUENCE host_details_id_seq OWNED BY host_details.id;
282
+
283
+
284
+ --
285
+ -- Name: hosts; Type: TABLE; Schema: public; Owner: -; Tablespace:
286
+ --
287
+
288
+ CREATE TABLE hosts (
289
+ id integer NOT NULL,
290
+ created_at timestamp without time zone,
291
+ address inet NOT NULL,
292
+ mac character varying(255),
293
+ comm character varying(255),
294
+ name character varying(255),
295
+ state character varying(255),
296
+ os_name character varying(255),
297
+ os_flavor character varying(255),
298
+ os_sp character varying(255),
299
+ os_lang character varying(255),
300
+ arch character varying(255),
301
+ workspace_id integer NOT NULL,
302
+ updated_at timestamp without time zone,
303
+ purpose text,
304
+ info character varying(65536),
305
+ comments text,
306
+ scope text,
307
+ virtual_host text,
308
+ note_count integer DEFAULT 0,
309
+ vuln_count integer DEFAULT 0,
310
+ service_count integer DEFAULT 0,
311
+ host_detail_count integer DEFAULT 0,
312
+ exploit_attempt_count integer DEFAULT 0,
313
+ cred_count integer DEFAULT 0
314
+ );
315
+
316
+
317
+ --
318
+ -- Name: hosts_id_seq; Type: SEQUENCE; Schema: public; Owner: -
319
+ --
320
+
321
+ CREATE SEQUENCE hosts_id_seq
322
+ START WITH 1
323
+ INCREMENT BY 1
324
+ NO MINVALUE
325
+ NO MAXVALUE
326
+ CACHE 1;
327
+
328
+
329
+ --
330
+ -- Name: hosts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
331
+ --
332
+
333
+ ALTER SEQUENCE hosts_id_seq OWNED BY hosts.id;
334
+
335
+
336
+ --
337
+ -- Name: hosts_tags; Type: TABLE; Schema: public; Owner: -; Tablespace:
338
+ --
339
+
340
+ CREATE TABLE hosts_tags (
341
+ host_id integer,
342
+ tag_id integer,
343
+ id integer NOT NULL
344
+ );
345
+
346
+
347
+ --
348
+ -- Name: hosts_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: -
349
+ --
350
+
351
+ CREATE SEQUENCE hosts_tags_id_seq
352
+ START WITH 1
353
+ INCREMENT BY 1
354
+ NO MINVALUE
355
+ NO MAXVALUE
356
+ CACHE 1;
357
+
358
+
359
+ --
360
+ -- Name: hosts_tags_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
361
+ --
362
+
363
+ ALTER SEQUENCE hosts_tags_id_seq OWNED BY hosts_tags.id;
364
+
365
+
366
+ --
367
+ -- Name: listeners; Type: TABLE; Schema: public; Owner: -; Tablespace:
368
+ --
369
+
370
+ CREATE TABLE listeners (
371
+ id integer NOT NULL,
372
+ created_at timestamp without time zone NOT NULL,
373
+ updated_at timestamp without time zone NOT NULL,
374
+ workspace_id integer DEFAULT 1 NOT NULL,
375
+ task_id integer,
376
+ enabled boolean DEFAULT true,
377
+ owner text,
378
+ payload text,
379
+ address text,
380
+ port integer,
381
+ options bytea,
382
+ macro text
383
+ );
384
+
385
+
386
+ --
387
+ -- Name: listeners_id_seq; Type: SEQUENCE; Schema: public; Owner: -
388
+ --
389
+
390
+ CREATE SEQUENCE listeners_id_seq
391
+ START WITH 1
392
+ INCREMENT BY 1
393
+ NO MINVALUE
394
+ NO MAXVALUE
395
+ CACHE 1;
396
+
397
+
398
+ --
399
+ -- Name: listeners_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
400
+ --
401
+
402
+ ALTER SEQUENCE listeners_id_seq OWNED BY listeners.id;
403
+
404
+
405
+ --
406
+ -- Name: loots; Type: TABLE; Schema: public; Owner: -; Tablespace:
407
+ --
408
+
409
+ CREATE TABLE loots (
410
+ id integer NOT NULL,
411
+ workspace_id integer DEFAULT 1 NOT NULL,
412
+ host_id integer,
413
+ service_id integer,
414
+ ltype character varying(512),
415
+ path character varying(1024),
416
+ data text,
417
+ created_at timestamp without time zone NOT NULL,
418
+ updated_at timestamp without time zone NOT NULL,
419
+ content_type character varying(255),
420
+ name text,
421
+ info text
422
+ );
423
+
424
+
425
+ --
426
+ -- Name: loots_id_seq; Type: SEQUENCE; Schema: public; Owner: -
427
+ --
428
+
429
+ CREATE SEQUENCE loots_id_seq
430
+ START WITH 1
431
+ INCREMENT BY 1
432
+ NO MINVALUE
433
+ NO MAXVALUE
434
+ CACHE 1;
435
+
436
+
437
+ --
438
+ -- Name: loots_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
439
+ --
440
+
441
+ ALTER SEQUENCE loots_id_seq OWNED BY loots.id;
442
+
443
+
444
+ --
445
+ -- Name: macros; Type: TABLE; Schema: public; Owner: -; Tablespace:
446
+ --
447
+
448
+ CREATE TABLE macros (
449
+ id integer NOT NULL,
450
+ created_at timestamp without time zone NOT NULL,
451
+ updated_at timestamp without time zone NOT NULL,
452
+ owner text,
453
+ name text,
454
+ description text,
455
+ actions bytea,
456
+ prefs bytea
457
+ );
458
+
459
+
460
+ --
461
+ -- Name: macros_id_seq; Type: SEQUENCE; Schema: public; Owner: -
462
+ --
463
+
464
+ CREATE SEQUENCE macros_id_seq
465
+ START WITH 1
466
+ INCREMENT BY 1
467
+ NO MINVALUE
468
+ NO MAXVALUE
469
+ CACHE 1;
470
+
471
+
472
+ --
473
+ -- Name: macros_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
474
+ --
475
+
476
+ ALTER SEQUENCE macros_id_seq OWNED BY macros.id;
477
+
478
+
479
+ --
480
+ -- Name: mod_refs; Type: TABLE; Schema: public; Owner: -; Tablespace:
481
+ --
482
+
483
+ CREATE TABLE mod_refs (
484
+ id integer NOT NULL,
485
+ module character varying(1024),
486
+ mtype character varying(128),
487
+ ref text
488
+ );
489
+
490
+
491
+ --
492
+ -- Name: mod_refs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
493
+ --
494
+
495
+ CREATE SEQUENCE mod_refs_id_seq
496
+ START WITH 1
497
+ INCREMENT BY 1
498
+ NO MINVALUE
499
+ NO MAXVALUE
500
+ CACHE 1;
501
+
502
+
503
+ --
504
+ -- Name: mod_refs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
505
+ --
506
+
507
+ ALTER SEQUENCE mod_refs_id_seq OWNED BY mod_refs.id;
508
+
509
+
510
+ --
511
+ -- Name: module_actions; Type: TABLE; Schema: public; Owner: -; Tablespace:
512
+ --
513
+
514
+ CREATE TABLE module_actions (
515
+ id integer NOT NULL,
516
+ detail_id integer,
517
+ name text
518
+ );
519
+
520
+
521
+ --
522
+ -- Name: module_actions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
523
+ --
524
+
525
+ CREATE SEQUENCE module_actions_id_seq
526
+ START WITH 1
527
+ INCREMENT BY 1
528
+ NO MINVALUE
529
+ NO MAXVALUE
530
+ CACHE 1;
531
+
532
+
533
+ --
534
+ -- Name: module_actions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
535
+ --
536
+
537
+ ALTER SEQUENCE module_actions_id_seq OWNED BY module_actions.id;
538
+
539
+
540
+ --
541
+ -- Name: module_archs; Type: TABLE; Schema: public; Owner: -; Tablespace:
542
+ --
543
+
544
+ CREATE TABLE module_archs (
545
+ id integer NOT NULL,
546
+ detail_id integer,
547
+ name text
548
+ );
549
+
550
+
551
+ --
552
+ -- Name: module_archs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
553
+ --
554
+
555
+ CREATE SEQUENCE module_archs_id_seq
556
+ START WITH 1
557
+ INCREMENT BY 1
558
+ NO MINVALUE
559
+ NO MAXVALUE
560
+ CACHE 1;
561
+
562
+
563
+ --
564
+ -- Name: module_archs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
565
+ --
566
+
567
+ ALTER SEQUENCE module_archs_id_seq OWNED BY module_archs.id;
568
+
569
+
570
+ --
571
+ -- Name: module_authors; Type: TABLE; Schema: public; Owner: -; Tablespace:
572
+ --
573
+
574
+ CREATE TABLE module_authors (
575
+ id integer NOT NULL,
576
+ detail_id integer,
577
+ name text,
578
+ email text
579
+ );
580
+
581
+
582
+ --
583
+ -- Name: module_authors_id_seq; Type: SEQUENCE; Schema: public; Owner: -
584
+ --
585
+
586
+ CREATE SEQUENCE module_authors_id_seq
587
+ START WITH 1
588
+ INCREMENT BY 1
589
+ NO MINVALUE
590
+ NO MAXVALUE
591
+ CACHE 1;
592
+
593
+
594
+ --
595
+ -- Name: module_authors_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
596
+ --
597
+
598
+ ALTER SEQUENCE module_authors_id_seq OWNED BY module_authors.id;
599
+
600
+
601
+ --
602
+ -- Name: module_details; Type: TABLE; Schema: public; Owner: -; Tablespace:
603
+ --
604
+
605
+ CREATE TABLE module_details (
606
+ id integer NOT NULL,
607
+ mtime timestamp without time zone,
608
+ file text,
609
+ mtype character varying(255),
610
+ refname text,
611
+ fullname text,
612
+ name text,
613
+ rank integer,
614
+ description text,
615
+ license character varying(255),
616
+ privileged boolean,
617
+ disclosure_date timestamp without time zone,
618
+ default_target integer,
619
+ default_action text,
620
+ stance character varying(255),
621
+ ready boolean
622
+ );
623
+
624
+
625
+ --
626
+ -- Name: module_details_id_seq; Type: SEQUENCE; Schema: public; Owner: -
627
+ --
628
+
629
+ CREATE SEQUENCE module_details_id_seq
630
+ START WITH 1
631
+ INCREMENT BY 1
632
+ NO MINVALUE
633
+ NO MAXVALUE
634
+ CACHE 1;
635
+
636
+
637
+ --
638
+ -- Name: module_details_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
639
+ --
640
+
641
+ ALTER SEQUENCE module_details_id_seq OWNED BY module_details.id;
642
+
643
+
644
+ --
645
+ -- Name: module_mixins; Type: TABLE; Schema: public; Owner: -; Tablespace:
646
+ --
647
+
648
+ CREATE TABLE module_mixins (
649
+ id integer NOT NULL,
650
+ detail_id integer,
651
+ name text
652
+ );
653
+
654
+
655
+ --
656
+ -- Name: module_mixins_id_seq; Type: SEQUENCE; Schema: public; Owner: -
657
+ --
658
+
659
+ CREATE SEQUENCE module_mixins_id_seq
660
+ START WITH 1
661
+ INCREMENT BY 1
662
+ NO MINVALUE
663
+ NO MAXVALUE
664
+ CACHE 1;
665
+
666
+
667
+ --
668
+ -- Name: module_mixins_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
669
+ --
670
+
671
+ ALTER SEQUENCE module_mixins_id_seq OWNED BY module_mixins.id;
672
+
673
+
674
+ --
675
+ -- Name: module_platforms; Type: TABLE; Schema: public; Owner: -; Tablespace:
676
+ --
677
+
678
+ CREATE TABLE module_platforms (
679
+ id integer NOT NULL,
680
+ detail_id integer,
681
+ name text
682
+ );
683
+
684
+
685
+ --
686
+ -- Name: module_platforms_id_seq; Type: SEQUENCE; Schema: public; Owner: -
687
+ --
688
+
689
+ CREATE SEQUENCE module_platforms_id_seq
690
+ START WITH 1
691
+ INCREMENT BY 1
692
+ NO MINVALUE
693
+ NO MAXVALUE
694
+ CACHE 1;
695
+
696
+
697
+ --
698
+ -- Name: module_platforms_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
699
+ --
700
+
701
+ ALTER SEQUENCE module_platforms_id_seq OWNED BY module_platforms.id;
702
+
703
+
704
+ --
705
+ -- Name: module_refs; Type: TABLE; Schema: public; Owner: -; Tablespace:
706
+ --
707
+
708
+ CREATE TABLE module_refs (
709
+ id integer NOT NULL,
710
+ detail_id integer,
711
+ name text
712
+ );
713
+
714
+
715
+ --
716
+ -- Name: module_refs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
717
+ --
718
+
719
+ CREATE SEQUENCE module_refs_id_seq
720
+ START WITH 1
721
+ INCREMENT BY 1
722
+ NO MINVALUE
723
+ NO MAXVALUE
724
+ CACHE 1;
725
+
726
+
727
+ --
728
+ -- Name: module_refs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
729
+ --
730
+
731
+ ALTER SEQUENCE module_refs_id_seq OWNED BY module_refs.id;
732
+
733
+
734
+ --
735
+ -- Name: module_targets; Type: TABLE; Schema: public; Owner: -; Tablespace:
736
+ --
737
+
738
+ CREATE TABLE module_targets (
739
+ id integer NOT NULL,
740
+ detail_id integer,
741
+ index integer,
742
+ name text
743
+ );
744
+
745
+
746
+ --
747
+ -- Name: module_targets_id_seq; Type: SEQUENCE; Schema: public; Owner: -
748
+ --
749
+
750
+ CREATE SEQUENCE module_targets_id_seq
751
+ START WITH 1
752
+ INCREMENT BY 1
753
+ NO MINVALUE
754
+ NO MAXVALUE
755
+ CACHE 1;
756
+
757
+
758
+ --
759
+ -- Name: module_targets_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
760
+ --
761
+
762
+ ALTER SEQUENCE module_targets_id_seq OWNED BY module_targets.id;
763
+
764
+
765
+ --
766
+ -- Name: nexpose_consoles; Type: TABLE; Schema: public; Owner: -; Tablespace:
767
+ --
768
+
769
+ CREATE TABLE nexpose_consoles (
770
+ id integer NOT NULL,
771
+ created_at timestamp without time zone NOT NULL,
772
+ updated_at timestamp without time zone NOT NULL,
773
+ enabled boolean DEFAULT true,
774
+ owner text,
775
+ address text,
776
+ port integer DEFAULT 3780,
777
+ username text,
778
+ password text,
779
+ status text,
780
+ version text,
781
+ cert text,
782
+ cached_sites bytea,
783
+ name text
784
+ );
785
+
786
+
787
+ --
788
+ -- Name: nexpose_consoles_id_seq; Type: SEQUENCE; Schema: public; Owner: -
789
+ --
790
+
791
+ CREATE SEQUENCE nexpose_consoles_id_seq
792
+ START WITH 1
793
+ INCREMENT BY 1
794
+ NO MINVALUE
795
+ NO MAXVALUE
796
+ CACHE 1;
797
+
798
+
799
+ --
800
+ -- Name: nexpose_consoles_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
801
+ --
802
+
803
+ ALTER SEQUENCE nexpose_consoles_id_seq OWNED BY nexpose_consoles.id;
804
+
805
+
806
+ --
807
+ -- Name: notes; Type: TABLE; Schema: public; Owner: -; Tablespace:
808
+ --
809
+
810
+ CREATE TABLE notes (
811
+ id integer NOT NULL,
812
+ created_at timestamp without time zone,
813
+ ntype character varying(512),
814
+ workspace_id integer DEFAULT 1 NOT NULL,
815
+ service_id integer,
816
+ host_id integer,
817
+ updated_at timestamp without time zone,
818
+ critical boolean,
819
+ seen boolean,
820
+ data text
821
+ );
822
+
823
+
824
+ --
825
+ -- Name: notes_id_seq; Type: SEQUENCE; Schema: public; Owner: -
826
+ --
827
+
828
+ CREATE SEQUENCE notes_id_seq
829
+ START WITH 1
830
+ INCREMENT BY 1
831
+ NO MINVALUE
832
+ NO MAXVALUE
833
+ CACHE 1;
834
+
835
+
836
+ --
837
+ -- Name: notes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
838
+ --
839
+
840
+ ALTER SEQUENCE notes_id_seq OWNED BY notes.id;
841
+
842
+
843
+ --
844
+ -- Name: profiles; Type: TABLE; Schema: public; Owner: -; Tablespace:
845
+ --
846
+
847
+ CREATE TABLE profiles (
848
+ id integer NOT NULL,
849
+ created_at timestamp without time zone NOT NULL,
850
+ updated_at timestamp without time zone NOT NULL,
851
+ active boolean DEFAULT true,
852
+ name text,
853
+ owner text,
854
+ settings bytea
855
+ );
856
+
857
+
858
+ --
859
+ -- Name: profiles_id_seq; Type: SEQUENCE; Schema: public; Owner: -
860
+ --
861
+
862
+ CREATE SEQUENCE profiles_id_seq
863
+ START WITH 1
864
+ INCREMENT BY 1
865
+ NO MINVALUE
866
+ NO MAXVALUE
867
+ CACHE 1;
868
+
869
+
870
+ --
871
+ -- Name: profiles_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
872
+ --
873
+
874
+ ALTER SEQUENCE profiles_id_seq OWNED BY profiles.id;
875
+
876
+
877
+ --
878
+ -- Name: refs; Type: TABLE; Schema: public; Owner: -; Tablespace:
879
+ --
880
+
881
+ CREATE TABLE refs (
882
+ id integer NOT NULL,
883
+ ref_id integer,
884
+ created_at timestamp without time zone,
885
+ name character varying(512),
886
+ updated_at timestamp without time zone
887
+ );
888
+
889
+
890
+ --
891
+ -- Name: refs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
892
+ --
893
+
894
+ CREATE SEQUENCE refs_id_seq
895
+ START WITH 1
896
+ INCREMENT BY 1
897
+ NO MINVALUE
898
+ NO MAXVALUE
899
+ CACHE 1;
900
+
901
+
902
+ --
903
+ -- Name: refs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
904
+ --
905
+
906
+ ALTER SEQUENCE refs_id_seq OWNED BY refs.id;
907
+
908
+
909
+ --
910
+ -- Name: report_templates; Type: TABLE; Schema: public; Owner: -; Tablespace:
911
+ --
912
+
913
+ CREATE TABLE report_templates (
914
+ id integer NOT NULL,
915
+ workspace_id integer DEFAULT 1 NOT NULL,
916
+ created_by character varying(255),
917
+ path character varying(1024),
918
+ name text,
919
+ created_at timestamp without time zone NOT NULL,
920
+ updated_at timestamp without time zone NOT NULL
921
+ );
922
+
923
+
924
+ --
925
+ -- Name: report_templates_id_seq; Type: SEQUENCE; Schema: public; Owner: -
926
+ --
927
+
928
+ CREATE SEQUENCE report_templates_id_seq
929
+ START WITH 1
930
+ INCREMENT BY 1
931
+ NO MINVALUE
932
+ NO MAXVALUE
933
+ CACHE 1;
934
+
935
+
936
+ --
937
+ -- Name: report_templates_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
938
+ --
939
+
940
+ ALTER SEQUENCE report_templates_id_seq OWNED BY report_templates.id;
941
+
942
+
943
+ --
944
+ -- Name: reports; Type: TABLE; Schema: public; Owner: -; Tablespace:
945
+ --
946
+
947
+ CREATE TABLE reports (
948
+ id integer NOT NULL,
949
+ workspace_id integer DEFAULT 1 NOT NULL,
950
+ created_by character varying(255),
951
+ rtype character varying(255),
952
+ path character varying(1024),
953
+ options text,
954
+ created_at timestamp without time zone NOT NULL,
955
+ updated_at timestamp without time zone NOT NULL,
956
+ downloaded_at timestamp without time zone,
957
+ task_id integer,
958
+ name character varying(63)
959
+ );
960
+
961
+
962
+ --
963
+ -- Name: reports_id_seq; Type: SEQUENCE; Schema: public; Owner: -
964
+ --
965
+
966
+ CREATE SEQUENCE reports_id_seq
967
+ START WITH 1
968
+ INCREMENT BY 1
969
+ NO MINVALUE
970
+ NO MAXVALUE
971
+ CACHE 1;
972
+
973
+
974
+ --
975
+ -- Name: reports_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
976
+ --
977
+
978
+ ALTER SEQUENCE reports_id_seq OWNED BY reports.id;
979
+
980
+
981
+ --
982
+ -- Name: routes; Type: TABLE; Schema: public; Owner: -; Tablespace:
983
+ --
984
+
985
+ CREATE TABLE routes (
986
+ id integer NOT NULL,
987
+ session_id integer,
988
+ subnet character varying(255),
989
+ netmask character varying(255)
990
+ );
991
+
992
+
993
+ --
994
+ -- Name: routes_id_seq; Type: SEQUENCE; Schema: public; Owner: -
995
+ --
996
+
997
+ CREATE SEQUENCE routes_id_seq
998
+ START WITH 1
999
+ INCREMENT BY 1
1000
+ NO MINVALUE
1001
+ NO MAXVALUE
1002
+ CACHE 1;
1003
+
1004
+
1005
+ --
1006
+ -- Name: routes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1007
+ --
1008
+
1009
+ ALTER SEQUENCE routes_id_seq OWNED BY routes.id;
1010
+
1011
+
1012
+ --
1013
+ -- Name: schema_migrations; Type: TABLE; Schema: public; Owner: -; Tablespace:
1014
+ --
1015
+
1016
+ CREATE TABLE schema_migrations (
1017
+ version character varying(255) NOT NULL
1018
+ );
1019
+
1020
+
1021
+ --
1022
+ -- Name: services; Type: TABLE; Schema: public; Owner: -; Tablespace:
1023
+ --
1024
+
1025
+ CREATE TABLE services (
1026
+ id integer NOT NULL,
1027
+ host_id integer,
1028
+ created_at timestamp without time zone,
1029
+ port integer NOT NULL,
1030
+ proto character varying(16) NOT NULL,
1031
+ state character varying(255),
1032
+ name character varying(255),
1033
+ updated_at timestamp without time zone,
1034
+ info text
1035
+ );
1036
+
1037
+
1038
+ --
1039
+ -- Name: services_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1040
+ --
1041
+
1042
+ CREATE SEQUENCE services_id_seq
1043
+ START WITH 1
1044
+ INCREMENT BY 1
1045
+ NO MINVALUE
1046
+ NO MAXVALUE
1047
+ CACHE 1;
1048
+
1049
+
1050
+ --
1051
+ -- Name: services_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1052
+ --
1053
+
1054
+ ALTER SEQUENCE services_id_seq OWNED BY services.id;
1055
+
1056
+
1057
+ --
1058
+ -- Name: session_events; Type: TABLE; Schema: public; Owner: -; Tablespace:
1059
+ --
1060
+
1061
+ CREATE TABLE session_events (
1062
+ id integer NOT NULL,
1063
+ session_id integer,
1064
+ etype character varying(255),
1065
+ command bytea,
1066
+ output bytea,
1067
+ remote_path character varying(255),
1068
+ local_path character varying(255),
1069
+ created_at timestamp without time zone
1070
+ );
1071
+
1072
+
1073
+ --
1074
+ -- Name: session_events_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1075
+ --
1076
+
1077
+ CREATE SEQUENCE session_events_id_seq
1078
+ START WITH 1
1079
+ INCREMENT BY 1
1080
+ NO MINVALUE
1081
+ NO MAXVALUE
1082
+ CACHE 1;
1083
+
1084
+
1085
+ --
1086
+ -- Name: session_events_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1087
+ --
1088
+
1089
+ ALTER SEQUENCE session_events_id_seq OWNED BY session_events.id;
1090
+
1091
+
1092
+ --
1093
+ -- Name: sessions; Type: TABLE; Schema: public; Owner: -; Tablespace:
1094
+ --
1095
+
1096
+ CREATE TABLE sessions (
1097
+ id integer NOT NULL,
1098
+ host_id integer,
1099
+ stype character varying(255),
1100
+ via_exploit character varying(255),
1101
+ via_payload character varying(255),
1102
+ "desc" character varying(255),
1103
+ port integer,
1104
+ platform character varying(255),
1105
+ datastore text,
1106
+ opened_at timestamp without time zone NOT NULL,
1107
+ closed_at timestamp without time zone,
1108
+ close_reason character varying(255),
1109
+ local_id integer,
1110
+ last_seen timestamp without time zone
1111
+ );
1112
+
1113
+
1114
+ --
1115
+ -- Name: sessions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1116
+ --
1117
+
1118
+ CREATE SEQUENCE sessions_id_seq
1119
+ START WITH 1
1120
+ INCREMENT BY 1
1121
+ NO MINVALUE
1122
+ NO MAXVALUE
1123
+ CACHE 1;
1124
+
1125
+
1126
+ --
1127
+ -- Name: sessions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1128
+ --
1129
+
1130
+ ALTER SEQUENCE sessions_id_seq OWNED BY sessions.id;
1131
+
1132
+
1133
+ --
1134
+ -- Name: tags; Type: TABLE; Schema: public; Owner: -; Tablespace:
1135
+ --
1136
+
1137
+ CREATE TABLE tags (
1138
+ id integer NOT NULL,
1139
+ user_id integer,
1140
+ name character varying(1024),
1141
+ "desc" text,
1142
+ report_summary boolean DEFAULT false NOT NULL,
1143
+ report_detail boolean DEFAULT false NOT NULL,
1144
+ critical boolean DEFAULT false NOT NULL,
1145
+ created_at timestamp without time zone NOT NULL,
1146
+ updated_at timestamp without time zone NOT NULL
1147
+ );
1148
+
1149
+
1150
+ --
1151
+ -- Name: tags_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1152
+ --
1153
+
1154
+ CREATE SEQUENCE tags_id_seq
1155
+ START WITH 1
1156
+ INCREMENT BY 1
1157
+ NO MINVALUE
1158
+ NO MAXVALUE
1159
+ CACHE 1;
1160
+
1161
+
1162
+ --
1163
+ -- Name: tags_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1164
+ --
1165
+
1166
+ ALTER SEQUENCE tags_id_seq OWNED BY tags.id;
1167
+
1168
+
1169
+ --
1170
+ -- Name: task_creds; Type: TABLE; Schema: public; Owner: -; Tablespace:
1171
+ --
1172
+
1173
+ CREATE TABLE task_creds (
1174
+ id integer NOT NULL,
1175
+ task_id integer NOT NULL,
1176
+ cred_id integer NOT NULL,
1177
+ created_at timestamp without time zone NOT NULL,
1178
+ updated_at timestamp without time zone NOT NULL
1179
+ );
1180
+
1181
+
1182
+ --
1183
+ -- Name: task_creds_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1184
+ --
1185
+
1186
+ CREATE SEQUENCE task_creds_id_seq
1187
+ START WITH 1
1188
+ INCREMENT BY 1
1189
+ NO MINVALUE
1190
+ NO MAXVALUE
1191
+ CACHE 1;
1192
+
1193
+
1194
+ --
1195
+ -- Name: task_creds_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1196
+ --
1197
+
1198
+ ALTER SEQUENCE task_creds_id_seq OWNED BY task_creds.id;
1199
+
1200
+
1201
+ --
1202
+ -- Name: task_hosts; Type: TABLE; Schema: public; Owner: -; Tablespace:
1203
+ --
1204
+
1205
+ CREATE TABLE task_hosts (
1206
+ id integer NOT NULL,
1207
+ task_id integer NOT NULL,
1208
+ host_id integer NOT NULL,
1209
+ created_at timestamp without time zone NOT NULL,
1210
+ updated_at timestamp without time zone NOT NULL
1211
+ );
1212
+
1213
+
1214
+ --
1215
+ -- Name: task_hosts_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1216
+ --
1217
+
1218
+ CREATE SEQUENCE task_hosts_id_seq
1219
+ START WITH 1
1220
+ INCREMENT BY 1
1221
+ NO MINVALUE
1222
+ NO MAXVALUE
1223
+ CACHE 1;
1224
+
1225
+
1226
+ --
1227
+ -- Name: task_hosts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1228
+ --
1229
+
1230
+ ALTER SEQUENCE task_hosts_id_seq OWNED BY task_hosts.id;
1231
+
1232
+
1233
+ --
1234
+ -- Name: task_services; Type: TABLE; Schema: public; Owner: -; Tablespace:
1235
+ --
1236
+
1237
+ CREATE TABLE task_services (
1238
+ id integer NOT NULL,
1239
+ task_id integer NOT NULL,
1240
+ service_id integer NOT NULL,
1241
+ created_at timestamp without time zone NOT NULL,
1242
+ updated_at timestamp without time zone NOT NULL
1243
+ );
1244
+
1245
+
1246
+ --
1247
+ -- Name: task_services_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1248
+ --
1249
+
1250
+ CREATE SEQUENCE task_services_id_seq
1251
+ START WITH 1
1252
+ INCREMENT BY 1
1253
+ NO MINVALUE
1254
+ NO MAXVALUE
1255
+ CACHE 1;
1256
+
1257
+
1258
+ --
1259
+ -- Name: task_services_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1260
+ --
1261
+
1262
+ ALTER SEQUENCE task_services_id_seq OWNED BY task_services.id;
1263
+
1264
+
1265
+ --
1266
+ -- Name: task_sessions; Type: TABLE; Schema: public; Owner: -; Tablespace:
1267
+ --
1268
+
1269
+ CREATE TABLE task_sessions (
1270
+ id integer NOT NULL,
1271
+ task_id integer NOT NULL,
1272
+ session_id integer NOT NULL,
1273
+ created_at timestamp without time zone NOT NULL,
1274
+ updated_at timestamp without time zone NOT NULL
1275
+ );
1276
+
1277
+
1278
+ --
1279
+ -- Name: task_sessions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1280
+ --
1281
+
1282
+ CREATE SEQUENCE task_sessions_id_seq
1283
+ START WITH 1
1284
+ INCREMENT BY 1
1285
+ NO MINVALUE
1286
+ NO MAXVALUE
1287
+ CACHE 1;
1288
+
1289
+
1290
+ --
1291
+ -- Name: task_sessions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1292
+ --
1293
+
1294
+ ALTER SEQUENCE task_sessions_id_seq OWNED BY task_sessions.id;
1295
+
1296
+
1297
+ --
1298
+ -- Name: tasks; Type: TABLE; Schema: public; Owner: -; Tablespace:
1299
+ --
1300
+
1301
+ CREATE TABLE tasks (
1302
+ id integer NOT NULL,
1303
+ workspace_id integer DEFAULT 1 NOT NULL,
1304
+ created_by character varying(255),
1305
+ module character varying(255),
1306
+ completed_at timestamp without time zone,
1307
+ path character varying(1024),
1308
+ info character varying(255),
1309
+ description character varying(255),
1310
+ progress integer,
1311
+ options text,
1312
+ error text,
1313
+ created_at timestamp without time zone NOT NULL,
1314
+ updated_at timestamp without time zone NOT NULL,
1315
+ result text,
1316
+ module_uuid character varying(8),
1317
+ settings bytea
1318
+ );
1319
+
1320
+
1321
+ --
1322
+ -- Name: tasks_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1323
+ --
1324
+
1325
+ CREATE SEQUENCE tasks_id_seq
1326
+ START WITH 1
1327
+ INCREMENT BY 1
1328
+ NO MINVALUE
1329
+ NO MAXVALUE
1330
+ CACHE 1;
1331
+
1332
+
1333
+ --
1334
+ -- Name: tasks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1335
+ --
1336
+
1337
+ ALTER SEQUENCE tasks_id_seq OWNED BY tasks.id;
1338
+
1339
+
1340
+ --
1341
+ -- Name: users; Type: TABLE; Schema: public; Owner: -; Tablespace:
1342
+ --
1343
+
1344
+ CREATE TABLE users (
1345
+ id integer NOT NULL,
1346
+ username character varying(255),
1347
+ crypted_password character varying(255),
1348
+ password_salt character varying(255),
1349
+ persistence_token character varying(255),
1350
+ created_at timestamp without time zone NOT NULL,
1351
+ updated_at timestamp without time zone NOT NULL,
1352
+ fullname character varying(255),
1353
+ email character varying(255),
1354
+ phone character varying(255),
1355
+ company character varying(255),
1356
+ prefs character varying(524288),
1357
+ admin boolean DEFAULT true NOT NULL
1358
+ );
1359
+
1360
+
1361
+ --
1362
+ -- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1363
+ --
1364
+
1365
+ CREATE SEQUENCE users_id_seq
1366
+ START WITH 1
1367
+ INCREMENT BY 1
1368
+ NO MINVALUE
1369
+ NO MAXVALUE
1370
+ CACHE 1;
1371
+
1372
+
1373
+ --
1374
+ -- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1375
+ --
1376
+
1377
+ ALTER SEQUENCE users_id_seq OWNED BY users.id;
1378
+
1379
+
1380
+ --
1381
+ -- Name: vuln_attempts; Type: TABLE; Schema: public; Owner: -; Tablespace:
1382
+ --
1383
+
1384
+ CREATE TABLE vuln_attempts (
1385
+ id integer NOT NULL,
1386
+ vuln_id integer,
1387
+ attempted_at timestamp without time zone,
1388
+ exploited boolean,
1389
+ fail_reason character varying(255),
1390
+ username character varying(255),
1391
+ module text,
1392
+ session_id integer,
1393
+ loot_id integer,
1394
+ fail_detail text
1395
+ );
1396
+
1397
+
1398
+ --
1399
+ -- Name: vuln_attempts_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1400
+ --
1401
+
1402
+ CREATE SEQUENCE vuln_attempts_id_seq
1403
+ START WITH 1
1404
+ INCREMENT BY 1
1405
+ NO MINVALUE
1406
+ NO MAXVALUE
1407
+ CACHE 1;
1408
+
1409
+
1410
+ --
1411
+ -- Name: vuln_attempts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1412
+ --
1413
+
1414
+ ALTER SEQUENCE vuln_attempts_id_seq OWNED BY vuln_attempts.id;
1415
+
1416
+
1417
+ --
1418
+ -- Name: vuln_details; Type: TABLE; Schema: public; Owner: -; Tablespace:
1419
+ --
1420
+
1421
+ CREATE TABLE vuln_details (
1422
+ id integer NOT NULL,
1423
+ vuln_id integer,
1424
+ cvss_score double precision,
1425
+ cvss_vector character varying(255),
1426
+ title character varying(255),
1427
+ description text,
1428
+ solution text,
1429
+ proof bytea,
1430
+ nx_console_id integer,
1431
+ nx_device_id integer,
1432
+ nx_vuln_id character varying(255),
1433
+ nx_severity double precision,
1434
+ nx_pci_severity double precision,
1435
+ nx_published timestamp without time zone,
1436
+ nx_added timestamp without time zone,
1437
+ nx_modified timestamp without time zone,
1438
+ nx_tags text,
1439
+ nx_vuln_status text,
1440
+ nx_proof_key text,
1441
+ src character varying(255),
1442
+ nx_scan_id integer,
1443
+ nx_vulnerable_since timestamp without time zone,
1444
+ nx_pci_compliance_status character varying(255)
1445
+ );
1446
+
1447
+
1448
+ --
1449
+ -- Name: vuln_details_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1450
+ --
1451
+
1452
+ CREATE SEQUENCE vuln_details_id_seq
1453
+ START WITH 1
1454
+ INCREMENT BY 1
1455
+ NO MINVALUE
1456
+ NO MAXVALUE
1457
+ CACHE 1;
1458
+
1459
+
1460
+ --
1461
+ -- Name: vuln_details_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1462
+ --
1463
+
1464
+ ALTER SEQUENCE vuln_details_id_seq OWNED BY vuln_details.id;
1465
+
1466
+
1467
+ --
1468
+ -- Name: vulns; Type: TABLE; Schema: public; Owner: -; Tablespace:
1469
+ --
1470
+
1471
+ CREATE TABLE vulns (
1472
+ id integer NOT NULL,
1473
+ host_id integer,
1474
+ service_id integer,
1475
+ created_at timestamp without time zone,
1476
+ name character varying(255),
1477
+ updated_at timestamp without time zone,
1478
+ info character varying(65536),
1479
+ exploited_at timestamp without time zone,
1480
+ vuln_detail_count integer DEFAULT 0,
1481
+ vuln_attempt_count integer DEFAULT 0
1482
+ );
1483
+
1484
+
1485
+ --
1486
+ -- Name: vulns_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1487
+ --
1488
+
1489
+ CREATE SEQUENCE vulns_id_seq
1490
+ START WITH 1
1491
+ INCREMENT BY 1
1492
+ NO MINVALUE
1493
+ NO MAXVALUE
1494
+ CACHE 1;
1495
+
1496
+
1497
+ --
1498
+ -- Name: vulns_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1499
+ --
1500
+
1501
+ ALTER SEQUENCE vulns_id_seq OWNED BY vulns.id;
1502
+
1503
+
1504
+ --
1505
+ -- Name: vulns_refs; Type: TABLE; Schema: public; Owner: -; Tablespace:
1506
+ --
1507
+
1508
+ CREATE TABLE vulns_refs (
1509
+ ref_id integer,
1510
+ vuln_id integer,
1511
+ id integer NOT NULL
1512
+ );
1513
+
1514
+
1515
+ --
1516
+ -- Name: vulns_refs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1517
+ --
1518
+
1519
+ CREATE SEQUENCE vulns_refs_id_seq
1520
+ START WITH 1
1521
+ INCREMENT BY 1
1522
+ NO MINVALUE
1523
+ NO MAXVALUE
1524
+ CACHE 1;
1525
+
1526
+
1527
+ --
1528
+ -- Name: vulns_refs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1529
+ --
1530
+
1531
+ ALTER SEQUENCE vulns_refs_id_seq OWNED BY vulns_refs.id;
1532
+
1533
+
1534
+ --
1535
+ -- Name: web_forms; Type: TABLE; Schema: public; Owner: -; Tablespace:
1536
+ --
1537
+
1538
+ CREATE TABLE web_forms (
1539
+ id integer NOT NULL,
1540
+ web_site_id integer NOT NULL,
1541
+ created_at timestamp without time zone NOT NULL,
1542
+ updated_at timestamp without time zone NOT NULL,
1543
+ path text,
1544
+ method character varying(1024),
1545
+ params text,
1546
+ query text
1547
+ );
1548
+
1549
+
1550
+ --
1551
+ -- Name: web_forms_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1552
+ --
1553
+
1554
+ CREATE SEQUENCE web_forms_id_seq
1555
+ START WITH 1
1556
+ INCREMENT BY 1
1557
+ NO MINVALUE
1558
+ NO MAXVALUE
1559
+ CACHE 1;
1560
+
1561
+
1562
+ --
1563
+ -- Name: web_forms_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1564
+ --
1565
+
1566
+ ALTER SEQUENCE web_forms_id_seq OWNED BY web_forms.id;
1567
+
1568
+
1569
+ --
1570
+ -- Name: web_pages; Type: TABLE; Schema: public; Owner: -; Tablespace:
1571
+ --
1572
+
1573
+ CREATE TABLE web_pages (
1574
+ id integer NOT NULL,
1575
+ web_site_id integer NOT NULL,
1576
+ created_at timestamp without time zone NOT NULL,
1577
+ updated_at timestamp without time zone NOT NULL,
1578
+ path text,
1579
+ query text,
1580
+ code integer NOT NULL,
1581
+ cookie text,
1582
+ auth text,
1583
+ ctype text,
1584
+ mtime timestamp without time zone,
1585
+ location text,
1586
+ headers text,
1587
+ body bytea,
1588
+ request bytea
1589
+ );
1590
+
1591
+
1592
+ --
1593
+ -- Name: web_pages_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1594
+ --
1595
+
1596
+ CREATE SEQUENCE web_pages_id_seq
1597
+ START WITH 1
1598
+ INCREMENT BY 1
1599
+ NO MINVALUE
1600
+ NO MAXVALUE
1601
+ CACHE 1;
1602
+
1603
+
1604
+ --
1605
+ -- Name: web_pages_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1606
+ --
1607
+
1608
+ ALTER SEQUENCE web_pages_id_seq OWNED BY web_pages.id;
1609
+
1610
+
1611
+ --
1612
+ -- Name: web_sites; Type: TABLE; Schema: public; Owner: -; Tablespace:
1613
+ --
1614
+
1615
+ CREATE TABLE web_sites (
1616
+ id integer NOT NULL,
1617
+ service_id integer NOT NULL,
1618
+ created_at timestamp without time zone NOT NULL,
1619
+ updated_at timestamp without time zone NOT NULL,
1620
+ vhost character varying(2048),
1621
+ comments text,
1622
+ options text
1623
+ );
1624
+
1625
+
1626
+ --
1627
+ -- Name: web_sites_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1628
+ --
1629
+
1630
+ CREATE SEQUENCE web_sites_id_seq
1631
+ START WITH 1
1632
+ INCREMENT BY 1
1633
+ NO MINVALUE
1634
+ NO MAXVALUE
1635
+ CACHE 1;
1636
+
1637
+
1638
+ --
1639
+ -- Name: web_sites_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1640
+ --
1641
+
1642
+ ALTER SEQUENCE web_sites_id_seq OWNED BY web_sites.id;
1643
+
1644
+
1645
+ --
1646
+ -- Name: web_vulns; Type: TABLE; Schema: public; Owner: -; Tablespace:
1647
+ --
1648
+
1649
+ CREATE TABLE web_vulns (
1650
+ id integer NOT NULL,
1651
+ web_site_id integer NOT NULL,
1652
+ created_at timestamp without time zone NOT NULL,
1653
+ updated_at timestamp without time zone NOT NULL,
1654
+ path text NOT NULL,
1655
+ method character varying(1024) NOT NULL,
1656
+ params text NOT NULL,
1657
+ pname text,
1658
+ risk integer NOT NULL,
1659
+ name character varying(1024) NOT NULL,
1660
+ query text,
1661
+ category text NOT NULL,
1662
+ confidence integer NOT NULL,
1663
+ description text,
1664
+ blame text,
1665
+ request bytea,
1666
+ proof bytea NOT NULL,
1667
+ owner character varying(255),
1668
+ payload text
1669
+ );
1670
+
1671
+
1672
+ --
1673
+ -- Name: web_vulns_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1674
+ --
1675
+
1676
+ CREATE SEQUENCE web_vulns_id_seq
1677
+ START WITH 1
1678
+ INCREMENT BY 1
1679
+ NO MINVALUE
1680
+ NO MAXVALUE
1681
+ CACHE 1;
1682
+
1683
+
1684
+ --
1685
+ -- Name: web_vulns_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1686
+ --
1687
+
1688
+ ALTER SEQUENCE web_vulns_id_seq OWNED BY web_vulns.id;
1689
+
1690
+
1691
+ --
1692
+ -- Name: wmap_requests; Type: TABLE; Schema: public; Owner: -; Tablespace:
1693
+ --
1694
+
1695
+ CREATE TABLE wmap_requests (
1696
+ id integer NOT NULL,
1697
+ host character varying(255),
1698
+ address inet,
1699
+ port integer,
1700
+ ssl integer,
1701
+ meth character varying(32),
1702
+ path text,
1703
+ headers text,
1704
+ query text,
1705
+ body text,
1706
+ respcode character varying(16),
1707
+ resphead text,
1708
+ response text,
1709
+ created_at timestamp without time zone,
1710
+ updated_at timestamp without time zone
1711
+ );
1712
+
1713
+
1714
+ --
1715
+ -- Name: wmap_requests_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1716
+ --
1717
+
1718
+ CREATE SEQUENCE wmap_requests_id_seq
1719
+ START WITH 1
1720
+ INCREMENT BY 1
1721
+ NO MINVALUE
1722
+ NO MAXVALUE
1723
+ CACHE 1;
1724
+
1725
+
1726
+ --
1727
+ -- Name: wmap_requests_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1728
+ --
1729
+
1730
+ ALTER SEQUENCE wmap_requests_id_seq OWNED BY wmap_requests.id;
1731
+
1732
+
1733
+ --
1734
+ -- Name: wmap_targets; Type: TABLE; Schema: public; Owner: -; Tablespace:
1735
+ --
1736
+
1737
+ CREATE TABLE wmap_targets (
1738
+ id integer NOT NULL,
1739
+ host character varying(255),
1740
+ address inet,
1741
+ port integer,
1742
+ ssl integer,
1743
+ selected integer,
1744
+ created_at timestamp without time zone,
1745
+ updated_at timestamp without time zone
1746
+ );
1747
+
1748
+
1749
+ --
1750
+ -- Name: wmap_targets_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1751
+ --
1752
+
1753
+ CREATE SEQUENCE wmap_targets_id_seq
1754
+ START WITH 1
1755
+ INCREMENT BY 1
1756
+ NO MINVALUE
1757
+ NO MAXVALUE
1758
+ CACHE 1;
1759
+
1760
+
1761
+ --
1762
+ -- Name: wmap_targets_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1763
+ --
1764
+
1765
+ ALTER SEQUENCE wmap_targets_id_seq OWNED BY wmap_targets.id;
1766
+
1767
+
1768
+ --
1769
+ -- Name: workspace_members; Type: TABLE; Schema: public; Owner: -; Tablespace:
1770
+ --
1771
+
1772
+ CREATE TABLE workspace_members (
1773
+ workspace_id integer NOT NULL,
1774
+ user_id integer NOT NULL
1775
+ );
1776
+
1777
+
1778
+ --
1779
+ -- Name: workspaces; Type: TABLE; Schema: public; Owner: -; Tablespace:
1780
+ --
1781
+
1782
+ CREATE TABLE workspaces (
1783
+ id integer NOT NULL,
1784
+ name character varying(255),
1785
+ created_at timestamp without time zone NOT NULL,
1786
+ updated_at timestamp without time zone NOT NULL,
1787
+ boundary character varying(4096),
1788
+ description character varying(4096),
1789
+ owner_id integer,
1790
+ limit_to_network boolean DEFAULT false NOT NULL
1791
+ );
1792
+
1793
+
1794
+ --
1795
+ -- Name: workspaces_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1796
+ --
1797
+
1798
+ CREATE SEQUENCE workspaces_id_seq
1799
+ START WITH 1
1800
+ INCREMENT BY 1
1801
+ NO MINVALUE
1802
+ NO MAXVALUE
1803
+ CACHE 1;
1804
+
1805
+
1806
+ --
1807
+ -- Name: workspaces_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1808
+ --
1809
+
1810
+ ALTER SEQUENCE workspaces_id_seq OWNED BY workspaces.id;
1811
+
1812
+
1813
+ --
1814
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1815
+ --
1816
+
1817
+ ALTER TABLE ONLY api_keys ALTER COLUMN id SET DEFAULT nextval('api_keys_id_seq'::regclass);
1818
+
1819
+
1820
+ --
1821
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1822
+ --
1823
+
1824
+ ALTER TABLE ONLY clients ALTER COLUMN id SET DEFAULT nextval('clients_id_seq'::regclass);
1825
+
1826
+
1827
+ --
1828
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1829
+ --
1830
+
1831
+ ALTER TABLE ONLY creds ALTER COLUMN id SET DEFAULT nextval('creds_id_seq'::regclass);
1832
+
1833
+
1834
+ --
1835
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1836
+ --
1837
+
1838
+ ALTER TABLE ONLY events ALTER COLUMN id SET DEFAULT nextval('events_id_seq'::regclass);
1839
+
1840
+
1841
+ --
1842
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1843
+ --
1844
+
1845
+ ALTER TABLE ONLY exploit_attempts ALTER COLUMN id SET DEFAULT nextval('exploit_attempts_id_seq'::regclass);
1846
+
1847
+
1848
+ --
1849
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1850
+ --
1851
+
1852
+ ALTER TABLE ONLY exploited_hosts ALTER COLUMN id SET DEFAULT nextval('exploited_hosts_id_seq'::regclass);
1853
+
1854
+
1855
+ --
1856
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1857
+ --
1858
+
1859
+ ALTER TABLE ONLY host_details ALTER COLUMN id SET DEFAULT nextval('host_details_id_seq'::regclass);
1860
+
1861
+
1862
+ --
1863
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1864
+ --
1865
+
1866
+ ALTER TABLE ONLY hosts ALTER COLUMN id SET DEFAULT nextval('hosts_id_seq'::regclass);
1867
+
1868
+
1869
+ --
1870
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1871
+ --
1872
+
1873
+ ALTER TABLE ONLY hosts_tags ALTER COLUMN id SET DEFAULT nextval('hosts_tags_id_seq'::regclass);
1874
+
1875
+
1876
+ --
1877
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1878
+ --
1879
+
1880
+ ALTER TABLE ONLY listeners ALTER COLUMN id SET DEFAULT nextval('listeners_id_seq'::regclass);
1881
+
1882
+
1883
+ --
1884
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1885
+ --
1886
+
1887
+ ALTER TABLE ONLY loots ALTER COLUMN id SET DEFAULT nextval('loots_id_seq'::regclass);
1888
+
1889
+
1890
+ --
1891
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1892
+ --
1893
+
1894
+ ALTER TABLE ONLY macros ALTER COLUMN id SET DEFAULT nextval('macros_id_seq'::regclass);
1895
+
1896
+
1897
+ --
1898
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1899
+ --
1900
+
1901
+ ALTER TABLE ONLY mod_refs ALTER COLUMN id SET DEFAULT nextval('mod_refs_id_seq'::regclass);
1902
+
1903
+
1904
+ --
1905
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1906
+ --
1907
+
1908
+ ALTER TABLE ONLY module_actions ALTER COLUMN id SET DEFAULT nextval('module_actions_id_seq'::regclass);
1909
+
1910
+
1911
+ --
1912
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1913
+ --
1914
+
1915
+ ALTER TABLE ONLY module_archs ALTER COLUMN id SET DEFAULT nextval('module_archs_id_seq'::regclass);
1916
+
1917
+
1918
+ --
1919
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1920
+ --
1921
+
1922
+ ALTER TABLE ONLY module_authors ALTER COLUMN id SET DEFAULT nextval('module_authors_id_seq'::regclass);
1923
+
1924
+
1925
+ --
1926
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1927
+ --
1928
+
1929
+ ALTER TABLE ONLY module_details ALTER COLUMN id SET DEFAULT nextval('module_details_id_seq'::regclass);
1930
+
1931
+
1932
+ --
1933
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1934
+ --
1935
+
1936
+ ALTER TABLE ONLY module_mixins ALTER COLUMN id SET DEFAULT nextval('module_mixins_id_seq'::regclass);
1937
+
1938
+
1939
+ --
1940
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1941
+ --
1942
+
1943
+ ALTER TABLE ONLY module_platforms ALTER COLUMN id SET DEFAULT nextval('module_platforms_id_seq'::regclass);
1944
+
1945
+
1946
+ --
1947
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1948
+ --
1949
+
1950
+ ALTER TABLE ONLY module_refs ALTER COLUMN id SET DEFAULT nextval('module_refs_id_seq'::regclass);
1951
+
1952
+
1953
+ --
1954
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1955
+ --
1956
+
1957
+ ALTER TABLE ONLY module_targets ALTER COLUMN id SET DEFAULT nextval('module_targets_id_seq'::regclass);
1958
+
1959
+
1960
+ --
1961
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1962
+ --
1963
+
1964
+ ALTER TABLE ONLY nexpose_consoles ALTER COLUMN id SET DEFAULT nextval('nexpose_consoles_id_seq'::regclass);
1965
+
1966
+
1967
+ --
1968
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1969
+ --
1970
+
1971
+ ALTER TABLE ONLY notes ALTER COLUMN id SET DEFAULT nextval('notes_id_seq'::regclass);
1972
+
1973
+
1974
+ --
1975
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1976
+ --
1977
+
1978
+ ALTER TABLE ONLY profiles ALTER COLUMN id SET DEFAULT nextval('profiles_id_seq'::regclass);
1979
+
1980
+
1981
+ --
1982
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1983
+ --
1984
+
1985
+ ALTER TABLE ONLY refs ALTER COLUMN id SET DEFAULT nextval('refs_id_seq'::regclass);
1986
+
1987
+
1988
+ --
1989
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1990
+ --
1991
+
1992
+ ALTER TABLE ONLY report_templates ALTER COLUMN id SET DEFAULT nextval('report_templates_id_seq'::regclass);
1993
+
1994
+
1995
+ --
1996
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1997
+ --
1998
+
1999
+ ALTER TABLE ONLY reports ALTER COLUMN id SET DEFAULT nextval('reports_id_seq'::regclass);
2000
+
2001
+
2002
+ --
2003
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
2004
+ --
2005
+
2006
+ ALTER TABLE ONLY routes ALTER COLUMN id SET DEFAULT nextval('routes_id_seq'::regclass);
2007
+
2008
+
2009
+ --
2010
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
2011
+ --
2012
+
2013
+ ALTER TABLE ONLY services ALTER COLUMN id SET DEFAULT nextval('services_id_seq'::regclass);
2014
+
2015
+
2016
+ --
2017
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
2018
+ --
2019
+
2020
+ ALTER TABLE ONLY session_events ALTER COLUMN id SET DEFAULT nextval('session_events_id_seq'::regclass);
2021
+
2022
+
2023
+ --
2024
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
2025
+ --
2026
+
2027
+ ALTER TABLE ONLY sessions ALTER COLUMN id SET DEFAULT nextval('sessions_id_seq'::regclass);
2028
+
2029
+
2030
+ --
2031
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
2032
+ --
2033
+
2034
+ ALTER TABLE ONLY tags ALTER COLUMN id SET DEFAULT nextval('tags_id_seq'::regclass);
2035
+
2036
+
2037
+ --
2038
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
2039
+ --
2040
+
2041
+ ALTER TABLE ONLY task_creds ALTER COLUMN id SET DEFAULT nextval('task_creds_id_seq'::regclass);
2042
+
2043
+
2044
+ --
2045
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
2046
+ --
2047
+
2048
+ ALTER TABLE ONLY task_hosts ALTER COLUMN id SET DEFAULT nextval('task_hosts_id_seq'::regclass);
2049
+
2050
+
2051
+ --
2052
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
2053
+ --
2054
+
2055
+ ALTER TABLE ONLY task_services ALTER COLUMN id SET DEFAULT nextval('task_services_id_seq'::regclass);
2056
+
2057
+
2058
+ --
2059
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
2060
+ --
2061
+
2062
+ ALTER TABLE ONLY task_sessions ALTER COLUMN id SET DEFAULT nextval('task_sessions_id_seq'::regclass);
2063
+
2064
+
2065
+ --
2066
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
2067
+ --
2068
+
2069
+ ALTER TABLE ONLY tasks ALTER COLUMN id SET DEFAULT nextval('tasks_id_seq'::regclass);
2070
+
2071
+
2072
+ --
2073
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
2074
+ --
2075
+
2076
+ ALTER TABLE ONLY users ALTER COLUMN id SET DEFAULT nextval('users_id_seq'::regclass);
2077
+
2078
+
2079
+ --
2080
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
2081
+ --
2082
+
2083
+ ALTER TABLE ONLY vuln_attempts ALTER COLUMN id SET DEFAULT nextval('vuln_attempts_id_seq'::regclass);
2084
+
2085
+
2086
+ --
2087
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
2088
+ --
2089
+
2090
+ ALTER TABLE ONLY vuln_details ALTER COLUMN id SET DEFAULT nextval('vuln_details_id_seq'::regclass);
2091
+
2092
+
2093
+ --
2094
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
2095
+ --
2096
+
2097
+ ALTER TABLE ONLY vulns ALTER COLUMN id SET DEFAULT nextval('vulns_id_seq'::regclass);
2098
+
2099
+
2100
+ --
2101
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
2102
+ --
2103
+
2104
+ ALTER TABLE ONLY vulns_refs ALTER COLUMN id SET DEFAULT nextval('vulns_refs_id_seq'::regclass);
2105
+
2106
+
2107
+ --
2108
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
2109
+ --
2110
+
2111
+ ALTER TABLE ONLY web_forms ALTER COLUMN id SET DEFAULT nextval('web_forms_id_seq'::regclass);
2112
+
2113
+
2114
+ --
2115
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
2116
+ --
2117
+
2118
+ ALTER TABLE ONLY web_pages ALTER COLUMN id SET DEFAULT nextval('web_pages_id_seq'::regclass);
2119
+
2120
+
2121
+ --
2122
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
2123
+ --
2124
+
2125
+ ALTER TABLE ONLY web_sites ALTER COLUMN id SET DEFAULT nextval('web_sites_id_seq'::regclass);
2126
+
2127
+
2128
+ --
2129
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
2130
+ --
2131
+
2132
+ ALTER TABLE ONLY web_vulns ALTER COLUMN id SET DEFAULT nextval('web_vulns_id_seq'::regclass);
2133
+
2134
+
2135
+ --
2136
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
2137
+ --
2138
+
2139
+ ALTER TABLE ONLY wmap_requests ALTER COLUMN id SET DEFAULT nextval('wmap_requests_id_seq'::regclass);
2140
+
2141
+
2142
+ --
2143
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
2144
+ --
2145
+
2146
+ ALTER TABLE ONLY wmap_targets ALTER COLUMN id SET DEFAULT nextval('wmap_targets_id_seq'::regclass);
2147
+
2148
+
2149
+ --
2150
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
2151
+ --
2152
+
2153
+ ALTER TABLE ONLY workspaces ALTER COLUMN id SET DEFAULT nextval('workspaces_id_seq'::regclass);
2154
+
2155
+
2156
+ --
2157
+ -- Name: api_keys_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2158
+ --
2159
+
2160
+ ALTER TABLE ONLY api_keys
2161
+ ADD CONSTRAINT api_keys_pkey PRIMARY KEY (id);
2162
+
2163
+
2164
+ --
2165
+ -- Name: clients_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2166
+ --
2167
+
2168
+ ALTER TABLE ONLY clients
2169
+ ADD CONSTRAINT clients_pkey PRIMARY KEY (id);
2170
+
2171
+
2172
+ --
2173
+ -- Name: creds_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2174
+ --
2175
+
2176
+ ALTER TABLE ONLY creds
2177
+ ADD CONSTRAINT creds_pkey PRIMARY KEY (id);
2178
+
2179
+
2180
+ --
2181
+ -- Name: events_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2182
+ --
2183
+
2184
+ ALTER TABLE ONLY events
2185
+ ADD CONSTRAINT events_pkey PRIMARY KEY (id);
2186
+
2187
+
2188
+ --
2189
+ -- Name: exploit_attempts_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2190
+ --
2191
+
2192
+ ALTER TABLE ONLY exploit_attempts
2193
+ ADD CONSTRAINT exploit_attempts_pkey PRIMARY KEY (id);
2194
+
2195
+
2196
+ --
2197
+ -- Name: exploited_hosts_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2198
+ --
2199
+
2200
+ ALTER TABLE ONLY exploited_hosts
2201
+ ADD CONSTRAINT exploited_hosts_pkey PRIMARY KEY (id);
2202
+
2203
+
2204
+ --
2205
+ -- Name: host_details_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2206
+ --
2207
+
2208
+ ALTER TABLE ONLY host_details
2209
+ ADD CONSTRAINT host_details_pkey PRIMARY KEY (id);
2210
+
2211
+
2212
+ --
2213
+ -- Name: hosts_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2214
+ --
2215
+
2216
+ ALTER TABLE ONLY hosts
2217
+ ADD CONSTRAINT hosts_pkey PRIMARY KEY (id);
2218
+
2219
+
2220
+ --
2221
+ -- Name: hosts_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2222
+ --
2223
+
2224
+ ALTER TABLE ONLY hosts_tags
2225
+ ADD CONSTRAINT hosts_tags_pkey PRIMARY KEY (id);
2226
+
2227
+
2228
+ --
2229
+ -- Name: listeners_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2230
+ --
2231
+
2232
+ ALTER TABLE ONLY listeners
2233
+ ADD CONSTRAINT listeners_pkey PRIMARY KEY (id);
2234
+
2235
+
2236
+ --
2237
+ -- Name: loots_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2238
+ --
2239
+
2240
+ ALTER TABLE ONLY loots
2241
+ ADD CONSTRAINT loots_pkey PRIMARY KEY (id);
2242
+
2243
+
2244
+ --
2245
+ -- Name: macros_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2246
+ --
2247
+
2248
+ ALTER TABLE ONLY macros
2249
+ ADD CONSTRAINT macros_pkey PRIMARY KEY (id);
2250
+
2251
+
2252
+ --
2253
+ -- Name: mod_refs_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2254
+ --
2255
+
2256
+ ALTER TABLE ONLY mod_refs
2257
+ ADD CONSTRAINT mod_refs_pkey PRIMARY KEY (id);
2258
+
2259
+
2260
+ --
2261
+ -- Name: module_actions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2262
+ --
2263
+
2264
+ ALTER TABLE ONLY module_actions
2265
+ ADD CONSTRAINT module_actions_pkey PRIMARY KEY (id);
2266
+
2267
+
2268
+ --
2269
+ -- Name: module_archs_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2270
+ --
2271
+
2272
+ ALTER TABLE ONLY module_archs
2273
+ ADD CONSTRAINT module_archs_pkey PRIMARY KEY (id);
2274
+
2275
+
2276
+ --
2277
+ -- Name: module_authors_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2278
+ --
2279
+
2280
+ ALTER TABLE ONLY module_authors
2281
+ ADD CONSTRAINT module_authors_pkey PRIMARY KEY (id);
2282
+
2283
+
2284
+ --
2285
+ -- Name: module_details_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2286
+ --
2287
+
2288
+ ALTER TABLE ONLY module_details
2289
+ ADD CONSTRAINT module_details_pkey PRIMARY KEY (id);
2290
+
2291
+
2292
+ --
2293
+ -- Name: module_mixins_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2294
+ --
2295
+
2296
+ ALTER TABLE ONLY module_mixins
2297
+ ADD CONSTRAINT module_mixins_pkey PRIMARY KEY (id);
2298
+
2299
+
2300
+ --
2301
+ -- Name: module_platforms_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2302
+ --
2303
+
2304
+ ALTER TABLE ONLY module_platforms
2305
+ ADD CONSTRAINT module_platforms_pkey PRIMARY KEY (id);
2306
+
2307
+
2308
+ --
2309
+ -- Name: module_refs_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2310
+ --
2311
+
2312
+ ALTER TABLE ONLY module_refs
2313
+ ADD CONSTRAINT module_refs_pkey PRIMARY KEY (id);
2314
+
2315
+
2316
+ --
2317
+ -- Name: module_targets_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2318
+ --
2319
+
2320
+ ALTER TABLE ONLY module_targets
2321
+ ADD CONSTRAINT module_targets_pkey PRIMARY KEY (id);
2322
+
2323
+
2324
+ --
2325
+ -- Name: nexpose_consoles_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2326
+ --
2327
+
2328
+ ALTER TABLE ONLY nexpose_consoles
2329
+ ADD CONSTRAINT nexpose_consoles_pkey PRIMARY KEY (id);
2330
+
2331
+
2332
+ --
2333
+ -- Name: notes_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2334
+ --
2335
+
2336
+ ALTER TABLE ONLY notes
2337
+ ADD CONSTRAINT notes_pkey PRIMARY KEY (id);
2338
+
2339
+
2340
+ --
2341
+ -- Name: profiles_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2342
+ --
2343
+
2344
+ ALTER TABLE ONLY profiles
2345
+ ADD CONSTRAINT profiles_pkey PRIMARY KEY (id);
2346
+
2347
+
2348
+ --
2349
+ -- Name: refs_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2350
+ --
2351
+
2352
+ ALTER TABLE ONLY refs
2353
+ ADD CONSTRAINT refs_pkey PRIMARY KEY (id);
2354
+
2355
+
2356
+ --
2357
+ -- Name: report_templates_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2358
+ --
2359
+
2360
+ ALTER TABLE ONLY report_templates
2361
+ ADD CONSTRAINT report_templates_pkey PRIMARY KEY (id);
2362
+
2363
+
2364
+ --
2365
+ -- Name: reports_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2366
+ --
2367
+
2368
+ ALTER TABLE ONLY reports
2369
+ ADD CONSTRAINT reports_pkey PRIMARY KEY (id);
2370
+
2371
+
2372
+ --
2373
+ -- Name: routes_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2374
+ --
2375
+
2376
+ ALTER TABLE ONLY routes
2377
+ ADD CONSTRAINT routes_pkey PRIMARY KEY (id);
2378
+
2379
+
2380
+ --
2381
+ -- Name: services_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2382
+ --
2383
+
2384
+ ALTER TABLE ONLY services
2385
+ ADD CONSTRAINT services_pkey PRIMARY KEY (id);
2386
+
2387
+
2388
+ --
2389
+ -- Name: session_events_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2390
+ --
2391
+
2392
+ ALTER TABLE ONLY session_events
2393
+ ADD CONSTRAINT session_events_pkey PRIMARY KEY (id);
2394
+
2395
+
2396
+ --
2397
+ -- Name: sessions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2398
+ --
2399
+
2400
+ ALTER TABLE ONLY sessions
2401
+ ADD CONSTRAINT sessions_pkey PRIMARY KEY (id);
2402
+
2403
+
2404
+ --
2405
+ -- Name: tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2406
+ --
2407
+
2408
+ ALTER TABLE ONLY tags
2409
+ ADD CONSTRAINT tags_pkey PRIMARY KEY (id);
2410
+
2411
+
2412
+ --
2413
+ -- Name: task_creds_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2414
+ --
2415
+
2416
+ ALTER TABLE ONLY task_creds
2417
+ ADD CONSTRAINT task_creds_pkey PRIMARY KEY (id);
2418
+
2419
+
2420
+ --
2421
+ -- Name: task_hosts_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2422
+ --
2423
+
2424
+ ALTER TABLE ONLY task_hosts
2425
+ ADD CONSTRAINT task_hosts_pkey PRIMARY KEY (id);
2426
+
2427
+
2428
+ --
2429
+ -- Name: task_services_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2430
+ --
2431
+
2432
+ ALTER TABLE ONLY task_services
2433
+ ADD CONSTRAINT task_services_pkey PRIMARY KEY (id);
2434
+
2435
+
2436
+ --
2437
+ -- Name: task_sessions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2438
+ --
2439
+
2440
+ ALTER TABLE ONLY task_sessions
2441
+ ADD CONSTRAINT task_sessions_pkey PRIMARY KEY (id);
2442
+
2443
+
2444
+ --
2445
+ -- Name: tasks_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2446
+ --
2447
+
2448
+ ALTER TABLE ONLY tasks
2449
+ ADD CONSTRAINT tasks_pkey PRIMARY KEY (id);
2450
+
2451
+
2452
+ --
2453
+ -- Name: users_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2454
+ --
2455
+
2456
+ ALTER TABLE ONLY users
2457
+ ADD CONSTRAINT users_pkey PRIMARY KEY (id);
2458
+
2459
+
2460
+ --
2461
+ -- Name: vuln_attempts_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2462
+ --
2463
+
2464
+ ALTER TABLE ONLY vuln_attempts
2465
+ ADD CONSTRAINT vuln_attempts_pkey PRIMARY KEY (id);
2466
+
2467
+
2468
+ --
2469
+ -- Name: vuln_details_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2470
+ --
2471
+
2472
+ ALTER TABLE ONLY vuln_details
2473
+ ADD CONSTRAINT vuln_details_pkey PRIMARY KEY (id);
2474
+
2475
+
2476
+ --
2477
+ -- Name: vulns_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2478
+ --
2479
+
2480
+ ALTER TABLE ONLY vulns
2481
+ ADD CONSTRAINT vulns_pkey PRIMARY KEY (id);
2482
+
2483
+
2484
+ --
2485
+ -- Name: vulns_refs_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2486
+ --
2487
+
2488
+ ALTER TABLE ONLY vulns_refs
2489
+ ADD CONSTRAINT vulns_refs_pkey PRIMARY KEY (id);
2490
+
2491
+
2492
+ --
2493
+ -- Name: web_forms_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2494
+ --
2495
+
2496
+ ALTER TABLE ONLY web_forms
2497
+ ADD CONSTRAINT web_forms_pkey PRIMARY KEY (id);
2498
+
2499
+
2500
+ --
2501
+ -- Name: web_pages_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2502
+ --
2503
+
2504
+ ALTER TABLE ONLY web_pages
2505
+ ADD CONSTRAINT web_pages_pkey PRIMARY KEY (id);
2506
+
2507
+
2508
+ --
2509
+ -- Name: web_sites_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2510
+ --
2511
+
2512
+ ALTER TABLE ONLY web_sites
2513
+ ADD CONSTRAINT web_sites_pkey PRIMARY KEY (id);
2514
+
2515
+
2516
+ --
2517
+ -- Name: web_vulns_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2518
+ --
2519
+
2520
+ ALTER TABLE ONLY web_vulns
2521
+ ADD CONSTRAINT web_vulns_pkey PRIMARY KEY (id);
2522
+
2523
+
2524
+ --
2525
+ -- Name: wmap_requests_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2526
+ --
2527
+
2528
+ ALTER TABLE ONLY wmap_requests
2529
+ ADD CONSTRAINT wmap_requests_pkey PRIMARY KEY (id);
2530
+
2531
+
2532
+ --
2533
+ -- Name: wmap_targets_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2534
+ --
2535
+
2536
+ ALTER TABLE ONLY wmap_targets
2537
+ ADD CONSTRAINT wmap_targets_pkey PRIMARY KEY (id);
2538
+
2539
+
2540
+ --
2541
+ -- Name: workspaces_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
2542
+ --
2543
+
2544
+ ALTER TABLE ONLY workspaces
2545
+ ADD CONSTRAINT workspaces_pkey PRIMARY KEY (id);
2546
+
2547
+
2548
+ --
2549
+ -- Name: index_hosts_on_name; Type: INDEX; Schema: public; Owner: -; Tablespace:
2550
+ --
2551
+
2552
+ CREATE INDEX index_hosts_on_name ON hosts USING btree (name);
2553
+
2554
+
2555
+ --
2556
+ -- Name: index_hosts_on_os_flavor; Type: INDEX; Schema: public; Owner: -; Tablespace:
2557
+ --
2558
+
2559
+ CREATE INDEX index_hosts_on_os_flavor ON hosts USING btree (os_flavor);
2560
+
2561
+
2562
+ --
2563
+ -- Name: index_hosts_on_os_name; Type: INDEX; Schema: public; Owner: -; Tablespace:
2564
+ --
2565
+
2566
+ CREATE INDEX index_hosts_on_os_name ON hosts USING btree (os_name);
2567
+
2568
+
2569
+ --
2570
+ -- Name: index_hosts_on_purpose; Type: INDEX; Schema: public; Owner: -; Tablespace:
2571
+ --
2572
+
2573
+ CREATE INDEX index_hosts_on_purpose ON hosts USING btree (purpose);
2574
+
2575
+
2576
+ --
2577
+ -- Name: index_hosts_on_state; Type: INDEX; Schema: public; Owner: -; Tablespace:
2578
+ --
2579
+
2580
+ CREATE INDEX index_hosts_on_state ON hosts USING btree (state);
2581
+
2582
+
2583
+ --
2584
+ -- Name: index_hosts_on_workspace_id_and_address; Type: INDEX; Schema: public; Owner: -; Tablespace:
2585
+ --
2586
+
2587
+ CREATE UNIQUE INDEX index_hosts_on_workspace_id_and_address ON hosts USING btree (workspace_id, address);
2588
+
2589
+
2590
+ --
2591
+ -- Name: index_module_actions_on_module_detail_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
2592
+ --
2593
+
2594
+ CREATE INDEX index_module_actions_on_module_detail_id ON module_actions USING btree (detail_id);
2595
+
2596
+
2597
+ --
2598
+ -- Name: index_module_archs_on_module_detail_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
2599
+ --
2600
+
2601
+ CREATE INDEX index_module_archs_on_module_detail_id ON module_archs USING btree (detail_id);
2602
+
2603
+
2604
+ --
2605
+ -- Name: index_module_authors_on_module_detail_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
2606
+ --
2607
+
2608
+ CREATE INDEX index_module_authors_on_module_detail_id ON module_authors USING btree (detail_id);
2609
+
2610
+
2611
+ --
2612
+ -- Name: index_module_details_on_description; Type: INDEX; Schema: public; Owner: -; Tablespace:
2613
+ --
2614
+
2615
+ CREATE INDEX index_module_details_on_description ON module_details USING btree (description);
2616
+
2617
+
2618
+ --
2619
+ -- Name: index_module_details_on_mtype; Type: INDEX; Schema: public; Owner: -; Tablespace:
2620
+ --
2621
+
2622
+ CREATE INDEX index_module_details_on_mtype ON module_details USING btree (mtype);
2623
+
2624
+
2625
+ --
2626
+ -- Name: index_module_details_on_name; Type: INDEX; Schema: public; Owner: -; Tablespace:
2627
+ --
2628
+
2629
+ CREATE INDEX index_module_details_on_name ON module_details USING btree (name);
2630
+
2631
+
2632
+ --
2633
+ -- Name: index_module_details_on_refname; Type: INDEX; Schema: public; Owner: -; Tablespace:
2634
+ --
2635
+
2636
+ CREATE INDEX index_module_details_on_refname ON module_details USING btree (refname);
2637
+
2638
+
2639
+ --
2640
+ -- Name: index_module_mixins_on_module_detail_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
2641
+ --
2642
+
2643
+ CREATE INDEX index_module_mixins_on_module_detail_id ON module_mixins USING btree (detail_id);
2644
+
2645
+
2646
+ --
2647
+ -- Name: index_module_platforms_on_module_detail_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
2648
+ --
2649
+
2650
+ CREATE INDEX index_module_platforms_on_module_detail_id ON module_platforms USING btree (detail_id);
2651
+
2652
+
2653
+ --
2654
+ -- Name: index_module_refs_on_module_detail_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
2655
+ --
2656
+
2657
+ CREATE INDEX index_module_refs_on_module_detail_id ON module_refs USING btree (detail_id);
2658
+
2659
+
2660
+ --
2661
+ -- Name: index_module_refs_on_name; Type: INDEX; Schema: public; Owner: -; Tablespace:
2662
+ --
2663
+
2664
+ CREATE INDEX index_module_refs_on_name ON module_refs USING btree (name);
2665
+
2666
+
2667
+ --
2668
+ -- Name: index_module_targets_on_module_detail_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
2669
+ --
2670
+
2671
+ CREATE INDEX index_module_targets_on_module_detail_id ON module_targets USING btree (detail_id);
2672
+
2673
+
2674
+ --
2675
+ -- Name: index_notes_on_ntype; Type: INDEX; Schema: public; Owner: -; Tablespace:
2676
+ --
2677
+
2678
+ CREATE INDEX index_notes_on_ntype ON notes USING btree (ntype);
2679
+
2680
+
2681
+ --
2682
+ -- Name: index_refs_on_name; Type: INDEX; Schema: public; Owner: -; Tablespace:
2683
+ --
2684
+
2685
+ CREATE INDEX index_refs_on_name ON refs USING btree (name);
2686
+
2687
+
2688
+ --
2689
+ -- Name: index_services_on_name; Type: INDEX; Schema: public; Owner: -; Tablespace:
2690
+ --
2691
+
2692
+ CREATE INDEX index_services_on_name ON services USING btree (name);
2693
+
2694
+
2695
+ --
2696
+ -- Name: index_services_on_port; Type: INDEX; Schema: public; Owner: -; Tablespace:
2697
+ --
2698
+
2699
+ CREATE INDEX index_services_on_port ON services USING btree (port);
2700
+
2701
+
2702
+ --
2703
+ -- Name: index_services_on_proto; Type: INDEX; Schema: public; Owner: -; Tablespace:
2704
+ --
2705
+
2706
+ CREATE INDEX index_services_on_proto ON services USING btree (proto);
2707
+
2708
+
2709
+ --
2710
+ -- Name: index_services_on_state; Type: INDEX; Schema: public; Owner: -; Tablespace:
2711
+ --
2712
+
2713
+ CREATE INDEX index_services_on_state ON services USING btree (state);
2714
+
2715
+
2716
+ --
2717
+ -- Name: index_vulns_on_name; Type: INDEX; Schema: public; Owner: -; Tablespace:
2718
+ --
2719
+
2720
+ CREATE INDEX index_vulns_on_name ON vulns USING btree (name);
2721
+
2722
+
2723
+ --
2724
+ -- Name: index_web_forms_on_path; Type: INDEX; Schema: public; Owner: -; Tablespace:
2725
+ --
2726
+
2727
+ CREATE INDEX index_web_forms_on_path ON web_forms USING btree (path);
2728
+
2729
+
2730
+ --
2731
+ -- Name: index_web_pages_on_path; Type: INDEX; Schema: public; Owner: -; Tablespace:
2732
+ --
2733
+
2734
+ CREATE INDEX index_web_pages_on_path ON web_pages USING btree (path);
2735
+
2736
+
2737
+ --
2738
+ -- Name: index_web_pages_on_query; Type: INDEX; Schema: public; Owner: -; Tablespace:
2739
+ --
2740
+
2741
+ CREATE INDEX index_web_pages_on_query ON web_pages USING btree (query);
2742
+
2743
+
2744
+ --
2745
+ -- Name: index_web_sites_on_comments; Type: INDEX; Schema: public; Owner: -; Tablespace:
2746
+ --
2747
+
2748
+ CREATE INDEX index_web_sites_on_comments ON web_sites USING btree (comments);
2749
+
2750
+
2751
+ --
2752
+ -- Name: index_web_sites_on_options; Type: INDEX; Schema: public; Owner: -; Tablespace:
2753
+ --
2754
+
2755
+ CREATE INDEX index_web_sites_on_options ON web_sites USING btree (options);
2756
+
2757
+
2758
+ --
2759
+ -- Name: index_web_sites_on_vhost; Type: INDEX; Schema: public; Owner: -; Tablespace:
2760
+ --
2761
+
2762
+ CREATE INDEX index_web_sites_on_vhost ON web_sites USING btree (vhost);
2763
+
2764
+
2765
+ --
2766
+ -- Name: index_web_vulns_on_method; Type: INDEX; Schema: public; Owner: -; Tablespace:
2767
+ --
2768
+
2769
+ CREATE INDEX index_web_vulns_on_method ON web_vulns USING btree (method);
2770
+
2771
+
2772
+ --
2773
+ -- Name: index_web_vulns_on_name; Type: INDEX; Schema: public; Owner: -; Tablespace:
2774
+ --
2775
+
2776
+ CREATE INDEX index_web_vulns_on_name ON web_vulns USING btree (name);
2777
+
2778
+
2779
+ --
2780
+ -- Name: index_web_vulns_on_path; Type: INDEX; Schema: public; Owner: -; Tablespace:
2781
+ --
2782
+
2783
+ CREATE INDEX index_web_vulns_on_path ON web_vulns USING btree (path);
2784
+
2785
+
2786
+ --
2787
+ -- Name: unique_schema_migrations; Type: INDEX; Schema: public; Owner: -; Tablespace:
2788
+ --
2789
+
2790
+ CREATE UNIQUE INDEX unique_schema_migrations ON schema_migrations USING btree (version);
2791
+
2792
+
2793
+ --
2794
+ -- PostgreSQL database dump complete
2795
+ --
2796
+
2797
+ SET search_path TO "$user",public;
2798
+
2799
+ INSERT INTO schema_migrations (version) VALUES ('0');
2800
+
2801
+ INSERT INTO schema_migrations (version) VALUES ('1');
2802
+
2803
+ INSERT INTO schema_migrations (version) VALUES ('10');
2804
+
2805
+ INSERT INTO schema_migrations (version) VALUES ('11');
2806
+
2807
+ INSERT INTO schema_migrations (version) VALUES ('12');
2808
+
2809
+ INSERT INTO schema_migrations (version) VALUES ('13');
2810
+
2811
+ INSERT INTO schema_migrations (version) VALUES ('14');
2812
+
2813
+ INSERT INTO schema_migrations (version) VALUES ('15');
2814
+
2815
+ INSERT INTO schema_migrations (version) VALUES ('16');
2816
+
2817
+ INSERT INTO schema_migrations (version) VALUES ('17');
2818
+
2819
+ INSERT INTO schema_migrations (version) VALUES ('18');
2820
+
2821
+ INSERT INTO schema_migrations (version) VALUES ('19');
2822
+
2823
+ INSERT INTO schema_migrations (version) VALUES ('2');
2824
+
2825
+ INSERT INTO schema_migrations (version) VALUES ('20');
2826
+
2827
+ INSERT INTO schema_migrations (version) VALUES ('20100819123300');
2828
+
2829
+ INSERT INTO schema_migrations (version) VALUES ('20100824151500');
2830
+
2831
+ INSERT INTO schema_migrations (version) VALUES ('20100908001428');
2832
+
2833
+ INSERT INTO schema_migrations (version) VALUES ('20100911122000');
2834
+
2835
+ INSERT INTO schema_migrations (version) VALUES ('20100916151530');
2836
+
2837
+ INSERT INTO schema_migrations (version) VALUES ('20100916175000');
2838
+
2839
+ INSERT INTO schema_migrations (version) VALUES ('20100920012100');
2840
+
2841
+ INSERT INTO schema_migrations (version) VALUES ('20100926214000');
2842
+
2843
+ INSERT INTO schema_migrations (version) VALUES ('20101001000000');
2844
+
2845
+ INSERT INTO schema_migrations (version) VALUES ('20101002000000');
2846
+
2847
+ INSERT INTO schema_migrations (version) VALUES ('20101007000000');
2848
+
2849
+ INSERT INTO schema_migrations (version) VALUES ('20101008111800');
2850
+
2851
+ INSERT INTO schema_migrations (version) VALUES ('20101009023300');
2852
+
2853
+ INSERT INTO schema_migrations (version) VALUES ('20101104135100');
2854
+
2855
+ INSERT INTO schema_migrations (version) VALUES ('20101203000000');
2856
+
2857
+ INSERT INTO schema_migrations (version) VALUES ('20101203000001');
2858
+
2859
+ INSERT INTO schema_migrations (version) VALUES ('20101206212033');
2860
+
2861
+ INSERT INTO schema_migrations (version) VALUES ('20110112154300');
2862
+
2863
+ INSERT INTO schema_migrations (version) VALUES ('20110204112800');
2864
+
2865
+ INSERT INTO schema_migrations (version) VALUES ('20110317144932');
2866
+
2867
+ INSERT INTO schema_migrations (version) VALUES ('20110414180600');
2868
+
2869
+ INSERT INTO schema_migrations (version) VALUES ('20110415175705');
2870
+
2871
+ INSERT INTO schema_migrations (version) VALUES ('20110422000000');
2872
+
2873
+ INSERT INTO schema_migrations (version) VALUES ('20110425095900');
2874
+
2875
+ INSERT INTO schema_migrations (version) VALUES ('20110513143900');
2876
+
2877
+ INSERT INTO schema_migrations (version) VALUES ('20110517160800');
2878
+
2879
+ INSERT INTO schema_migrations (version) VALUES ('20110527000000');
2880
+
2881
+ INSERT INTO schema_migrations (version) VALUES ('20110527000001');
2882
+
2883
+ INSERT INTO schema_migrations (version) VALUES ('20110606000001');
2884
+
2885
+ INSERT INTO schema_migrations (version) VALUES ('20110622000000');
2886
+
2887
+ INSERT INTO schema_migrations (version) VALUES ('20110624000001');
2888
+
2889
+ INSERT INTO schema_migrations (version) VALUES ('20110625000001');
2890
+
2891
+ INSERT INTO schema_migrations (version) VALUES ('20110630000001');
2892
+
2893
+ INSERT INTO schema_migrations (version) VALUES ('20110630000002');
2894
+
2895
+ INSERT INTO schema_migrations (version) VALUES ('20110717000001');
2896
+
2897
+ INSERT INTO schema_migrations (version) VALUES ('20110727163801');
2898
+
2899
+ INSERT INTO schema_migrations (version) VALUES ('20110730000001');
2900
+
2901
+ INSERT INTO schema_migrations (version) VALUES ('20110812000001');
2902
+
2903
+ INSERT INTO schema_migrations (version) VALUES ('20110922000000');
2904
+
2905
+ INSERT INTO schema_migrations (version) VALUES ('20110928101300');
2906
+
2907
+ INSERT INTO schema_migrations (version) VALUES ('20111011110000');
2908
+
2909
+ INSERT INTO schema_migrations (version) VALUES ('20111203000000');
2910
+
2911
+ INSERT INTO schema_migrations (version) VALUES ('20111204000000');
2912
+
2913
+ INSERT INTO schema_migrations (version) VALUES ('20111210000000');
2914
+
2915
+ INSERT INTO schema_migrations (version) VALUES ('20120126110000');
2916
+
2917
+ INSERT INTO schema_migrations (version) VALUES ('20120411173220');
2918
+
2919
+ INSERT INTO schema_migrations (version) VALUES ('20120601152442');
2920
+
2921
+ INSERT INTO schema_migrations (version) VALUES ('20120625000000');
2922
+
2923
+ INSERT INTO schema_migrations (version) VALUES ('20120625000001');
2924
+
2925
+ INSERT INTO schema_migrations (version) VALUES ('20120625000002');
2926
+
2927
+ INSERT INTO schema_migrations (version) VALUES ('20120625000003');
2928
+
2929
+ INSERT INTO schema_migrations (version) VALUES ('20120625000004');
2930
+
2931
+ INSERT INTO schema_migrations (version) VALUES ('20120625000005');
2932
+
2933
+ INSERT INTO schema_migrations (version) VALUES ('20120625000006');
2934
+
2935
+ INSERT INTO schema_migrations (version) VALUES ('20120625000007');
2936
+
2937
+ INSERT INTO schema_migrations (version) VALUES ('20120625000008');
2938
+
2939
+ INSERT INTO schema_migrations (version) VALUES ('20120718202805');
2940
+
2941
+ INSERT INTO schema_migrations (version) VALUES ('20130228214900');
2942
+
2943
+ INSERT INTO schema_migrations (version) VALUES ('20130412154159');
2944
+
2945
+ INSERT INTO schema_migrations (version) VALUES ('20130412171844');
2946
+
2947
+ INSERT INTO schema_migrations (version) VALUES ('20130412173121');
2948
+
2949
+ INSERT INTO schema_migrations (version) VALUES ('20130412173640');
2950
+
2951
+ INSERT INTO schema_migrations (version) VALUES ('20130412174254');
2952
+
2953
+ INSERT INTO schema_migrations (version) VALUES ('20130412174719');
2954
+
2955
+ INSERT INTO schema_migrations (version) VALUES ('20130412175040');
2956
+
2957
+ INSERT INTO schema_migrations (version) VALUES ('20130423211152');
2958
+
2959
+ INSERT INTO schema_migrations (version) VALUES ('20130430151353');
2960
+
2961
+ INSERT INTO schema_migrations (version) VALUES ('20130430162145');
2962
+
2963
+ INSERT INTO schema_migrations (version) VALUES ('20130510021637');
2964
+
2965
+ INSERT INTO schema_migrations (version) VALUES ('20130515164311');
2966
+
2967
+ INSERT INTO schema_migrations (version) VALUES ('20130515172727');
2968
+
2969
+ INSERT INTO schema_migrations (version) VALUES ('20130516204810');
2970
+
2971
+ INSERT INTO schema_migrations (version) VALUES ('20130522001343');
2972
+
2973
+ INSERT INTO schema_migrations (version) VALUES ('20130522032517');
2974
+
2975
+ INSERT INTO schema_migrations (version) VALUES ('20130522041110');
2976
+
2977
+ INSERT INTO schema_migrations (version) VALUES ('20130525015035');
2978
+
2979
+ INSERT INTO schema_migrations (version) VALUES ('20130525212420');
2980
+
2981
+ INSERT INTO schema_migrations (version) VALUES ('20130531144949');
2982
+
2983
+ INSERT INTO schema_migrations (version) VALUES ('20130604145732');
2984
+
2985
+ INSERT INTO schema_migrations (version) VALUES ('20130717150737');
2986
+
2987
+ INSERT INTO schema_migrations (version) VALUES ('21');
2988
+
2989
+ INSERT INTO schema_migrations (version) VALUES ('22');
2990
+
2991
+ INSERT INTO schema_migrations (version) VALUES ('23');
2992
+
2993
+ INSERT INTO schema_migrations (version) VALUES ('24');
2994
+
2995
+ INSERT INTO schema_migrations (version) VALUES ('25');
2996
+
2997
+ INSERT INTO schema_migrations (version) VALUES ('26');
2998
+
2999
+ INSERT INTO schema_migrations (version) VALUES ('3');
3000
+
3001
+ INSERT INTO schema_migrations (version) VALUES ('4');
3002
+
3003
+ INSERT INTO schema_migrations (version) VALUES ('5');
3004
+
3005
+ INSERT INTO schema_migrations (version) VALUES ('6');
3006
+
3007
+ INSERT INTO schema_migrations (version) VALUES ('7');
3008
+
3009
+ INSERT INTO schema_migrations (version) VALUES ('8');
3010
+
3011
+ INSERT INTO schema_migrations (version) VALUES ('9');