--
-- $Id: inprotect.sql,v 1.4 2004/11/24 09:36:52 greg_k Exp $
--

-- MySQL dump 9.10
--
-- Host: localhost    Database: inprotect
-- ------------------------------------------------------
-- Server version	4.0.18-log

--
-- Table structure for table `inprotect_settings`
--

CREATE DATABASE inprotect;
use inprotect;

CREATE TABLE inprotect_settings (
  nessus_plugins_url varchar(255) NOT NULL default '',
  nessus_plugins_file varchar(255) NOT NULL default '',
  nessus_plugins_md5 varchar(255) NOT NULL default '',
  nessus_install_url varchar(255) NOT NULL default '',
  nessus_install_file varchar(255) NOT NULL default '',
  mailfrom varchar(255) NOT NULL default '',
  inprotect_url varchar(255) NOT NULL default '',
  inprotect_path varchar(255) NOT NULL default '',
  version varchar(4) default NULL
) TYPE=MyISAM;

--
-- Dumping data for table `inprotect_settings`
--

INSERT INTO inprotect_settings VALUES ('http://www.nessus.org/nasl','all-2.0.tar.gz','all-2.0.tar.gz.md5','http://install.nessus.org/releases','nessus-2.0.x.tgz','root@localhost','http://127.0.0.1','/var/www/html','0.20');

--
-- Table structure for table `log`
--

CREATE TABLE log (
  id int(11) NOT NULL auto_increment,
  date_time timestamp(14) NOT NULL,
  ip varchar(15) NOT NULL default '',
  username varchar(255) default NULL,
  action varchar(255) NOT NULL default '',
  PRIMARY KEY  (id)
) TYPE=MyISAM;

--
-- Dumping data for table `log`
--

--
-- Table structure for table `nessus_category`
--

CREATE TABLE nessus_category (
  id int(11) NOT NULL auto_increment,
  name varchar(255) NOT NULL default '',
  PRIMARY KEY  (id),
  UNIQUE KEY nname (name)
) TYPE=MyISAM;

--
-- Dumping data for table `nessus_category`
--

--
-- Table structure for table `nessus_family`
--

CREATE TABLE nessus_family (
  id int(11) NOT NULL auto_increment,
  name varchar(255) NOT NULL default '',
  PRIMARY KEY  (id),
  UNIQUE KEY nname (name)
) TYPE=MyISAM;

--
-- Dumping data for table `nessus_family`
--

--
-- Table structure for table `nessus_hosts`
--

CREATE TABLE nessus_hosts (
  id int(11) NOT NULL auto_increment,
  sched_id int(11) NOT NULL default '0',
  username varchar(255) NOT NULL default '',
  hostip varchar(255) NOT NULL default '',
  PRIMARY KEY  (id)
) TYPE=MyISAM;

--
-- Dumping data for table `nessus_hosts`
--

--
-- Table structure for table `nessus_live_stats`
--

CREATE TABLE nessus_live_stats (
  sid int(11) NOT NULL default '0',
  host varchar(255) NOT NULL default '',
  action varchar(255) NOT NULL default '',
  percent double NOT NULL default '0',
  username varchar(255) NOT NULL default ''
) TYPE=MyISAM;

--
-- Dumping data for table `nessus_live_stats`
--

--
-- Table structure for table `nessus_notes`
--

CREATE TABLE nessus_notes (
  id int(11) NOT NULL auto_increment,
  pid int(11) NOT NULL default '0',
  username varchar(255) NOT NULL default '',
  note text NOT NULL,
  PRIMARY KEY  (id)
) TYPE=MyISAM;

--
-- Dumping data for table `nessus_notes`
--

--
-- Table structure for table `nessus_plugins`
--

CREATE TABLE nessus_plugins (
  id int(11) NOT NULL default '0',
  enabled char(1) NOT NULL default '',
  version varchar(255) default NULL,
  created varchar(14) default NULL,
  modified varchar(14) default NULL,
  deleted varchar(14) default NULL,
  category int(11) NOT NULL default '0',
  family int(11) NOT NULL default '0',
  risk int(11) NOT NULL default '0',
  PRIMARY KEY  (id)
) TYPE=MyISAM;

