• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP ossim_valid函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中ossim_valid函数的典型用法代码示例。如果您正苦于以下问题:PHP ossim_valid函数的具体用法?PHP ossim_valid怎么用?PHP ossim_valid使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了ossim_valid函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: validate_post_params

function validate_post_params($conn, $name, $descr, $sids, $imported_sids)
{
    $vals = array('name' => array(OSS_INPUT, 'illegal:' . _("Name")), 'descr' => array(OSS_TEXT, OSS_NULLABLE, 'illegal:' . _("Description")));
    ossim_valid($name, $vals['name']);
    ossim_valid($descr, $vals['descr']);
    $plugins = array();
    $sids = is_array($sids) ? $sids : array();
    if (intval(POST('pluginid')) > 0) {
        $sids[POST('pluginid')] = "0";
    }
    foreach ($sids as $plugin => $sids_str) {
        if ($sids_str !== '') {
            list($valid, $data) = Plugin_sid::validate_sids_str($sids_str);
            if (!$valid) {
                ossim_set_error(_("Error for data source ") . $plugin . ': ' . $data);
                break;
            }
            if ($sids_str == "ANY") {
                $sids_str = "0";
            } else {
                $aux = count(explode(',', $sids_str));
                $total = Plugin_sid::get_sidscount_by_id($conn, $plugin);
                $sids_str = $aux == $total ? "0" : $sids_str;
            }
            $plugins[$plugin] = $sids_str;
        }
    }
    if (!count($plugins) && !count($imported_sids)) {
        ossim_set_error(_("No Data Sources or Event Types selected"));
    }
    if (ossim_error()) {
        die(ossim_error());
    }
    return array($name, $descr, $plugins);
}
开发者ID:AntBean,项目名称:alienvault-ossim,代码行数:35,代码来源:modifyplugingroups.php


示例2: delete_nfsen_source

function delete_nfsen_source($data)
{
    if (!Session::am_i_admin()) {
        $return['error'] = TRUE;
        $return['msg'] = _('Action not authorized');
        return $return;
    }
    require_once '../sensor/nfsen_functions.php';
    $sensor = $data['sensor'];
    ossim_valid($sensor, OSS_ALPHA, 'illegal:' . _('Nfsen Source'));
    if (ossim_error()) {
        $info_error = _('Error') . ': ' . ossim_get_error();
        ossim_clean_error();
        $return['error'] = TRUE;
        $return['msg'] = $info_error;
        return $return;
    }
    $res = delete_nfsen($sensor);
    if ($res['status'] == 'success') {
        $return['error'] = FALSE;
        $return['msg'] = _('Source deleted successfully');
        //To forcer load variables in session again
        unset($_SESSION['tab']);
    } else {
        $return['error'] = TRUE;
        $return['msg'] = $res['data'];
    }
    return $return;
}
开发者ID:jackpf,项目名称:ossim-arc,代码行数:29,代码来源:nfsen_ajax.php


示例3: server_get_servers

function server_get_servers($conn)
{
    $name = GET('name');
    ossim_valid($name, OSS_ALPHA, OSS_PUNC, OSS_SPACE, 'illegal:' . _("Server name"));
    require_once 'ossim_conf.inc';
    $ossim_conf = $GLOBALS["CONF"];
    /* get the port and IP address of the server */
    $address = $ossim_conf->get_conf("server_address");
    $port = $ossim_conf->get_conf("server_port");
    /* create socket */
    $socket = socket_create(AF_INET, SOCK_STREAM, 0);
    if ($socket < 0) {
        echo _("socket_create() failed: reason: ") . socket_strerror($socket) . "\n";
    }
    $list = array();
    $err = "";
    /* connect */
    $result = @socket_connect($socket, $address, $port);
    if (!$result) {
        $err = "<p><b>" . _("socket error") . "</b>: " . gettext("Is OSSIM server running at") . " {$address}:{$port}?</p>";
        return array($list, $err);
    }
    /* first send a connect message to server */
    $in = 'connect id="1" type="web"' . "\n";
    $out = '';
    socket_write($socket, $in, strlen($in));
    $out = @socket_read($socket, 2048, PHP_NORMAL_READ);
    if (strncmp($out, "ok id=", 4)) {
        $err = "<p><b>" . gettext("Bad response from server") . "</b></p>";
        $err .= "<p><b>" . _("socket error") . "</b>: " . gettext("Is OSSIM server running at") . " {$address}:{$port}?</p>";
        return array($list, $err);
    }
    /* get servers from server */
    if ($name != NULL) {
        $in = 'server-get-servers id="2" servername="' . $name . '"' . "\n";
    } else {
        $in = 'server-get-servers id="2"' . "\n";
    }
    $out = '';
    socket_write($socket, $in, strlen($in));
    $pattern = '/server host="([^"]*)" servername="([^"]*)"/ ';
    while ($out = socket_read($socket, 2048, PHP_NORMAL_READ)) {
        if (preg_match($pattern, $out, $regs)) {
            if (Session::hostAllowed($conn, $regs[1])) {
                $s["host"] = $regs[1];
                $s["servername"] = $regs[2];
                //# This should be checked in the server TODO FIXME
                if (!in_array($s, $list)) {
                    $list[] = $s;
                }
            }
        } elseif (!strncmp($out, "ok id=", 4)) {
            break;
        }
    }
    socket_close($socket);
    return array($list, $err);
}
开发者ID:jhbsz,项目名称:ossimTest,代码行数:58,代码来源:server_get_servers.php


