Ejemplo n.º 1
0
$roleneeded = 10000;
#$BUser = new BaseUser();
#if (($BUser->hasRole($roleneeded) == 0) && ($Use_Auth_System == 1)) base_header("Location: " . $BASE_urlpath . "/index.php");
$submit = ImportHTTPVar("submit", VAR_ALPHA | VAR_SPACE, array(gettext("Delete Selected"), gettext("Delete ALL on Screen"), _ENTIREQUERY));
$export = intval(ImportHTTPVar("complete", VAR_DIGIT));
// Called from report_launcher.php
$qs->MoveView($submit);
/* increment the view if necessary */
$page_title = gettext("Sensor Listing");
/* Connect to the Alert database */
$db = NewBASEDBConnection($DBlib_path, $DBtype);
$db->baseDBConnect($db_connect_method, $alert_dbname, $alert_host, $alert_port, $alert_user, $alert_password, 0, 1);
if ($event_cache_auto_update == 1) {
    UpdateAlertCache($db);
}
$criteria_clauses = ProcessCriteria();
// Include base_header.php
PrintBASESubHeader($page_title, $page_title, $cs->GetBackLink(), 1);
$mssp = Session::show_entities();
//intval($conf->get_conf("alienvault_mssp", FALSE));
// Use accumulate tables only when timestamp criteria is not hour sensitive
$use_ac = $criteria_clauses[3];
$nevents = "count(distinct acid_event.plugin_id, acid_event.plugin_sid)";
// use ac_acid_event
if ($use_ac) {
    $from = " FROM po_acid_event as acid_event " . $criteria_clauses[0] . ", device LEFT JOIN alienvault.sensor ON sensor.id=device.sensor_id";
    $where = $criteria_clauses[4] != "" ? " WHERE " . $criteria_clauses[4] : " ";
    $where2 = $criteria_clauses[5] != "" ? " WHERE " . $criteria_clauses[5] : " ";
    $counter = "sum(acid_event.cnt) as event_cnt";
    $from1 = " FROM acid_event " . $criteria_clauses[0] . ", device LEFT JOIN alienvault.sensor ON sensor.id=device.sensor_id";
    $where1 = $criteria_clauses[1] != "" ? " WHERE " . $criteria_clauses[1] : " ";
Ejemplo n.º 2
0
/*
require_once ('classes/pdfReport.inc');
$pdfReport = new PdfReport($siem_events_title);
$htmlPdfReport = new Html($siem_events_title,$siem_events_title,'','font-size:10px');
*/
// GEOIP
include "geoip.inc";
require_once "classes/Util.inc";
$gi = geoip_open("/usr/share/geoip/GeoIP.dat", GEOIP_STANDARD);
global $colored_alerts, $debug_mode;
/* **************** Run the Query ************************************************** */
/* base_ag_main.php will include this file
*  - imported variables: $sql, $cnt_sql
*/
if ($printing_ag) {
    ProcessCriteria();
    $page = "base_ag_main.php";
    $tmp_page_get = "&ag_action=view&ag_id={$ag_id}&submit=x";
    $sql = $save_sql;
} else {
    $page = "base_qry_main.php";
    $cnt_sql = "SELECT COUNT(acid_event.cid) FROM acid_event " . $join_sql . $where_sql . $criteria_sql;
    $tmp_page_get = "";
}
// Timezone
$tz = Util::get_timezone();
/* Run the query to determine the number of rows (No LIMIT)*/
//$qs->GetNumResultRows($cnt_sql, $db);
$et->Mark("Counting Result size");
/* Setup the Query Results Table */
$qro = new QueryResultsOutput("{$page}" . $qs->SaveStateGET() . $tmp_page_get);