--
-- Dumping data for table `nessus_plugins`
--

--
-- Table structure for table `nessus_preferences`
--

CREATE TABLE nessus_preferences (
  id varchar(255) default NULL,
  nessus_id varchar(255) NOT NULL default '',
  value varchar(255) default NULL,
  category varchar(255) default NULL,
  type char(1) NOT NULL default '',
  PRIMARY KEY  (nessus_id)
) TYPE=MyISAM;

--
-- Dumping data for table `nessus_preferences`
--

--
-- Table structure for table `nessus_preferences_defaults`
--

CREATE TABLE nessus_preferences_defaults (
  nessus_id varchar(255) NOT NULL default '',
  nessusgroup varchar(255) default NULL,
  type varchar(255) default NULL,
  field varchar(255) default NULL,
  value varchar(255) default NULL,
  category varchar(255) default NULL,
  flag char(1) default NULL,
  PRIMARY KEY  (nessus_id)
) TYPE=MyISAM;

--
-- Dumping data for table `nessus_preferences_defaults`
--

--
-- Table structure for table `nessus_results`
--

CREATE TABLE nessus_results (
  username varchar(255) default NULL,
  sched_id int(11) default NULL,
  sid int(11) default NULL,
  scantime varchar(14) default NULL,
  scantype char(1) NOT NULL default 'M',
  result_id int(11) NOT NULL auto_increment,
  domain varchar(255) NOT NULL default '',
  host varchar(40) NOT NULL default '',
  service varchar(40) NOT NULL default '',
  scriptid varchar(40) NOT NULL default '',
  risk varchar(40) NOT NULL default '',
  msg text,
  falsepositive char(1) default 'N',
  PRIMARY KEY  (result_id)
) TYPE=MyISAM;

--
-- Dumping data for table `nessus_results`
--

--
-- Table structure for table `nessus_scan`
--

CREATE TABLE nessus_scan (
  sched_id int(11) NOT NULL default '0',
  host varchar(255) NOT NULL default '',
  status char(1) NOT NULL default '',
  server_id int(11) NOT NULL default '0',
  start_dttm datetime default NULL,
  end_dttm datetime default NULL,
  submit_dttm datetime default NULL,
  process_id int(11) NOT NULL default '0',
  PRIMARY KEY  (sched_id,host)
) TYPE=MyISAM;

--
-- Dumping data for table `nessus_scan`
--

--
-- Table structure for table `nessus_schedule`
--

CREATE TABLE nessus_schedule (
  id int(11) NOT NULL auto_increment,
  name varchar(255) NOT NULL default '',
  username varchar(255) NOT NULL default '',
  schedule_type char(1) NOT NULL default 'H',
  day_of_week int(1) unsigned NOT NULL default '0',
  day_of_month int(2) unsigned NOT NULL default '1',
  time time NOT NULL default '00:00:00',
  next_scan varchar(14) default NULL,
  status char(1) default NULL,
  email varchar(100) NOT NULL default '',
  sid int(11) NOT NULL default '0',
  timeout int(11) default '14400',
  PRIMARY KEY  (id),
  KEY name (name)
) TYPE=MyISAM;

--
-- Dumping data for table `nessus_schedule`
--

--
-- Table structure for table `nessus_server_zones`
--

CREATE TABLE nessus_server_zones (
  zoneid int(11) NOT NULL default '0',
  nessusid int(11) NOT NULL default '0'
) TYPE=MyISAM;

--
-- Dumping data for table `nessus_server_zones`
--

--
-- Table structure for table `nessus_servers`
--

CREATE TABLE nessus_servers (
  id int(11) NOT NULL auto_increment,
  name varchar(255) NOT NULL default '',
  description varchar(255) NOT NULL default '',
  hostname varchar(255) NOT NULL default '',
  port int(11) NOT NULL default '1241',
  user varchar(255) NOT NULL default '',
  PASSWORD varchar(255) NOT NULL default '',
  max_scans int(11) NOT NULL default '10',
  current_scans int(11) NOT NULL default '0',
  TYPE char(1) NOT NULL default '',
  owner varchar(255) NOT NULL default '',
  checkin_time datetime default NULL,
  PRIMARY KEY  (id)
) TYPE=MyISAM;

