• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

NathanGibbs3 / BASE / 624

pending completion
624

push

travis-ci-com

NathanGibbs3
Merge branch 'devel'

562 of 562 new or added lines in 28 files covered. (100.0%)

3145 of 17504 relevant lines covered (17.97%)

23.22 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/base_db_setup.php
1
<?php
2
/*******************************************************************************
3
** Basic Analysis and Security Engine (BASE)
4
** Copyright (C) 2004 BASE Project Team
5
** Copyright (C) 2000 Carnegie Mellon University
6
**
7
** (see the file 'base_main.php' for license details)
8
**
9
** Project Leads: Kevin Johnson <kjohnson@secureideas.net>
10
**                Sean Muller <samwise_diver@users.sourceforge.net>
11
** Built upon work by Roman Danyliw <rdd@cert.org>, <roman@danyliw.com>
12
**
13
** Purpose: Create the Database schema
14
********************************************************************************
15
** Authors:
16
********************************************************************************
17
** Kevin Johnson <kjohnson@secureideas.net
18
**
19
********************************************************************************
20
*/
21

22
$sc = DIRECTORY_SEPARATOR;
×
23
require_once("includes$sc" . 'base_krnl.php');
×
24
include("$BASE_path/includes/base_include.inc.php");
×
25
include_once("$BASE_path/base_db_common.php");
×
26
include_once("$BASE_path/setup/setup_db.inc.php");
×
27

28
$page_title = "DB Setup";
×
29
PrintBASESubHeader($page_title, $page_title, _BACK, 1);
×
30
?>
31

32
<FORM METHOD="POST" ACTION="base_db_setup.php">
33

34
<?php
35
  $submit = ImportHTTPVar("submit", VAR_ALPHA | VAR_SPACE);
×
36

37
  /* Connect to the Alert database */
38
  $db = NewBASEDBConnection($DBlib_path, $DBtype);
×
39
  $db->baseDBConnect($db_connect_method,
×
40
                     $alert_dbname, $alert_host, $alert_port, $alert_user, $alert_password);
41

42
  if ( $submit == "Create BASE AG" ) {
×
43
     $result = CreateBASEAG($db);
×
44
     echo '<HR><P>';
×
45
  }else{
×
46
        // Set a default on somthing unexpected.
47
        $result = 0;
×
48
  }
49

50
  echo '
×
51
  <TABLE WIDTH="100%">
52
     <TR><TD CLASS="plfieldhdr">Operation</TD>
53
         <TD CLASS="plfieldhdr">Description</TD>
54
         <TD CLASS="plfieldhdr">Status</TD>
55
     </TR>
56
     <TR><TD VALIGN=TOP><B>BASE tables</B></TD>
57
         <TD VALIGN=TOP>Adds tables to extend the Snort DB to support the BASE functionality</TD>
58
         <TD VALIGN=TOP>';
59

60
  if ($result == 1)
×
61
     ErrorMessage("&nbsp;DONE&nbsp;");
×
62
  else
×
63
     echo '<INPUT TYPE="submit" NAME="submit" VALUE="Create BASE AG">'; 
×
64

65
  echo '
×
66
  </TABLE>';
67
  
68
  if ($result == 1)
×
69
     echo '<P>
×
70
           The underlying Alert DB is configured for usage with BASE.
71
           <P>
72
           <B>Additional DB permissions</B><BR>
73
           In order to support Alert purging (the selective ability to permanently delete
74
           alerts from the database) and DNS/whois lookup caching, 
75
           the DB user "'.$alert_user.'" must have the DELETE and UPDATE privilege
76
           on the database "'.$alert_dbname.'@'.$alert_host.'" 
77
           <P>
78
           Goto the <A HREF="base_main.php">Main page</A> to use the application.'; 
79

80
NLIO('</form>',2);
×
81
PrintBASESubFooter();
×
82
?>
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc