Example #1
0
#
# Version: 1.0
# Created: 07.04.2009, Bunyamin Demir
#
# Index page
#
# Release Notes:
#
require_once "lib/DB.class.php";
require_once "lib/Template.class.php";
require_once "lib/Report.class.php";
require_once "lib/Resource.class.php";
require_once "lib/Filter.class.php";
require_once "lib/php-ofc-library/open-flash-chart.php";
$rs = new Resource();
$RS = $rs->enum(array('LIST_CATEGORY'));
if ($_GET['graph_filter']) {
    $plist = explode(";", $_GET['graph_filter']);
    for ($i = 0; $i <= count($plist); $i++) {
        list($k, $v) = explode("=", $plist[$i]);
        $param[$k] = $v;
    }
}
list($filter, $fwhere) = Filter::getFilter($param, '');
foreach ($fwhere as $w) {
    $where .= $w;
}
$categories =& Report::getCategoryDistribution($where);
$category = array();
foreach (array_keys($RS['LIST_CATEGORY']) as $s) {
    if ($categories[$s] && $s) {
Example #2
0
# Webekci Manage Interface
#
# Release Notes:
#
require_once "lib/DB.class.php";
require_once "lib/Template.class.php";
$tmp = new Template();
$pages = array('wbmng' => 'wb_manage.tpl', 'dbmng' => 'db_manage.tpl', 'cnfmng' => 'conf_manage.tpl', 'inf' => 'inf_manage.tpl');
$_GET['tab'] ? $sub_menu = $_GET['tab'] : ($sub_menu = 'wbmng');
$_GET['c'] ? $c = $_GET['c'] : ($c = 0);
$_GET['cmd'] ? $cmd = $_GET['cmd'] : ($cmd = '');
$rs = new Resource();
$sub_menus = $rs->create_sub_menu('webekci');
$count_menus = count($sub_menus);
$rs = new Resource();
$RS = $rs->enum(array('LIST_MANAGEMENT_TYPE'));
$db = new DBConnection();
$tmp->assign('sub_menus', $sub_menus);
$tmp->assign('select_menu', $c);
$tmp->assign('count_menus', $count_menus);
# --------------------------------------------------------------------------
switch ($sub_menu) {
    case "wbmng":
        if ($cmd == 'dadd') {
            domain_add($tmp, $pages[$cmd], $_GET['id']);
        } elseif ($cmd == 'validity') {
            $db->setDomainValidity($_GET['id'], $_GET['v']);
            domain_list($tmp, $pages[$sub_menu]);
        } elseif ($cmd == 'dinst') {
            domain_insert($_POST, $db);
            domain_list($tmp, $pages[$sub_menu]);
Example #3
0
require_once "lib/Navigation.class.php";
require_once "lib/Resource.class.php";
require_once "lib/Filter.class.php";
$tmp = new Template();
$pages = array('audit' => 'audit_records.tpl', 'show_det' => 'audit_log_detail.tpl', 'sip' => 'source_ip_report.tpl', 'show_ip' => 'source_ip_detail.tpl', 'severity' => 'severity_dist_report.tpl', 'category' => 'category_dist_report.tpl', 'rule' => 'rule_report.tpl', 'show_rule' => 'rule_detail.tpl');
$_GET['tab'] ? $sub_menu = $_GET['tab'] : ($sub_menu = 'audit');
$_GET['c'] ? $c = $_GET['c'] : ($c = 0);
$_GET['cmd'] ? $cmd = $_GET['cmd'] : ($cmd = '');
$rs = new Resource();
$sub_menus = $rs->create_sub_menu('report');
$count_menus = count($sub_menus);
$tmp->assign('sub_menus', $sub_menus);
$tmp->assign('select_menu', $c);
$tmp->assign('count_menus', $count_menus);
$db = new DBConnection();
$RS = $rs->enum(array('LIST_SEVERITY', 'LIST_CATEGORY', 'LIST_HTTP_METHOD', 'LIST_STATUS', 'LIST_PHASE', 'LIST_HTTP_CODE', 'LIST_HTTP_PROTOCOL', 'LIST_IP'));
# --------------------------------------------------------------------------
switch ($sub_menu) {
    case 'audit':
        if ($cmd == 'show_det') {
            audit_record_details($tmp, $pages[$cmd], $_GET['id']);
        } elseif ($cmd == 'ip_block') {
            $db->setIpBlock($_GET['ip'], $_GET['v']);
            audit_record_details($tmp, $pages['show_det'], $_GET['id']);
        } else {
            audit_record_list($tmp, $pages[$sub_menu]);
        }
        break;
    case 'sip':
        if ($cmd == 'show_ip') {
            source_ip_detail($tmp, $pages[$cmd], $_GET['ip']);
Example #4
0
#
# Version: 1.0
# Created: 07.04.2009, Bunyamin Demir
#
# Index page
#
# Release Notes:
#
require_once "lib/DB.class.php";
require_once "lib/Template.class.php";
require_once "lib/Report.class.php";
require_once "lib/Resource.class.php";
require_once "lib/Filter.class.php";
require_once "lib/php-ofc-library/open-flash-chart.php";
$rs = new Resource();
$RS = $rs->enum(array('LIST_SEVERITY'));
if ($_GET['graph_filter']) {
    $plist = explode(";", $_GET['graph_filter']);
    for ($i = 0; $i <= count($plist); $i++) {
        list($k, $v) = explode("=", $plist[$i]);
        $param[$k] = $v;
    }
}
list($filter, $fwhere) = Filter::getFilter($param, '');
foreach ($fwhere as $w) {
    $where .= $w;
}
$severities =& Report::getSeverityDistribution($where);
//print_r($severities);
$severity = array();
foreach (array_keys($RS['LIST_SEVERITY']) as $s) {
Example #5
0
require_once "lib/Resource.class.php";
require_once "lib/Navigation.class.php";
require_once "lib/ModSecConfiguration.class.php";
$tmp = new Template();
$pages = array('rfile' => 'rule_files.tpl', 'rf_add' => 'rule_files_add.tpl', 'rule' => 'rule.tpl', 'rule_add' => 'rule_add.tpl', 'rdfile' => 'rule_data_files.tpl', 'rdf_add' => 'rule_data_files_add.tpl', 'rdata' => 'rule_data.tpl', 'rd_add' => 'rule_data_add.tpl', 'wlist' => 'white_list.tpl', 'wl_add' => 'white_list_add.tpl');
$_GET['tab'] ? $sub_menu = $_GET['tab'] : ($sub_menu = 'rfile');
$_GET['c'] ? $c = $_GET['c'] : ($c = 0);
$_GET['cmd'] ? $cmd = $_GET['cmd'] : ($cmd = '');
$rs = new Resource();
$sub_menus = $rs->create_sub_menu('rule');
$count_menus = count($sub_menus);
$tmp->assign('sub_menus', $sub_menus);
$tmp->assign('select_menu', $c);
$tmp->assign('count_menus', $count_menus);
$rs = new Resource();
$RS = $rs->enum(array('LIST_WHITE_LIST_TYPE'));
$db = new DBConnection();
# --------------------------------------------------------------------------
switch ($sub_menu) {
    case "rfile":
        if ($cmd == 'rf_add') {
            rule_file_add($tmp, $pages[$cmd], $_GET['id']);
        } elseif ($cmd == 'validity') {
            $db->setRuleFileValidity($_GET['id'], $_GET['v']);
            rule_file_list($tmp, $pages[$sub_menu]);
        } elseif ($cmd == 'rf_inst') {
            rule_file_insert($_POST, $db);
            rule_file_list($tmp, $pages[$sub_menu]);
        } elseif ($cmd == 'rf_edit') {
            rule_file_edit($_POST, $db);
            rule_file_list($tmp, $pages[$sub_menu]);
Example #6
0
 public function getFilters()
 {
     $rs = new Resource();
     $RS = $rs->enum(array('LIST_SEVERITY', 'LIST_CATEGORY', 'LIST_HTTP_METHOD', 'LIST_STATUS', 'LIST_PHASE', 'LIST_HTTP_CODE', 'LIST_HTTP_PROTOCOL', 'LIST_IP'));
     $filters['severity'] = array_values($RS['LIST_SEVERITY']);
     $filters['category'] = array_values($RS['LIST_CATEGORY']);
     $filters['http_method'] = array_values($RS['LIST_HTTP_METHOD']);
     $filters['status'] = array_values($RS['LIST_STATUS']);
     $filters['phase'] = array_values($RS['LIST_PHASE']);
     $filters['http_code'] = array_values($RS['LIST_HTTP_CODE']);
     $filters['http_pro'] = array_values($RS['LIST_HTTP_PROTOCOL']);
     $filters['ip_block'] = array_values($RS['LIST_IP']);
     return $filters;
 }