示例4: activate_account

function activate_account()
{
    $data = POST('data');
    $token = $data['token'];
    ossim_valid($token, OSS_ALPHA, 'illegal:' . _("OTX auth-token"));
    check_ossim_error();
    $otx = new Otx();
    $otx->register_token($token);
    return array('msg' => _("Your OTX account has been connected. The OTX pulses that you have subscribed to will begin downloading shortly. This process may take a few minutes."), 'token' => $token, 'username' => $otx->get_username(), 'user_id' => $otx->get_user_id(), 'contributing' => TRUE, 'key_version' => $otx->get_key_version(), 'latest_update' => $otx->get_latest_update());
}
开发者ID:jackpf,项目名称:ossim-arc,代码行数:10,代码来源:otx_config.php


示例5: retrieve_groups

function retrieve_groups($num)
{
    $g_list = array();
    for ($i = 1; $i <= $num; $i++) {
        $aux = explode("_", GET('group' . $i));
        if (ossim_valid($aux[0], OSS_HEX, 'illegal:' . _("Group ID"))) {
            $g_list[] = "'" . $aux[0] . "'";
        }
    }
    return implode(',', $g_list);
}
开发者ID:AntBean,项目名称:alienvault-ossim,代码行数:11,代码来源:alarm_group_response.php


示例6: get_pulse_detail

function get_pulse_detail()
{
    $data = POST('data');
    ossim_valid($data['pulse_id'], OSS_HEX, 'illegal: Pulse ID');
    if (ossim_error()) {
        return array();
    }
    $otx = new Otx();
    $pulse = $otx->get_pulse_detail($data['pulse_id']);
    //Converting indicator hash to array to use it in the datatables.
    $pulse['indicators'] = array_values($pulse['indicators']);
    return $pulse;
}
开发者ID:jackpf,项目名称:ossim-arc,代码行数:13,代码来源:otx_pulse.php


示例7: get_pulse_detail_from_id

function get_pulse_detail_from_id($conn)
{
    $type = POST('type');
    $pulse = POST('pulse');
    $id = POST('id');
    ossim_valid($type, 'alarm|event|alarm_event', 'illegal:' . _('Type'));
    ossim_valid($pulse, OSS_HEX, 'illegal:' . _('Pulse'));
    ossim_valid($id, OSS_HEX, 'illegal:' . _('ID'));
    if (ossim_error()) {
        Av_exception::throw_error(Av_exception::USER_ERROR, ossim_get_error_clean());
    }
    if ($type == 'alarm') {
        $pulse = Alarm::get_pulse_data_from_alarm($conn, $id, $pulse, TRUE);
    } elseif ($type == 'event') {
        $pulse = Siem::get_pulse_data_from_event($conn, $id, $pulse, FALSE, TRUE);
    } elseif ($type == 'alarm_event') {
        $pulse = Siem::get_pulse_data_from_event($conn, $id, $pulse, TRUE, TRUE);
    }
    return array('name' => $pulse['name'], 'descr' => $pulse['descr'], 'iocs' => array_values($pulse['iocs']));
}
开发者ID:jackpf,项目名称:ossim-arc,代码行数:20,代码来源:otx_reputation_info.php


