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

NathanGibbs3 / BASE / 590

pending completion
590

push

travis-ci-com

NathanGibbs3
20230420 Fix CI build breakage. 2

2755 of 16977 relevant lines covered (16.23%)

21.61 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
include("base_conf.php");
×
23
include_once("$BASE_path/includes/base_constants.inc.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
  $et = new EventTiming($debug_time_mode);
×
29

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

34
<FORM METHOD="POST" ACTION="base_db_setup.php">
35

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

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

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

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

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

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

82
NLIO('</form>',2);
×
83
PrintBASESubFooter();
×
84
?>
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