--
-- Dumping data for table `nessus_servers`
--

--
-- Table structure for table `nessus_settings`
--

CREATE TABLE nessus_settings (
  id int(11) NOT NULL auto_increment,
  name varchar(255) NOT NULL default '',
  description varchar(255) default NULL,
  autoenable char(1) NOT NULL default 'N',
  type char(1) NOT NULL default 'G',
  owner varchar(255) NOT NULL default '',
  PRIMARY KEY  (id),
  UNIQUE KEY name (name)
) TYPE=MyISAM;

--
-- Dumping data for table `nessus_settings`
--

--
-- Table structure for table `nessus_settings_category`
--

CREATE TABLE nessus_settings_category (
  sid int(11) NOT NULL default '0',
  cid int(11) NOT NULL default '0',
  status int(11) NOT NULL default '0'
) TYPE=MyISAM;

--
-- Dumping data for table `nessus_settings_category`
--

--
-- Table structure for table `nessus_settings_family`
--

CREATE TABLE nessus_settings_family (
  sid int(11) NOT NULL default '0',
  fid int(11) NOT NULL default '0',
  status int(11) NOT NULL default '0'
) TYPE=MyISAM;

--
-- Dumping data for table `nessus_settings_family`
--

--
-- Table structure for table `nessus_settings_plugins`
--

CREATE TABLE nessus_settings_plugins (
  id int(11) NOT NULL default '0',
  sid int(11) NOT NULL default '0',
  enabled char(1) NOT NULL default 'Y',
  category int(11) NOT NULL default '0',
  family int(11) NOT NULL default '0'
) TYPE=MyISAM;

--
-- Dumping data for table `nessus_settings_plugins`
--

--
-- Table structure for table `nessus_settings_preferences`
--

CREATE TABLE nessus_settings_preferences (
  sid int(11) NOT NULL default '0',
  id varchar(255) default NULL,
  nessus_id varchar(255) NOT NULL default '',
  value varchar(255) default NULL,
  category varchar(255) default NULL,
  type char(1) NOT NULL default ''
) TYPE=MyISAM;

--
-- Dumping data for table `nessus_settings_preferences`
--

--
-- Table structure for table `nessus_settings_users`
--

CREATE TABLE nessus_settings_users (
  id int(11) NOT NULL auto_increment,
  sid int(11) NOT NULL default '0',
  username varchar(255) NOT NULL default '',
  PRIMARY KEY  (id)
) TYPE=MyISAM;

--
-- Dumping data for table `nessus_settings_users`
--

--
-- Table structure for table `nessus_user_zones`
--

CREATE TABLE nessus_user_zones (
  id int(11) NOT NULL auto_increment,
  username varchar(255) NOT NULL default '',
  zid int(11) NOT NULL default '0',
  PRIMARY KEY  (id)
) TYPE=MyISAM;

--
-- Dumping data for table `nessus_user_zones`
--

--
-- Table structure for table `nessus_zone_ranges`
--

CREATE TABLE nessus_zone_ranges (
  id int(11) NOT NULL auto_increment,
  zoneid int(11) NOT NULL default '0',
  range_start int(11) unsigned NOT NULL default '0',
  range_end int(11) unsigned NOT NULL default '0',
  PRIMARY KEY  (id)
) TYPE=MyISAM;

--
-- Dumping data for table `nessus_zone_ranges`
--

--
-- Table structure for table `nessus_zones`
--

CREATE TABLE nessus_zones (
  id int(11) NOT NULL auto_increment,
  name varchar(255) NOT NULL default '',
  description varchar(255) NOT NULL default '',
  TYPE char(1) NOT NULL default '',
  owner varchar(255) NOT NULL default '',
  PRIMARY KEY  (id)
) TYPE=MyISAM;

--
-- Dumping data for table `nessus_zones`
--

--
-- Table structure for table `plugins`
--

CREATE TABLE plugins (
  id int(11) NOT NULL default '0',
  name varchar(255) default NULL,
  family varchar(255) default NULL,
  category varchar(255) default NULL,
  copyright varchar(255) default NULL,
  summary varchar(255) default NULL,
  description blob,
  version varchar(255) default NULL,
  cve_id varchar(255) default NULL,
  bugtraq_id varchar(255) default NULL,
  xref blob,
  PRIMARY KEY  (id)
) TYPE=MyISAM;

--
-- Dumping data for table `plugins`
--

--
-- Table structure for table `portscan`
--

CREATE TABLE portscan (
  id int(10) unsigned NOT NULL auto_increment,
  username varchar(255) NOT NULL default '',
  userip varchar(15) NOT NULL default '',
  submittime timestamp(14) NOT NULL,
  scanip varchar(255) NOT NULL default '',
  email varchar(255) NOT NULL default '',
  ports char(1) NOT NULL default 'T',
  portstart smallint(5) unsigned default NULL,
  portend smallint(5) unsigned default NULL,
  common char(1) NOT NULL default 'Y',
  scancomplete char(1) NOT NULL default 'N',
  options varchar(255) default NULL,
  PRIMARY KEY  (id)
) TYPE=MyISAM;

--
-- Dumping data for table `portscan`
--

--
-- Table structure for table `portscan_os`
--

CREATE TABLE portscan_os (
  id int(11) NOT NULL default '0',
  host varchar(15) default NULL,
  os varchar(255) default NULL,
  details varchar(255) default NULL,
  devtype varchar(255) default NULL
) TYPE=MyISAM;

--
-- Dumping data for table `portscan_os`
--

--
-- Table structure for table `portscan_results`
--

CREATE TABLE portscan_results (
  id int(11) NOT NULL default '0',
  host varchar(15) default NULL,
  port int(11) NOT NULL default '0',
  type char(3) NOT NULL default '',
  status varchar(8) NOT NULL default '',
  description varchar(40) default NULL,
  version varchar(255) default NULL
) TYPE=MyISAM;

--
-- Dumping data for table `portscan_results`
--

--
-- Table structure for table `risk_level`
--

CREATE TABLE risk_level (
  id int(11) NOT NULL default '0',
  description varchar(255) NOT NULL default '',
  PRIMARY KEY  (id)
) TYPE=MyISAM;

--
-- Dumping data for table `risk_level`
--

INSERT INTO risk_level VALUES (1,'Serious');
INSERT INTO risk_level VALUES (2,'High');
INSERT INTO risk_level VALUES (3,'Medium');
INSERT INTO risk_level VALUES (4,'Medium/Low');
INSERT INTO risk_level VALUES (5,'Low/Medium');
INSERT INTO risk_level VALUES (6,'Low');
INSERT INTO risk_level VALUES (7,'Info');

--
-- Table structure for table `users`
--

CREATE TABLE users (
  pn_uname varchar(255) NOT NULL default '',
  pn_email varchar(60) NOT NULL default '',
  pn_pass varchar(40) NOT NULL default '',
  admin char(1) NOT NULL default 'N',
  profile char(1) NOT NULL default 'N',
  zones char(1) NOT NULL default 'Y',
  nmap char(1) NOT NULL default 'Y',
  nessus char(1) NOT NULL default 'Y',
  expire varchar(8) default NULL,
  locked int(11) NOT NULL default '0',
  created timestamp(14) NOT NULL,
  lastaccessed datetime NOT NULL default '0000-00-00 00:00:00',
  owniponly char(1) NOT NULL default 'N',
  sc_now char(1) NOT NULL default 'N',
  sc_once char(1) NOT NULL default 'N',
  sc_daily char(1) NOT NULL default 'N',
  sc_weekly char(1) NOT NULL default 'N',
  sc_monthly char(1) NOT NULL default 'N',
  PRIMARY KEY  (pn_uname)
) TYPE=MyISAM;

--
-- Dumping data for table `users`
--

INSERT INTO users VALUES ('Admin','root@localhost','5f4dcc3b5aa765d61d8327deb882cf99','Y','Y','Y','Y','Y','',0,20031208194642,'2003-12-08 19:46:42','N','N','N','N','N','N');