示例8: modify_plugingroup_plugin

function modify_plugingroup_plugin($conn, $data)
{
    $plugin_group = $data['plugin_group'];
    $plugin_id = $data['plugin_id'];
    $sids_str = $data['plugin_sids'];
    ossim_valid($plugin_id, OSS_DIGIT, 'illegal:' . _("Plugin ID"));
    ossim_valid($plugin_group, OSS_HEX, 'illegal:' . _("Plugin GroupID"));
    if (ossim_error()) {
        $info_error = "Error: " . ossim_get_error();
        ossim_clean_error();
        $return['error'] = true;
        $return['msg'] = $info_error;
        return $return;
    }
    $total_sel = 1;
    if (is_array($sids_str)) {
        $total_sel = count($sids_str);
        $sids_str = implode(',', $sids_str);
    }
    if ($sids_str !== '') {
        list($valid, $data) = Plugin_sid::validate_sids_str($sids_str);
        if (!$valid) {
            $return['error'] = true;
            $return['msg'] = _("Error for data source ") . $plugin_id . ': ' . $data;
            return $return;
        }
        if ($sids_str == "ANY") {
            $sids_str = "0";
        } else {
            $total = Plugin_sid::get_sidscount_by_id($conn, $plugin_id);
            $sids_str = $total_sel == $total ? "0" : $sids_str;
        }
        Plugin_group::edit_plugin($conn, $plugin_group, $plugin_id, $sids_str);
    }
    $return['error'] = false;
    $return['output'] = '';
    return $return;
}
开发者ID:jackpf,项目名称:ossim-arc,代码行数:38,代码来源:plugin_groups_ajax.php


示例9: validate_post_params

function validate_post_params($conn, $name, $descr, $sids, $imported_sids, $group_id = NULL)
{
    $vals = array('name' => array(OSS_INPUT, 'illegal:' . _("Name")), 'descr' => array(OSS_ALL, OSS_NULLABLE, 'illegal:' . _("Description")), 'group_id' => array(OSS_HEX, OSS_NULLABLE, 'illegal:' . _("Group ID")));
    ossim_valid($group_id, $vals['group_id']);
    ossim_valid($name, $vals['name']);
    if (ossim_error() == FALSE && Plugin_group::is_valid_group_name($conn, $name, $group_id) == FALSE) {
        $name = Util::htmlentities($name);
        ossim_set_error(sprintf(_("DS group name '<strong>%s</strong>' already exists"), $name));
    }
    ossim_valid($descr, $vals['descr']);
    $plugins = array();
    $sids = is_array($sids) ? $sids : array();
    $pluginid = intval(POST('pluginid'));
    if ($pluginid > 0) {
        $sids[$pluginid] = "0";
    }
    foreach ($sids as $plugin => $sids_str) {
        if ($sids_str !== '') {
            list($valid, $data) = Plugin_sid::validate_sids_str($sids_str);
            if (!$valid) {
                ossim_set_error(_("Error for data source ") . $plugin . ': ' . $data);
                break;
            }
            if ($sids_str == "ANY") {
                $sids_str = "0";
            } else {
                $aux = count(explode(',', $sids_str));
                $total = Plugin_sid::get_sidscount_by_id($conn, $plugin);
                $sids_str = $aux == $total ? "0" : $sids_str;
            }
            $plugins[$plugin] = $sids_str;
        }
    }
    if (!count($plugins) && !count($imported_sids)) {
        ossim_set_error(_("No Data Sources or Event Types selected"));
    }
    return array($group_id, $name, $descr, $plugins, ossim_error());
}
开发者ID:jackpf,项目名称:ossim-arc,代码行数:38,代码来源:modifyplugingroups.php


示例10: modify_deploy_hosts

