2006-12-10 07:28:31 +00:00
|
|
|
|
|
|
|
create table hosts (
|
|
|
|
id SERIAL PRIMARY KEY,
|
2008-03-02 04:46:13 +00:00
|
|
|
created TIMESTAMP,
|
2006-12-10 07:28:31 +00:00
|
|
|
address VARCHAR(16) UNIQUE,
|
2009-07-22 13:25:33 +00:00
|
|
|
address6 VARCHAR(255),
|
|
|
|
mac VARCHAR(255),
|
2006-12-10 07:28:31 +00:00
|
|
|
comm VARCHAR(255),
|
|
|
|
name VARCHAR(255),
|
|
|
|
state VARCHAR(255),
|
2008-07-22 07:28:05 +00:00
|
|
|
info VARCHAR(1024),
|
|
|
|
os_name VARCHAR(255),
|
|
|
|
os_flavor VARCHAR(255),
|
|
|
|
os_sp VARCHAR(255),
|
|
|
|
os_lang VARCHAR(255),
|
|
|
|
arch VARCHAR(255)
|
2006-12-10 07:28:31 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
|
2009-07-22 20:14:35 +00:00
|
|
|
create table clients (
|
|
|
|
id INTEGER PRIMARY KEY NOT NULL,
|
|
|
|
host_id INTEGER,
|
|
|
|
created TIMESTAMP,
|
|
|
|
ua_string VARCHAR(1024) NOT NULL,
|
|
|
|
ua_name VARCHAR(64),
|
|
|
|
ua_ver VARCHAR(32)
|
|
|
|
);
|
|
|
|
|
|
|
|
|
2006-12-10 07:28:31 +00:00
|
|
|
create table services (
|
|
|
|
id SERIAL PRIMARY KEY,
|
|
|
|
host_id INTEGER,
|
2008-03-02 04:46:13 +00:00
|
|
|
created TIMESTAMP,
|
2006-12-10 07:28:31 +00:00
|
|
|
port INTEGER NOT NULL,
|
|
|
|
proto VARCHAR(16) NOT NULL,
|
|
|
|
state VARCHAR(255),
|
|
|
|
name VARCHAR(255),
|
|
|
|
info VARCHAR(1024)
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
create table vulns (
|
|
|
|
id SERIAL PRIMARY KEY,
|
2009-07-22 13:25:33 +00:00
|
|
|
host_id INTEGER,
|
2006-12-10 07:28:31 +00:00
|
|
|
service_id INTEGER,
|
2008-03-02 04:46:13 +00:00
|
|
|
created TIMESTAMP,
|
2006-12-10 07:28:31 +00:00
|
|
|
name VARCHAR(255),
|
|
|
|
data TEXT
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
create table refs (
|
|
|
|
id SERIAL PRIMARY KEY,
|
|
|
|
ref_id INTEGER,
|
2008-03-02 04:46:13 +00:00
|
|
|
created TIMESTAMP,
|
2006-12-10 07:28:31 +00:00
|
|
|
name VARCHAR(512)
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
create table vulns_refs (
|
|
|
|
ref_id INTEGER,
|
|
|
|
vuln_id INTEGER
|
|
|
|
);
|
2008-03-02 04:46:13 +00:00
|
|
|
|
|
|
|
|
|
|
|
create table notes (
|
|
|
|
id SERIAL PRIMARY KEY,
|
|
|
|
host_id INTEGER,
|
|
|
|
created TIMESTAMP,
|
|
|
|
ntype VARCHAR(512),
|
|
|
|
data TEXT
|
|
|
|
);
|