2006-09-17 00:39:23 +00:00
|
|
|
drop table hosts;
|
2006-03-21 04:37:48 +00:00
|
|
|
create table hosts (
|
|
|
|
'id' INTEGER PRIMARY KEY NOT NULL,
|
2008-03-02 04:46:13 +00:00
|
|
|
'created' TIMESTAMP,
|
2006-03-21 04:37:48 +00:00
|
|
|
'address' VARCHAR(16) UNIQUE,
|
2009-07-22 13:25:33 +00:00
|
|
|
'address6' VARCHAR(255),
|
|
|
|
'mac' VARCHAR(255),
|
2006-03-21 04:37:48 +00:00
|
|
|
'comm' VARCHAR(255),
|
|
|
|
'name' VARCHAR(255),
|
|
|
|
'state' VARCHAR(255),
|
2008-07-22 07:28:05 +00:00
|
|
|
'desc' VARCHAR(1024),
|
|
|
|
'os_name' VARCHAR(255),
|
|
|
|
'os_flavor' VARCHAR(255),
|
|
|
|
'os_sp' VARCHAR(255),
|
|
|
|
'os_lang' VARCHAR(255),
|
|
|
|
'arch' VARCHAR(255)
|
2006-03-21 04:37:48 +00:00
|
|
|
);
|
|
|
|
|
2006-09-17 00:39:23 +00:00
|
|
|
drop table services;
|
2006-03-21 04:37:48 +00:00
|
|
|
create table services (
|
|
|
|
'id' INTEGER PRIMARY KEY NOT NULL,
|
|
|
|
'host_id' INTEGER,
|
2008-03-02 04:46:13 +00:00
|
|
|
'created' TIMESTAMP,
|
2006-03-21 04:37:48 +00:00
|
|
|
'port' INTEGER NOT NULL,
|
|
|
|
'proto' VARCHAR(16) NOT NULL,
|
|
|
|
'state' VARCHAR(255),
|
|
|
|
'name' VARCHAR(255),
|
|
|
|
'desc' VARCHAR(1024)
|
|
|
|
);
|
2006-04-02 22:33:34 +00:00
|
|
|
|
2006-09-17 00:39:23 +00:00
|
|
|
drop table vulns;
|
2006-04-02 22:33:34 +00:00
|
|
|
create table vulns (
|
|
|
|
'id' INTEGER PRIMARY KEY NOT NULL,
|
2009-07-22 13:25:33 +00:00
|
|
|
'host_id' INTEGER,
|
2006-04-02 22:33:34 +00:00
|
|
|
'service_id' INTEGER,
|
2008-03-02 04:46:13 +00:00
|
|
|
'created' TIMESTAMP,
|
2006-09-16 20:08:13 +00:00
|
|
|
'name' VARCHAR(1024),
|
2006-04-02 22:33:34 +00:00
|
|
|
'data' TEXT
|
|
|
|
);
|
2006-09-16 20:08:13 +00:00
|
|
|
|
2006-09-17 00:39:23 +00:00
|
|
|
drop table refs;
|
2006-09-16 20:08:13 +00:00
|
|
|
create table refs (
|
|
|
|
'id' INTEGER PRIMARY KEY NOT NULL,
|
|
|
|
'ref_id' INTEGER,
|
2008-03-02 04:46:13 +00:00
|
|
|
'created' TIMESTAMP,
|
2006-09-16 20:08:13 +00:00
|
|
|
'name' VARCHAR(512)
|
|
|
|
);
|
|
|
|
|
2006-09-17 00:39:23 +00:00
|
|
|
drop table vulns_refs;
|
2006-09-16 20:08:13 +00:00
|
|
|
create table vulns_refs (
|
|
|
|
'ref_id' INTEGER,
|
|
|
|
'vuln_id' INTEGER
|
|
|
|
);
|
2008-03-02 04:46:13 +00:00
|
|
|
|
|
|
|
drop table notes;
|
|
|
|
create table notes (
|
|
|
|
'id' INTEGER PRIMARY KEY NOT NULL,
|
|
|
|
'created' TIMESTAMP,
|
|
|
|
'host_id' INTEGER,
|
|
|
|
'ntype' VARCHAR(512),
|
|
|
|
'data' TEXT
|
|
|
|
);
|
2008-10-12 03:46:49 +00:00
|
|
|
|
|
|
|
drop table requests;
|
|
|
|
create table requests (
|
|
|
|
'host' VARCHAR(20),
|
|
|
|
'port' INTEGER,
|
|
|
|
'ssl' INTEGER,
|
|
|
|
'meth' VARCHAR(20),
|
|
|
|
'path' BLOB,
|
|
|
|
'headers' BLOB,
|
|
|
|
'query' BLOB,
|
|
|
|
'body' BLOB,
|
|
|
|
'respcode' VARCHAR(5),
|
|
|
|
'resphead' BLOB,
|
|
|
|
'response' BLOB,
|
|
|
|
'created' TIMESTAMP
|
|
|
|
);
|
|
|
|
|
|
|
|
drop table targets;
|
|
|
|
create table targets (
|
|
|
|
'id' INTEGER PRIMARY KEY NOT NULL,
|
|
|
|
'host' VARCHAR(20),
|
|
|
|
'port' INTEGER,
|
|
|
|
'ssl' INTEGER,
|
|
|
|
'selected' INTEGER
|
|
|
|
);
|
2008-10-17 13:40:11 +00:00
|
|
|
|
|
|
|
drop table reports;
|
|
|
|
create table reports (
|
|
|
|
'id' INTEGER PRIMARY KEY NOT NULL,
|
|
|
|
'target_id' INTEGER,
|
2008-10-19 20:32:14 +00:00
|
|
|
'parent_id' INTEGER,
|
2008-10-17 13:40:11 +00:00
|
|
|
'entity' VARCHAR(50),
|
2008-10-19 20:32:14 +00:00
|
|
|
'etype' VARCHAR(50),
|
2008-10-17 13:40:11 +00:00
|
|
|
'value' BLOB,
|
|
|
|
'notes' VARCHAR,
|
|
|
|
'source' VARCHAR,
|
|
|
|
'created' TIMESTAMP
|
|
|
|
);
|
|
|
|
|
|
|
|
|