function modify_deploy_hosts($wizard, $data)
{
    $os = $data['os'];
    $hosts = $data['hosts'];
    $username = $data['username'];
    $password = $data['password'];
    $domain = $data['domain'];
    ossim_valid($os, "windows|linux", 'illegal:' . _('Deploy Option'));
    ossim_valid($hosts, OSS_HEX, 'illegal:' . _('Host'));
    ossim_valid($username, OSS_USER_2, 'illegal:' . _('Username'));
    ossim_valid($password, OSS_PASSWORD, 'illegal:' . _('Password'));
    ossim_valid($domain, OSS_NOECHARS, OSS_ALPHA, OSS_PUNC_EXT, OSS_NULLABLE, 'illegal:' . _('Domain'));
    if (ossim_error()) {
        $response['error'] = TRUE;
        $response['msg'] = ossim_get_error();
        ossim_clean_error();
        return $response;
    }
    $domain = $os == 'windows' ? $domain : '';
    //Encrypting password to save it in the object
    $pass_c = Util::encrypt($password, Util::get_system_uuid());
    //First we clean the deploy info stored in the object
    $wizard->clean_step_data();
    //Saving the info to achieve the deploy
    $wizard->set_step_data('deploy_os', $os);
    $wizard->set_step_data('deploy_username', $username);
    $wizard->set_step_data('deploy_password', $pass_c);
    $wizard->set_step_data('deploy_domain', $domain);
    $wizard->set_step_data('deploy_hosts', $hosts);
    //Setting the deploy step to 1 (Inicialized)
    $wizard->set_step_data('deploy_step', 1);
    //Saving wizard status
    $wizard->save_status();
    $response['error'] = FALSE;
    return $response;
}
开发者ID:AntBean,项目名称:alienvault-ossim,代码行数:36,代码来源:deploy_ajax.php


示例11: GET

*
* Otherwise you can read it here: http://www.gnu.org/licenses/gpl-2.0.txt
*
*/
require_once 'av_init.php';
Session::logcheck("configuration-menu", "CorrelationDirectives");
$directive_id = GET('directive_id');
$file = GET('file');
$engine_id = GET('engine_id');
$rule = GET('rule');
$mode = GET('mode');
ossim_valid($directive_id, OSS_DIGIT, 'illegal:' . _("Directive ID"));
ossim_valid($file, OSS_ALPHA, OSS_DOT, OSS_SCORE, 'illegal:' . _("XML File"));
ossim_valid($engine_id, OSS_HEX, OSS_SCORE, 'illegal:' . _("Engine ID"));
ossim_valid($rule, OSS_DIGIT, '\\-', OSS_NULLABLE, 'illegal:' . _("Rule ID"));
ossim_valid($mode, OSS_ALPHA, OSS_NULLABLE, 'illegal:' . _("Mode"));
if (ossim_error()) {
    die(ossim_error());
}
$directive_editor = new Directive_editor($engine_id);
$filepath = file_exists($directive_editor->engine_path . "/" . $file) ? $directive_editor->engine_path . "/" . $file : $directive_editor->main_path . "/" . $file;
if (preg_match("/^\\d+-\\d+-\\d+\$/", $rule)) {
    if (GET('mode') == "delete") {
        $dom = $directive_editor->get_xml($filepath, "DOMXML");
        $direct = $directive_editor->getDirectiveFromXML($dom, $directive_id);
        $tab_rules = $direct->rules;
        $directive_editor->delrule($rule, &$tab_rules);
        if (!$directive_editor->save_xml($filepath, $dom, "DOMXML")) {
            echo "<!-- ERRORDELETE -->";
        }
    } elseif (GET('mode') == "copy") {
开发者ID:AntBean,项目名称:alienvault-ossim,代码行数:31,代码来源:get_rules.php


示例12: GET

*   MA  02110-1301  USA
*
*
* On Debian GNU/Linux systems, the complete text of the GNU General
* Public License can be found in `/usr/share/common-licenses/GPL-2'.
*
* Otherwise you can read it here: http://www.gnu.org/licenses/gpl-2.0.txt
****************************************************************************/
/**
* Class and Function List:
* Function list:
* Classes list:
*/
include "classes/Security.inc";
$param = GET('param');
ossim_valid($plugin_id, OSS_ALPHA, OSS_NULLABLE);
if (ossim_error()) {
    die(ossim_error());
}
?>
		
    <div style="
      background-color:#17457c;
      width:100%;
      position:fixed;
      height:2px;
      left:0px;"></div>
		<center>
			<button style="width: 80px; margin-top:8px; cursor:pointer;"
				id="cancel"
				onclick="cancel()"
开发者ID:jhbsz,项目名称:ossimTest,代码行数:31,代码来源:bottom.php


示例13: ossim_db

*
*/
require_once 'av_init.php';
Session::logcheck('configuration-menu', 'PolicyServers');
$db = new ossim_db();
$conn = $db->connect();
$id = GET('id');
$ip = GET('ip');
$sname = GET('name');
$update = intval(GET('update'));
$opensource = Session::is_pro() ? FALSE : TRUE;
$mssp = intval($conf->get_conf("alienvault_mssp"));
$local_id = $conf->get_conf("server_id");
ossim_valid($ip, OSS_IP_ADDR, OSS_NULLABLE, 'illegal:' . _('Server IP'));
ossim_valid($sname, OSS_ALPHA, OSS_PUNC, OSS_NULLABLE, 'illegal:' . _('Server Name'));
ossim_valid($id, OSS_HEX, OSS_NULLABLE, 'illegal:' . _('Server ID'));
if (ossim_error()) {
    die(ossim_error());
}
$action = 'newserver.php';
$all_rservers = Server::get_server_hierarchy($conn, $id);
$error_forward = FALSE;
$can_i_modify_elem = TRUE;
if (!empty($id)) {
    $server = Server::get_object($conn, $id);
    $role_list = Role::get_list($conn, $id);
    if (!empty($server) && !empty($role_list)) {
        $role = $role_list[0];
        $sname = $server->get_name();
        $ip = $server->get_ip();
        $port = $server->get_port();
开发者ID:AntBean,项目名称:alienvault-ossim,代码行数:31,代码来源:newserverform.php


示例14: foreach

        $AllPlugins = "";
        $NonDOS = "";
        $DisableAll = "";
        $saveplugins = "";
        break;
    case "POST":
        foreach ($postParams as $pp) {
            if (isset($_POST[$pp])) {
                ${$pp} = Util::htmlentities(mysql_real_escape_string(trim($_POST[$pp])), ENT_QUOTES);
            } else {
                ${$pp} = "";
            }
        }
        break;
}
ossim_valid($sid, OSS_DIGIT, OSS_NULLABLE, 'illegal:' . _("Sid"));
if (ossim_error()) {
    die(_("Invalid Parameter Sid"));
}
if (isset($_POST['authorized_users'])) {
    foreach ($_POST['authorized_users'] as $user) {
        $users[] = Util::htmlentities(mysql_real_escape_string(trim($user)), ENT_QUOTES);
    }
}
//if (!($uroles['profile'] || $uroles['admin'])) {
//   echo "Access Denied!!!<br>";
//   logAccess( $username . " : " . $_SERVER['SCRIPT_NAME'] . " : Unauthorized Access" );
//   //require_once('footer.php');
//   die();
//}
$db = new ossim_db();
开发者ID:jhbsz,项目名称:ossimTest,代码行数:31,代码来源:settings.php


示例15: array

* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
* MA  02110-1301  USA
*
*
* On Debian GNU/Linux systems, the complete text of the GNU General
* Public License can be found in `/usr/share/common-licenses/GPL-2'.
*
* Otherwise you can read it here: http://www.gnu.org/licenses/gpl-2.0.txt
*
*/
require_once 'av_init.php';
Session::logcheck('environment-menu', 'PolicyHosts');
//CPE Types
$_cpe_types = array('os' => 'o', 'hardware' => 'h', 'software' => 'a');
$_cpe = GET('q');
$_cpe_type = GET('cpe_type');
ossim_valid($_cpe, OSS_NULLABLE, OSS_ALPHA, OSS_PUNC_EXT, 'illegal:' . _('CPE'));
ossim_valid($_cpe_type, 'os | software | hardware', 'illegal:' . _('CPE Type'));
if (ossim_error() || !array_key_exists($_cpe_type, $_cpe_types)) {
    exit;
}
$db = new Ossim_db();
$conn = $db->connect();
$_cpe = escape_sql($_cpe, $conn);
$filters = array('where' => "`cpe` LIKE 'cpe:/" . $_cpe_types[$_cpe_type] . "%' AND `line` LIKE '%{$_cpe}%'", 'limit' => 20);
$software = new Software($conn, $filters);
$db->close();
foreach ($software->get_software() as $cpe_info) {
    echo $cpe_info['cpe'] . '###' . $cpe_info['line'] . "\n";
}
/* End of file search_cpe.php */
开发者ID:jackpf,项目名称:ossim-arc,代码行数:31,代码来源:search_cpe.php


示例16: REQUEST

Session::logcheck('configuration-menu', 'CorrelationCrossCorrelation');
$action = 'insert';
$url_form = 'newpluginref.php';
$button_text = Util::js_entities(_("Create rule"));
$plugin_id1 = REQUEST('plugin_id1');
$plugin_id2 = REQUEST('plugin_id2');
$plugin_sid1 = REQUEST('plugin_sid1');
$plugin_sid2 = REQUEST('plugin_sid2');
if ($plugin_id1 != '' || $plugin_id2 != '' || $plugin_sid1 != '' || $plugin_sid2 != '') {
    $action = 'modify';
    $url_form = 'modifypluginref.php';
    $button_text = Util::js_entities(_('Save rule'));
    ossim_valid($plugin_id1, OSS_DIGIT, 'illegal:' . _('Plugin ID1'));
    ossim_valid($plugin_id2, OSS_DIGIT, 'illegal:' . _('Plugin ID2'));
    ossim_valid($plugin_sid1, OSS_DIGIT, 'illegal:' . _('Plugin SID1'));
    ossim_valid($plugin_sid2, OSS_DIGIT, 'illegal:' . _('Plugin SID2'));
    if (ossim_error()) {
        echo ossim_error();
        exit;
    }
}
$db = new ossim_db();
$conn = $db->connect();
$plugin_list = Plugin::get_list($conn, 'ORDER BY name', 0);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<title><?php 
echo _("Cross-Correlation");
?>
开发者ID:AntBean,项目名称:alienvault-ossim,代码行数:31,代码来源:newpluginrefform.php


示例17: unset

if (isset($_SESSION['_actions'])) {
    $action_id = $_SESSION['_actions']['action_id'];
    $action_type = $_SESSION['_actions']['action_type'];
    $descr = $_SESSION['_actions']['descr'];
    $name = $_SESSION['_actions']['name'];
    $cond = $_SESSION['_actions']['cond'];
    $on_risk = $_SESSION['_actions']['on_risk'];
    $email_from = $_SESSION['_actions']['email_from'];
    $email_to = $_SESSION['_actions']['email_to'];
    $email_subject = $_SESSION['_actions']['email_subject'];
    $email_message = $_SESSION['_actions']['email_message'];
    $exec_command = $_SESSION['_actions']['exec_command'];
    unset($_SESSION['_actions']);
} else {
    $action_id = REQUEST('id');
    ossim_valid($action_id, OSS_HEX, OSS_NULLABLE, 'illegal:' . _('Action ID'));
    if (ossim_error()) {
        die(ossim_error());
    }
    list($db, $conn) = Ossim_db::get_conn_db();
    $action_list = Action::get_list($conn, " AND id = UNHEX('{$action_id}')");
    if (is_array($action_list)) {
        $action = $action_list[0];
    }
    if (!is_null($action)) {
        $action_type = $action->get_action_type();
        $ctx = $action->get_ctx();
        $cond = Util::htmlentities($action->get_cond());
        $on_risk = $action->is_on_risk();
        $name = $action->get_name();
        if (REQUEST('descr')) {
开发者ID:jackpf,项目名称:ossim-arc,代码行数:31,代码来源:actionform.php


示例18: GET

* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 dated June, 1991.
* You may not use, modify or distribute this program under any other version
* of the GNU General Public License.
*
* This package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this package; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
* MA  02110-1301  USA
*
*
* On Debian GNU/Linux systems, the complete text of the GNU General
* Public License can be found in `/usr/share/common-licenses/GPL-2'.
*
* Otherwise you can read it here: http://www.gnu.org/licenses/gpl-2.0.txt
*
*/
require_once 'av_init.php';
Session::logcheck("analysis-menu", "EventsForensics");
$rname = GET('name');
ossim_valid($rname, OSS_ALPHA, OSS_SPACE, 'illegal:' . _("Report Name"));
if (ossim_error()) {
    die(ossim_error());
}
$pdfReport = new Pdf_report($rname, "P");
$pdfReport->getPdf();
开发者ID:AntBean,项目名称:alienvault-ossim,代码行数:31,代码来源:pdf.php


示例19: dirname

* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
* MA  02110-1301  USA
*
*
* On Debian GNU/Linux systems, the complete text of the GNU General
* Public License can be found in `/usr/share/common-licenses/GPL-2'.
*
* Otherwise you can read it here: http://www.gnu.org/licenses/gpl-2.0.txt
*
*/
//Config File
require_once dirname(__FILE__) . '/../../../config.inc';
session_write_close();
$system_id = POST('system_id');
$confirm = intval(POST('confirm'));
ossim_valid($system_id, OSS_UUID, 'illegal:' . _('System ID'));
if (ossim_error()) {
    $data['status'] = 'error';
    $data['data'] = ossim_get_error();
} else {
    //Getting system status
    $local_id = strtolower(Util::get_system_uuid());
    try {
        $db = new ossim_db();
        $conn = $db->connect();
        $ha_enabled = Av_center::is_ha_enabled($conn, $system_id);
        $db->close();
    } catch (Exception $e) {
        $db->close();
        $data['status'] = 'error';
        $data['data'] = $e->getMessage();
开发者ID:jackpf,项目名称:ossim-arc,代码行数:31,代码来源:delete_system.php


示例20: foreach

         $order = Policy::get_next_order($conn, $ctx, $group);
     }
     $newid = Policy::insert($conn, $ctx, $priority, $active, $group, $order, $tzone, $b_month, $b_month_day, $b_week_day, $b_hour, $b_minute, $e_month, $e_month_day, $e_week_day, $e_hour, $e_minute, $descr, $source_ips, $source_host_groups, $dest_ips, $dest_host_groups, $source_nets, $source_net_groups, $dest_nets, $dest_net_groups, $portsrc, $portdst, $plug_groups, $sensors, $target, $taxonomy, $reputation, $event_conds, $idm, $correlate, $cross_correlate, $store, $rep, $qualify, $resend_alarms, $resend_events, $frw_conds, $sign, $sem, $sim);
     // Actions
     if (!empty($newid) && count($policy_action) > 0) {
         foreach ($policy_action as $action_id) {
             Policy_action::insert($conn, $action_id, $newid);
         }
     }
     break;
 case 'edit':
     $id = POST('policy_id');
     if (!Policy::is_visible($conn, $id)) {
         die(ossim_error(_("You do not have permission to edit this policy")));
     }
     ossim_valid($id, OSS_HEX, 'illegal:' . _("Policy ID"));
     if (ossim_error()) {
         die(ossim_error());
     }
     Policy::update($conn, $id, $ctx, $priority, $active, $group, $order, $tzone, $b_month, $b_month_day, $b_week_day, $b_hour, $b_minute, $e_month, $e_month_day, $e_week_day, $e_hour, $e_minute, $descr, $source_ips, $source_host_groups, $dest_ips, $dest_host_groups, $source_nets, $source_net_groups, $dest_nets, $dest_net_groups, $portsrc, $portdst, $plug_groups, $sensors, $target, $taxonomy, $reputation, $event_conds, $idm, $correlate, $cross_correlate, $store, $rep, $qualify, $resend_alarms, $resend_events, $frw_conds, $sign, $sem, $sim);
     // Actions
     if (count($policy_action) > 0) {
         Policy_action::delete($conn, $id);
         foreach ($policy_action as $action_id) {
             Policy_action::insert($conn, $action_id, $id);
         }
     }
     break;
 case 'clone':
     $order = Policy::get_next_order($conn, $ctx, $group);
     $newid = Policy::insert($conn, $ctx, $priority, $active, $group, $order, $tzone, $b_month, $b_month_day, $b_week_day, $b_hour, $b_minute, $e_month, $e_month_day, $e_week_day, $e_hour, $e_minute, $descr, $source_ips, $source_host_groups, $dest_ips, $dest_host_groups, $source_nets, $source_net_groups, $dest_nets, $dest_net_groups, $portsrc, $portdst, $plug_groups, $sensors, $target, $taxonomy, $reputation, $event_conds, $idm, $correlate, $cross_correlate, $store, $rep, $qualify, $resend_alarms, $resend_events, $frw_conds, $sign, $sem, $sim);
开发者ID:AntBean,项目名称:alienvault-ossim,代码行数:31,代码来源:newpolicy.php



注:本文中的ossim_valid函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP ossn_add_hook函数代码示例发布时间:2022-05-15
下一篇:
PHP ossim_set_error函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap